3.11.1.4.1. DocumentBuilderJSAPI

public class DocumentBuilderJSAPI implements Exportable

3.11.1.4.1.1. Constructors

public DocumentBuilderJSAPI(ARenderEventBus eventBus)

3.11.1.4.1.2. Methods

public void close()

Close DocumentBuilder

public void createDocumentFromSelectedThumbs()

Create a new document from the selected thumbs

public void createEmptyDocument()

Create an empty, blank document

public void deleteSelectedThumbs()

Delete current selected thumbs

public DocumentMetadata getDocumentMetadata(AlterContentDescription alterContentDescription, int index)

Extract the DocumentMetadata object from the source AlterContentDescription object

Parameters:
  • alterContentDescription – the source AlterContentDescription object
  • index – the index of the document to fetch DocumentMetadata from
Returns:

resulting DocumentMetadata for this object, or null if not available

public String getResultDocumentId(NotifyAlterDocumentContentEvent event)

Fetch resulting DocumentId of the operation

Parameters:
  • event – the event that was sent when the altercontent operation has been done
Returns:

the documentId resulting of the operation

public AlterContentDescription getSubmittedAlterDocumentContentDescription(SubmitAlterDocumentContentEvent event)

Extract the AlterContentDescription object from the SubmitAlterDocumentContentEvent object

Parameters:
  • event – the source SubmitAlterDocumentContentEvent object
Returns:

the contained AlterContentDescription

public int getSubmittedDocumentCount(AlterContentDescription alterContentDescription)

Count the number of target documents submitted

Parameters:
  • alterContentDescription – source AlterContentDescription object
Returns:

number of target documents submitted

public void open()

Open DocumentBuilder

public void registerEditablePictreeNodeEvent(EditablePictreeNodeHandler handler)

Register a callback called when a new node is added to the DocumentBuilder

Parameters:
  • handler – the callback handler to call
public void registerNotifyAlterDocumentContentEvent(NotifyAlterDocumentContentHandler handler)

Register a callback when a DocumentBuilder save action occurs

Parameters:
  • handler – the callback to call at DocumentBuilder save action
public void registerNotifyDocumentBuilderToggle(NotifyDocumentBuilderToggleHandler handler)

Register a hook to call when the document builder is toggled

Parameters:
  • handler – the callback to call
public void registerSubmitAlterDocumentContentEvent(SubmitAlterDocumentContentHandler handler)

Register a hook to call when a document creation is submitted

Parameters:
  • handler – the callback to call
public void reset()

Reset DocumentBuilder content panel

public void reset(boolean repopulate)

Reset DocumentBuilder content panel

Parameters:
  • repopulate – set to true if builder needs to be populated afterwards
public void saveAllDocuments(SaveAllDocumentsHandler saveAllDocumentsHandler)
public void saveAllDocuments(SaveAllDocumentsHandler saveAllDocumentsHandler, boolean download)
public void saveAllDocuments(SaveAllDocumentsHandler saveAllDocumentsHandler, boolean download, boolean delete)
public void saveAllDocuments(SaveAllDocumentsHandler saveAllDocumentsHandler, boolean download, boolean delete, boolean freeze)
public void saveAllDocuments(SaveAllDocumentsHandler saveAllDocumentsHandler, boolean download, boolean delete, boolean freeze, String behavior)

Save all documents

Parameters:
  • saveAllDocumentsHandler – save all documents callback
  • download – resulting document will be uploaded
  • delete – resulting document will be removed from DocumentBuilder panel
  • freeze – resulting document will be set freezed (non-modifiable) from DocumentBuilder panel
  • behavior – value for the ContentUpdateBehavior
public void saveFirstDocument(boolean download, boolean delete, boolean freeze, String behavior)

Save first document

Parameters:
  • download – resulting document will be uploaded
  • delete – resulting document will be removed from DocumentBuilder panel
  • freeze – resulting document will be set freezed (non-modifiable) from DocumentBuilder panel
  • behavior – value for the ContentUpdateBehavior
public void setDocumentBuilderJSAPIConfiguration(DocumentBuilderJSAPIConfiguration documentBuilderJSAPIConfiguration)
public void toggle()

Toggle DocumentBuilder visibility