Application Class Methods

The Application class methods can be called from your custom application to perform various functions. Your custom application has access to these methods by virtue of it extending com.tibco.wcc.components.Application, the "base" Application class.

Only the methods that are listed here are public; all others are considered private and are subject to change.

General Application Class Methods

  • getApp - Returns the instance of the com.tibco.wcc.components.Application object for the specified namespace. Note that this is a static method; also see the getApp method, which returns the current application instance.
  • getAppVersion - Returns the version of the current build.
  • getProductBrand - Returns the brand of the product: “ActiveMatrix” or “Silver”.
  • logoutOnUnload - Logs out of the given server.
  • getNamespace - Returns the application namespace.
  • getModelName - Returns the application model name.
  • getPageBus - Returns the PageBus instance.
  • isWorkItemPreviewFormOpen - Returns a boolean value indicating whether or not the work item form is open in the preview pane.
  • getApp - Returns the current application instance. Also see the getApp method on getApp, which returns the application instance for the given namespace.
  • getAppBlock - Returns the top-level application block.
  • getServer - Returns the jsx3.app.Server for the application.
  • isAuth - Returns a boolean value indicating whether or not the user is authorized for the given profileCode.
  • clearCacheData - Clears documents from the application cache.
  • publishPauseWorkItemsAutoRefresh - Used to either pause or un-pause the auto-refresh of work items in a work item list.
  • loadPrototype - Loads a component prototype as a child of the given component object and calls paintChild to render the object.
  • adjustSpanForDialog - Adjusts the position attributes of a block caption bar HTML span element to display correctly in a dialog jsx3.gui.WindowBar caption.
  • loadDialogPrototype - Loads the dialogPrototype as a child of the parent container and centers the dialog on the window.
  • getCustomMenuNode - Returns the XML node (jsx3.xml.Entity), which can be used by custom WCC applications when including custom menus and toolbar buttons.
  • registerLongLivedProcess - Registers a long-lived process.
  • cancelLongLivedProcess - Cancels a long-lived process that was previously registered with the registerLongLivedProcess method.
  • isExternalLogin - Indicates whether or not there has been an external login.
  • getLocaleKey - Returns the current Options setting for localeKey.
  • getBaseUrl - Returns the base URL to the Action Processor.
  • getUsername - Returns the user name of the logged-in user.
  • getUserGuid - Returns the GUID of the logged-in user.
  • getChannelId - Returns the Channel ID used to locate work item forms.
  • setChannelId - Sets the value of the Channel ID used to locate work item forms.
  • getBrowserFeatures - Returns an object with properties that specifies features of browser windows in which work items are displayed.
  • getSystemActionsAuthorized - Returns an object with properties that represent system actions and their values for the logged-in user.
  • getUserAccessAuthorized - Returns an object with properties that represent user access controls and their values for the logged-in user.
  • getPrivilegeNames - Returns the privileges held by the logged-in user.
  • loadUrlArgs - Returns an object with properties for each argument in the URL of the currently loaded page.

Data Mask Methods

  • isMaskActive - Returns a boolean value indicating whether or not the “Loading data...” data mask is currently displayed in the application.
  • showMask - Publishes a showDataMask PageBus event, and sets the maskActive property to true.
  • showMaskFunction - Publishes a showDataMask PageBus event, sets the maskActive property to true, and calls the specified function asynchronously.
  • hideMask - Publishes a hideDataMask PageBus event, and sets the maskActive property to false.

Options Methods

