General Comunicator stuff
GeneralComunicator
Use it to retrieve general data.
Methods
| method | return | type | Description |
|---|---|---|---|
|
refreshUI() |
void |
read |
Refresh user interface. |
|
getToolBarOption() |
ToolBarOption |
read
|
Retrive ToolbarOption object. The variables into ToolbarOption shown OpenKM features enabled or disabled by security. |
|
getLang() |
String |
read |
Get user interface language code. |
|
downloadDocument(boolean checkout) |
void |
read |
Download selected document. When checkout value is "true" the document will be marked as "edition". |
|
downloadDocumentPdf() |
void |
read |
Download selected document as pdf. |
|
downloadFile(String path, String params) |
void |
read |
Download file with parameters. Deprecated method in favritesr "downloadFileByUUID" method. |
|
downloadFileByUUID(String uuid, String params) |
void |
read |
Download file with parameters. Allowed parameters:
|
|
extensionCallOwnDownload(String url) |
void |
read |
Used to call |
|
resetStatus() |
void |
read |
Reset bottom right status bar. |
|
showError(String callback, Throwable caught) |
void |
read |
Show popup error with some message. |
|
logout() |
void |
read |
Logout from OpenKM user interface. |
|
refreshUserDocumentsSize() |
void |
read |
Refresh user documents size. |
|
getUserRoleList() |
List<String> |
read |
Retrieve a list with the roles of the user. |
|
getUser() |
String |
read |
Retrieve userId. |
|
i18nExtension(String property) |
String |
read |
Retrieve extension translation. |
|
openPath(String path, String docPath) |
void |
read |
Open node into openkm. Parameters:
To open a single folder path the parameter "docPath" must be empty. |
|
getAppContext() |
String |
read |
Retrieve the application context. |
|
showNextWizard() |
void |
read |
Show next wizard. Wizards are shown after document uploading. |
|
isDigitalSignature() |
boolean |
read |
When true indicate digital signature extension is enabled. |
|
getDocumentToSign() |
GWTDocument |
read |
Retrieve a document object to be signed. |
|
getWorkspace() |
GWTWorkspace |
read |
Retrieve the GWT Workspace object. Into the object is set information about UI features - enabled or disabled - among others. |
|
i18n(String property) |
String |
read |
Retrieve frontend translation. |
|
enableKeyShorcuts() |
void |
read |
Enable UI shortcuts. |
|
disableKeyShorcuts() |
void |
void |
Disable UI shortcuts. |
|
openPathByUuid(String uuid) |
void |
void |
Open node into openkm. |
|
getFolderIcon(GWTFolder fld) |
String |
void |
Retrieve folder icon image path. |
|
get() |
Main |
void |
Retrieve Main object from singleton pattern. Main class is the principal frontend class which offers full access to any frontend UI method. |
|
setStatus(String msg) |
void |
void |
On bottom right change status message. |
Sample
// Call to refreshing user interface
GeneralComunicator.refreshUI();
NavigatorComunicator
Use it to retrieve navigator data.
The navigator panel contains stack panel with folder trees into ( taxonomy, categories etc... ).
Methods
| method | return | type | Description |
|---|---|---|---|
|
getStackIndex() |
int |
read |
Get the stack index id. |
|
isTaxonomyShown() |
boolean |
read | When true, indicate the taxonomy stack is shown. |
| isCategoriesShown() |
boolean |
read | When true, indicate the categories stack is shown. |
|
isMetadataShown() |
boolean |
read | When true, indicate the metadata stack is shown. |
|
isThesaurusShown() |
boolean |
read |
When true, indicate the thesaurus stack is shown. |
|
isTemplatesShown |
boolean |
read |
When true, indicate the templates stack is shown. |
|
isPersonalShown |
boolean |
read |
When true, indicate the personal stack is shown. |
|
isMailShown |
boolean |
read |
When true, indicate the mail stack is shown. |
|
isTrashShown |
boolean |
read |
When true, indicate the trash stack is shown. |
|
getFolder() |
GWTFolder |
read |
Retrieve the selected folder object from enabled tree view. We suggest using getNode() method rather this one. |
|
getActualPath() |
String |
read |
Retrieve the path of the selected folder from enabled tree view. |
|
getRootFolder() |
GWTFolder |
read |
Retrieve the GWT folder object of node "/okm:root". |
|
getCategoriesRootFolder() |
GWTFolder |
read |
Retrieve the GWT folder object of node "/okm:categories". |
|
getMetadataRootFolder() |
GWTFolder |
read |
Retrieve the GWT folder object of node "/okm:metadata". |
|
getThesaurusRootFolder() |
GWTFolder |
read |
Retrieve the GWT folder object of node "/okm:thesaurus". |
|
getTemplatesRootFolder() |
GWTFolder |
read |
Retrieve the GWT folder object of node "/okm:templates". |
|
getPersonalRootFolder() |
GWTFolder |
read |
Retrieve the GWT folder object of node "/okm:personal". |
|
getMailRootFolder() |
GWTFolder |
read |
Retrieve the GWT folder object of node "/okm:mail". |
|
getTrashRootFolder() |
GWTFolder |
read |
Retrieve the GWT folder object of node "/okm:trash". |
|
isPanelSelected() |
boolean |
read |
When "true" indicate the navigator panel is the selected node. |
|
getNode() |
GWTNode |
read |
Retrieve the selected node object from enabled tree view. The selected node can be folder or a record type. |
Sample
int stack = NavigatorComunicator.getStackIndex();
if (stack==0) {
Window.alert("First stack enabled");
} else {
Window.alert("Other stack");
}
FileBrowserComunicator
Use it to retrieve file browser data.
Methods
| method | return | type | Description |
|---|---|---|---|
|
isDocumentSelected() |
boolean |
read |
When document is selected it returns "true" value. |
|
isFolderSelected() |
boolean |
read | When folder is selected it returns "true" value. |
| isMailSelected() |
boolean |
read |
When mail is selected it returns "true" value. |
|
isRecordSelected() |
boolean |
read | When record is selected it returns "true" value. |
|
getDocument() |
GWTDocument |
read | Retrieve a GWT document object of the selected document. |
|
getFolder() |
GWTFolder |
read | Retrieve a GWT folder object of the selected folder. |
|
getMail() |
GWTMail |
read | Retrieve a GWT mail object of the selected mail. |
|
getRecord() |
GWTRecord |
read | Retrieve a GWT record object of the selected record. |
|
isPanelSelected() |
boolean |
read | When file browser panel is selected return "true" value. |
|
refreshOnlyFileBrowser() |
void |
read | Refresh only file browser widget view. |
Sample
if (FileBrowserComunicator.isDocumentSelected()) {
Window.alert("document selected");
} else {
Window.alert("document not selected");
}
UtilComunicator
General purpose methods.
Methods
| method | return | type | Description |
|---|---|---|---|
|
formatSize(double size) |
String |
read |
Convert document size in bytes to human value ( Kb, Mb, GB etc.. ). |
|
imageItemHTML(String imageUrl, String title, String align) |
String |
read |
Retrieve image HTML code to be used into GWT frontend widget. |
| createHeaderHTML(String imageURL, String caption) |
String |
read | Retrieve a stack header HTML code to be used into GWT frontend stack widget. |
|
menuHTML(String imageUrl, String text) |
String |
read |
Retrieve menu HTML code to be used into GWT frontend menu element. |
|
imageItemHTML(String imageUrl) |
String |
read |
Retrieve image HTML code to be used into GWT frontend widget. |
|
getTextAsBoldHTML(String text, boolean mark) |
String |
read |
Retrieve text as HTML bold one. |
|
getUserAgent() |
String |
read |
Retrieve user agent of the browser. |
|
getParent(String path) |
String |
read |
Retrieve the parent path of a path. The parent of the "/okm:root/temp/doc1.pdf" is "/okm:root/temp". |
|
getName(String path) |
String |
read |
Retrieve the name of a path. The name of the "/okm:root/temp/doc1.pdf" is "doc1.pdf". |
|
mimeImageHTML(String mime) |
String |
read |
Retrieve the url of the MIME TYPE icon. |
|
hSpace(String width) |
HTML |
read |
Retrieve a GWT HTML horizontal separator. |
|
vSpace(String height) |
HTML |
read |
Retrieve a GWT HTML vertical separator. |
|
isSearchableKey(KeyUpEvent event) |
boolean |
read |
Evaluate if the key pressed is not into navigation, arrows or modifier keys. Navigation keys: HOME, END, PAGEUP, PAGEDOWN. Modifier keys: SHIFT, ALT, CTRL, DOWN. Arrow keys: LEFT, RIGHT, UP, DOWN. |
|
menuHTMLWithoutIcon(String text) |
String |
read |
Retrieve menu HTML code to be used into GWT frontend menu element. |
Sample
// Call to formatting the document size ( gb, mb etc... )
UtilComunicator.formatSize(15);
SearchComunicator
Use it to retrieve search data.
Methods
| method | return | type | Description |
|---|---|---|---|
|
getAllSearchs() |
void |
read |
Refresh saved search panel. |
|
getUserSearchs() |
void |
read | Refresh user saved search panel. |
| getSelectedRowSearchSaved() |
int |
read |
Retrieve the selected row of saved search panel. |
|
getSelectedRowUserNews() |
int |
read |
Retrieve the selected row of user saved search panel. |
|
getSavedSearch() |
GWTQueryParams |
read |
Retrieve the GWT QueryParams object of the selected saved search. |
|
getSavedUserNews() |
GWTQueryParams |
read |
Retrieve the GWT QueryParams object of the selected user saved search. |
|
showFolderSelectPopup(FindFolderHandler findFolderHandler) |
void |
read |
Register a handler for the find folder popup. |
|
showDocumentSelectPopup(FindDocumentHandler findDocumentHandler) |
void |
read |
Register a handler for the find document popup. |
|
showMailSelectPopup(FindMailHandler findMailHandler) |
void |
read |
Register a handler for the find mail popup. |
|
showRecordSelectPopup(FindRecordHandler findRecordHandler) |
void |
read |
Register a handler for the find record popup. |
|
setSavedSearch(GWTQueryParams params) |
void |
write |
Execute a saved search. |
Sample
// Call to refreshing subscribed documents
GWTQueryParams params = new GWTQueryParams();
params.setName("test");
SearchComunicator.setSavedSearch(params);
ToolBarComunicator
Use it to retrieve toolbar data.
Methods
| method | return | type | Description |
|---|---|---|---|
|
evaluateShowIcons() |
void |
read |
Evaluate toolbar icons based on security. |
|
getToolBarOption() |
ToolBarOption |
read |
Retrieve the GWT ToolBarOption object what contains information about enabled or disabled UI features. |
| getActualNode() |
Object |
read |
Retrieve the selected node of the user interface. Retrieved object can be cast to:
|
|
getMainToolBarPanel() |
HorizontalPanel |
read |
Retrieve the main widget of the tool bar. |
|
setToolBarOption(ToolBarOption toolBarOption) |
void |
write |
Change toolbar option, it enable or disable UI features. |
Sample
ToolBarComunicator.evaluateShowIcons();