Application Log Methods

  • appLogZeroTimer - Resets the log base-line timer.
  • log - Adds a new Application Log entry at the INFO level.
  • logDebug - Adds a new Application Log entry at the DEBUG level.
  • logTrace - Adds a new Application Log entry at the TRACE level.
  • logFatal - Adds an Application Log entry at the FATAL level.
  • logError - Adds an Application Log entry at the ERROR level.
  • logWarn - Adds an Application Log entry at the WARN level.
  • logInfo - Adds an Application Log entry at the INFO level.
  • getAppLogLevel - Returns an integer representing the current log level.
  • getAppLogLevelName - Returns the current log level name.
  • setAppLogLevel - Sets the current log level using an integer.
  • setAppLogLevelName - Sets the current log level using a log-level name.
  • isEchoToJsxLog - Returns True if Application Log entries are echoed to the Application Monitor.
  • setEchoToJsxLog - Specifies whether Application Log entries are echoed to the Application Monitor.
  • getJsxLogger - Returns the logger used to write messages to the Application Monitor if echoToJsxLog is True.
  • logException - Adds a new Application Log entry and exception object at the ERROR level and returns the resulting message string.
  • logAlways - Specifies to always write passed message to both the Application Log and jsx3.log at the INFO level, regardless of what is configured for appLogLevel and echoToJsxLog.
  • logStackTrace - Adds a new Application Log entry and a stackTrace to both the Application Log and jsx3.log.
  • logHierarchy - Adds a new Application Log entry for the hierarchy of the given object to both the Application Log and jsx3.log.
  • logTree - Adds a new Application Log entry for a tree view of children of the given object to both the Application Log and jsx3.log.
  • logStart - Adds the given message as a timed Application Log entry.
  • logStop - Sets the elapsed time for a timed Application Log entry with the matching specified message.
  • getAppLogText - Returns the value of the Application Log text.
  • clearAppLog - Clears all except the original initialization entries, then resets the Application Log baseline time to an effective zero elapsed time.

User Data Methods

  • getUserDataAttributes - Gets persisted user data, then sets the properties of the specified object to the user data values.
  • setUserDataAttributes - Sets persisted user data using the values in the properties of the specified object.

User Message Methods

Display Caption Methods

  • setCaptionBar - Displays an image and text on the specified bar.
  • setCaptionBarText - Sets the display caption on the specified bar with the specified text.

Exception Handling Methods

Tools Interface Methods

The methods listed below are considered the Tools Interface methods — they differ from the other Application-class methods in that they make calls to the Action Processor. Because of that, exceptions are handled differently. For more information, see Tools Interface Methods.

  • Access Methods
    • login - Issues a login request for the specified user.
    • logout - Issues a logout request for the current user.
    • initializeExternalLogin - Initializes the application after login is completed by an external application.
  • Work Item Methods
    • allocateWorkItemToOfferSet - Allows a user to allocate one or more work items to a user from the original offer set.
    • allocateWorkItemToWorld - Allows a user to allocate one or more work items to any available user.
    • allocateWorkItemToSelf - Allows a user to allocate one or more work items to themselves.
    • cancelWorkItem - Closes the specified work item(s), discarding any changes that had been made.
    • openNextWorkItem - Opens the next available work item.
    • openNextWorkItemEx - Opens the next available work item, based on the specified filter and sort parameters.
    • openWorkItem - Opens the specified work item(s).
    • reofferWorkItem - Re-offers the specified work item(s) to the users to whom they were originally offered.
    • skipWorkItem - Marks the specified work item(s) as complete, removes them from the work item list, and causes the process to advance.
    • pendWorkItem - Causes the specified work item(s) to be hidden in the work item list until a specified date/time, or period of time has expired.
    • prioritizeWorkItem - Alters the priority of the specified work item(s).
  • Process Instance Methods
    • startProcessInstance - Starts an instance of the specified process template.
    • cancelProcessInstance - Cancels the specified process instance(s), which results in associated work items also being cancelled.
    • resumeProcessInstance - Resumes the specified suspended process instance(s).
    • suspendProcessInstance - Suspends the specified process instance(s), resulting in associated work items also becoming suspended.
    • resumeHaltedProcessInstance - Resumes the specified halted process instance(s) so that the instance itself goes into a failed state because of the failed task.
    • retryProcessInstance - Retries the specified halted process instance(s) so that the process instance can progress normally.
    • ignoreProcessInstance - Causes the failed task to be skipped in the halted process instance. The process instance continues processing from the point in the process after the failed task.
  • Business Service Methods
  • View Methods
    • showEvents - Adds a temporary view to the event view list.
  • User Options Methods
  • Organization Browser Methods
    • workspaceOrganizationBrowserWindow - Displays the Organization Browser, which can be used to create LDAP containers, as well as map resources to groups and positions in the Organization Model.
  • Configuration Methods
    • configAdmin - Displays the Configuration Administrator, which is used to configure a deployed application.
  • Locale Methods
    • getAppLocales - Returns an array of jsx3.util.Locale objects, one for each locale supported by the application.
    • setAppLocale - Sets the locale of the application server.