Class Application

java.lang.Object
com.arbortext.epic.Application

public class Application extends Object
The Application interface provides access to PTC Arbortext Editor and PTC Arbortext Publishing Engine global functionality. (That is, features that are not associated with any document, document type, or document component.) It is implemented as a singleton: there is only one Application object instantiation in existence.
Since:
Epic 4.0
  • Field Details

    • OPEN_RDONLY

      public static final int OPEN_RDONLY
      Open for read only and do not lock the underlying file. If this is not set, the underlying file will be locked if possible and the document will be read-only if no lock was acquired.
      The “checked out” status of CMS Objects will not be affected.
      See Also:
    • OPEN_DOCRDWR

      public static final int OPEN_DOCRDWR
      Open for writing and do not lock the underlying file. The document will be modifiable even though the underlying file is not locked.
      If the document was already open in memory, this will additionally attempt to lock the underlying file.
      The “checked out” status of CMS Objects will not be affected.
      See Also:
    • OPEN_NLOCK

      public static final int OPEN_NLOCK
      Do not lock the underlying file. Overrides all other flags which might acquire a file lock. The resulting document will not be modifiable unless OPEN_DOCRDWR is also given.
      The “checked out” status of CMS Objects will not be affected.
      See Also:
    • OPEN_CC

      public static final int OPEN_CC
      Perform a completeness check when reading the SGML file. This option is ignored for XML documents.
      See Also:
    • OPEN_NOCC

      public static final int OPEN_NOCC
      Suppress the completeness check when reading the SGML file. This option is ignored for XML documents. OPEN_NOCC is the default option for SGML documents saved by PTC Arbortext Editor and PTC Arbortext Publishing Engine.
      See Also:
    • OPEN_NOMSGS

      public static final int OPEN_NOMSGS
      Do not display any parser error messages in a message window. Instead, suppress all warnings and errors.
      See Also:
    • OPEN_FORCEDT

      public static final int OPEN_FORCEDT
      Use the document type specified by pubId and sysId to parse the SGML or XML file instead of the document type specified in the file itself.
      See Also:
    • OPEN_HELPWIN

      public static final int OPEN_HELPWIN
      Open a help document. (Used internally by PTC Arbortext Editor and PTC Arbortext Publishing Engine.)
      See Also:
    • OPEN_XML

      public static final int OPEN_XML
      Open the document as an XML document even if it does not start with the XML version processing instruction. If not specified, the document is loaded as an SGML document unless the document starts with the XML version header.
      See Also:
    • OPEN_NOSTYLE

      public static final int OPEN_NOSTYLE
      Open the document without loading a style sheet.
      See Also:
    • OPEN_NODTPROMPT

      public static final int OPEN_NODTPROMPT
      Do not prompt the user if the document type associated with the document instance does not exist or is not compiled. Instead, return null.
      See Also:
    • OPEN_COMPARE

      public static final int OPEN_COMPARE
      Open as a specially-treated compare document. (Used internally by PTC Arbortext Editor and PTC Arbortext Publishing Engine.)
      See Also:
    • OPEN_RECTABLES

      public static final int OPEN_RECTABLES
      Cause the table editor to recognize tables immediately after opening the document. By default, table objects are not created until the document is displayed in a window.
      See Also:
    • OPEN_EDITINIT

      public static final int OPEN_EDITINIT
      Process initialization files immediately after opening the document. This includes sourcing the associated document type instance files ( instance.acl, instance.js, and instance.vbs) and the document command files (docname .acl, docname.js, and docname .vbs). By default, these files are not processed until the document is displayed in a window.
      See Also:
    • OPEN_NEW_DOC

      public static final int OPEN_NEW_DOC
      Treat the document as if it were created using the New dialog. In this case, the path name is set to null and the document name is of the form DocumentN.
      See Also:
    • OPEN_RECOVERY_PROMPT

      public static final int OPEN_RECOVERY_PROMPT
      Specifies that if an autosave or recovery file exists for the document, the user should be prompted to select the document to open.
      See Also:
    • OPEN_NAMESPACE_URI

      public static final int OPEN_NAMESPACE_URI
      Specifies that the pubId parameter is actually a namespace URI instead of a public identifier. If OPEN_FORCEDT is also specified, then the namespace URI is used to locate the XML schema to parse the document.
      See Also:
    • OPEN_FREEFORM

      public static final int OPEN_FREEFORM
      Open the document in free form mode, ignoring the document type specified in the file or by the public identifier pubId and system identifier sysId parameters.
      See Also:
    • OPEN_PARSE_STRING

      public static final int OPEN_PARSE_STRING
      Specifies that the path name parameter path is actually a string to parse instead of a file to open. If the string does not contain a DOCTYPE declaration then the pubId and or sysId parameters must be given so the desired document type is used to parse the string or else OPEN_FREEFORM should be specified. If the string contains XML markup but does not start with an XML declaration then OPEN_XML must also be specified.
      Since:
      Arbortext 5.4
      See Also:
    • INVALID_SCOPE

      public static final short INVALID_SCOPE
      The option name is invalid.
      See Also:
    • GLOBAL_SCOPE

      public static final short GLOBAL_SCOPE
      The option has global scope.
      See Also:
    • DOCUMENT_SCOPE

      public static final short DOCUMENT_SCOPE
      The option has document scope.
      See Also:
    • WINDOW_SCOPE

      public static final short WINDOW_SCOPE
      The option has window scope.
      See Also:
    • VIEW_SCOPE

      public static final short VIEW_SCOPE
      The option has view scope.
      See Also:
    • MBF_OK

      public static final int MBF_OK
      Display OK button only. This is the default.
      See Also:
    • MBF_OKCANCEL

      public static final int MBF_OKCANCEL
      Display OK and Cancel buttons.
      See Also:
    • MBF_ABORTRETRYIGNORE

      public static final int MBF_ABORTRETRYIGNORE
      Display Abort, Retry, and Ignore buttons.
      See Also:
    • MBF_YESNOCANCEL

      public static final int MBF_YESNOCANCEL
      Display Yes, No, and Cancel buttons.
      See Also:
    • MBF_YESNO

      public static final int MBF_YESNO
      Display Yes and No buttons.
      See Also:
    • MBF_RETRYCANCEL

      public static final int MBF_RETRYCANCEL
      Display Retry and Cancel buttons.
      See Also:
    • MBF_ICONERROR

      public static final int MBF_ICONERROR
      Display the Error (Stop) icon. This icon is typically used with the Abort, Retry, and Ignore buttons.
      See Also:
    • MBF_ICONQUESTION

      public static final int MBF_ICONQUESTION
      Display the Question icon. This icon is typically used with the Yes and No buttons.
      See Also:
    • MBF_ICONWARNING

      public static final int MBF_ICONWARNING
      Display the Warning icon.
      See Also:
    • MBF_ICONINFORMATION

      public static final int MBF_ICONINFORMATION
      Display the Information icon.
      See Also:
    • MBF_DEFBUTTON1

      public static final int MBF_DEFBUTTON1
      The first button is the default. This is the default if no other default button flag is specified.
      See Also:
    • MBF_DEFBUTTON2

      public static final int MBF_DEFBUTTON2
      The second button is the default.
      See Also:
    • MBF_DEFBUTTON3

      public static final int MBF_DEFBUTTON3
      The third button is the default.
      See Also:
  • Constructor Details

    • Application

      public Application()
  • Method Details

    • getDomImplementation

      public static DOMImplementation getDomImplementation()
      The DOMImplementation object. This is the same value that is returned by a DOM Document object's implementation attribute.
      Since:
      Epic 4.0
    • getDocuments

      public static NodeList getDocuments()
      A DOM NodeList which contains all documents currently opened by PTC Arbortext Editor or PTC Arbortext Publishing Engine. The NodeList will be updated as documents are opened and closed.
      Since:
      Epic 4.0
    • getActiveDocument

      public static Document getActiveDocument()
      A DOM Document that represents the PTC Arbortext Editor or PTC Arbortext Publishing Engine active or current document . If the user interface is active, this is the document that has the focus.
      Since:
      Epic 4.0
    • getLocalizedMessage

      public static String getLocalizedMessage(String message)
      Returns the localized version of the specified message from the default message catalog file.
      Parameters:
      message - The message to localize.
      Returns:
      The localized version of message. If the message is not found in the message file, returns message.
      Since:
      Epic 4.2
    • alert

      public static void alert(String message, String title)
      Displays an alert dialog box with the specified message.
      Parameters:
      message - Specifies the message to display in the dialog box
      title - Specifies the dialog box title. If omitted, the title defaults to "Alert".
      Since:
      Epic 4.2
    • alert

      public static void alert(String message)
      Method overload which omits the last parameter.
    • confirm

      public static boolean confirm(String message, String title)
      Displays a modal confirmation dialog box with the specified message.
      Parameters:
      message - Specifies the message to display in the dialog box
      title - Specifies the dialog box title. If omitted, the title defaults to "Confirm".
      Returns:
      Returns true if the user clicks OK. Returns false if the user clicks Cancel.
      Since:
      Epic 4.2
    • confirm

      public static boolean confirm(String message)
      Method overload which omits the last parameter.
    • prompt

      public static String prompt(String prompt, String value, String title)
      Displays a modal dialog box with the specified message prompt, a text input field, and OK and Cancel buttons.
      Parameters:
      prompt - Specifies the message to display in the dialog box
      value - Specifies the initial value displayed in the text input field.
      title - Specifies the dialog box title. If omitted, the title defaults to "Prompt".
      Returns:
      Returns the string in the text input field if the user clicks OK. Returns null if the user clicks Cancel.
      Since:
      Epic 4.2
    • prompt

      public static String prompt(String prompt, String value)
      Method overload which omits the last parameter.
    • prompt

      public static String prompt(String prompt)
      Method overload which omits the last 2 parameters.
    • getActiveWindow

      public static Window getActiveWindow()
      A Window object that represents the PTC Arbortext Editor active window. If the user interface is not active, returns null.
      Since:
      Epic 4.3
    • getEvent

      public static Event getEvent()
      An Event object which stores the context of the current event. This attribute can only be obtained from within an event listener.
      Since:
      Epic 4.3
    • getOptionNames

      public static StringList getOptionNames()
      A StringList containing the names of all PTC Arbortext set options, excluding ACL hook names.
      Since:
      Epic 4.3
    • createDialogFromDocument

      public static Dialog createDialogFromDocument(Document document, PropertyMap propertyMap, Window parent)
      Creates a dynamic dialog box according to the content of a document.
      Parameters:
      document - The document describing the dialog box. This must conform to the XML User Interface (XUI) document type.
      propertyMap - A PropertyMap object created by the createPropertyMap method to associate with the Dialog. This parameter is optional and is not used by PTC Arbortext Editor or PTC Arbortext Publishing Engine.
      parent - The parent window of the new dynamic dialog. If this parameter is not specified or zero, the parent will be the current active window.
      Returns:
      The Dialog object.
      Since:
      Epic 4.3
    • createDialogFromDocument

      public static Dialog createDialogFromDocument(Document document, PropertyMap propertyMap)
      Method overload which omits the last parameter.
    • createDialogFromDocument

      public static Dialog createDialogFromDocument(Document document)
      Method overload which omits the last 2 parameters.
    • createDialogFromFile

      public static Dialog createDialogFromFile(String filename, PropertyMap propertyMap, Window parent)
      Creates a dynamic dialog box according to the content of an XML file.
      Parameters:
      filename - The XML file containing the dialog box description. This must conform to the XML User Interface (XUI) document type.
      propertyMap - A PropertyMap object created by the createPropertyMap method to associate with the Dialog. This parameter is optional and is not used by PTC Arbortext Editor or PTC Arbortext Publishing Engine.
      parent - The parent window of the new dynamic dialog. If this parameter is not specified or zero, the parent will be the current active window.
      Returns:
      The Dialog object.
      Since:
      Epic 4.3
    • createDialogFromFile

      public static Dialog createDialogFromFile(String filename, PropertyMap propertyMap)
      Method overload which omits the last parameter.
    • createDialogFromFile

      public static Dialog createDialogFromFile(String filename)
      Method overload which omits the last 2 parameters.
    • createStringList

      public static StringList createStringList(int size)
      Creates an empty StringList object that is an ordered collection of DOMStrings.
      Parameters:
      size - The initial size of the array.
      Returns:
      The StringList object.
      Since:
      Epic 4.3
    • createPropertyMap

      public static PropertyMap createPropertyMap()
      Creates an empty PropertyMap object that is an unordered collection of name-value pairs.
      Returns:
      The PropertyMap object.
      Since:
      Epic 4.3
    • createTableObjectStore

      public static TableObjectStore createTableObjectStore()
      Creates an empty TableObjectStore object that is a collection of TableObjects.
      Returns:
      The TableObjectStore object.
      Since:
      Epic 4.3
    • createTableTilePlex

      public static TableTilePlex createTableTilePlex()
      Creates an empty TableTilePlex object which can represent a table selection in a document.
      Returns:
      The TableTilePlex object.
      Since:
      Epic 4.3
    • getOption

      public static String getOption(String name)
      Returns the value of the PTC Arbortext set option, in global scope.
      Parameters:
      name - Specifies the option name.
      Returns:
      The string value of the option, or null if name is not a valid option name. Boolean values return on or off.
      Since:
      Epic 4.3
    • getOptionScope

      public static short getOptionScope(String name)
      Returns the scope of the PTC Arbortext set option.
      Parameters:
      name - Specifies the option name.
      Returns:
      A code representing the scope of the option as defined by OptionScopeType. If name is not a valid option name, returns INVALID_SCOPE.
      Since:
      Epic 4.3
    • setOption

      public static void setOption(String name, String value) throws AOMException
      Sets the value of the PTC Arbortext set option, in global scope. If name specifies a Document- or View-scoped option, setting the value does not affect any existing documents or views, only newly created objects.
      Parameters:
      name - Specifies the option name.
      value - Specifies the new value of the option. Boolean values are specified using the string on or off.
      Throws:
      AOMException - Raised if the method detects an error (for example, if name is not a valid option).
      Since:
      Epic 4.3
    • openDocument

      public static Document openDocument(String path, int flags, String name, String pubId, String sysId, String stylesheet) throws AOMException
      Reads an XML or SGML file and creates a new Document object that may be used to navigate the document's content. The method may also be used to create an empty document if path is null, similar to the createDocument method of the DOMImplementation interface.
      The pubid and sysid arguments specify the document type for the document if path is omitted or null, if the associated file does not specify a DOCTYPE declaration, or if bit OPEN_FORCEDT is included in flags. The pubid and sysid arguments are ignored if path specifies an SGML file that starts with a DOCTYPE declaration, if OPEN_FORCEDT is not specified, or if path specifies a binary document file. If the document type is not specified, is "ascii", or cannot be determined the document is opened in untagged mode.
      Parameters:
      path - Specifies the path name of a document directory or the file name from which to load the initial contents of the document tree. May be a "file://" or "http://" URL. If the URL specifies a server supporting WebDAV, the file will be opened for editing (Windows only). If the server does not support WebDAV, the file will be opened as read-only. If null or an empty string, the document is empty.
      flags - A bitmask that specifies open options. Constructed by ORing the bits from the LoadFlags enumeration.
      name - Specifies a name to be used for informational purposes. If null or the empty string, the base name of path is used. If path is null or empty, an internal name is assigned.
      pubId - Specifies the public identifier of the document type.
      sysId - Specifies the system identifier of the document type.
      stylesheet - Specifies the style sheet to be used instead of the default style sheet for the document. If flag OPEN_NOSTYLE is set, this parameter is ignored. If the specified style sheet does not exist, an exception is raised.
      Returns:
      A new Document object.
      Throws:
      AOMException - Raised if the method detects any error.
      Since:
      Epic 4.3
    • openDocument

      public static Document openDocument(String path, int flags, String name, String pubId, String sysId) throws AOMException
      Method overload which omits the last parameter.
      Throws:
      AOMException
    • openDocument

      public static Document openDocument(String path, int flags, String name, String pubId) throws AOMException
      Method overload which omits the last 2 parameters.
      Throws:
      AOMException
    • openDocument

      public static Document openDocument(String path, int flags, String name) throws AOMException
      Method overload which omits the last 3 parameters.
      Throws:
      AOMException
    • openDocument

      public static Document openDocument(String path, int flags) throws AOMException
      Method overload which omits the last 4 parameters.
      Throws:
      AOMException
    • openDocument

      public static Document openDocument(String path) throws AOMException
      Method overload which omits the last 5 parameters.
      Throws:
      AOMException
    • openDocument

      public static Document openDocument() throws AOMException
      Method overload which omits the last 6 parameters.
      Throws:
      AOMException
    • createComposer

      public static Composer createComposer(String ccfPath) throws AOMException
      Creates a Composer object for the given ccfPath.
      Parameters:
      ccfPath - The path of the CCF file.
      Returns:
      The Composer object.
      Throws:
      AOMException - Raised if the ccfPath is invalid, or if there is an error creating the Composer.
      Since:
      Epic 4.3
    • print

      public static void print(String str)
      Outputs a string to the message window. If the user interface is not open on Windows, the message is discarded. In PTC Arbortext Publishing Engine on Windows, the message is sent to the trace window if it is open, otherwise it is discarded.
      Parameters:
      str - Specifies the string to print. A line break is not added. Newline characters in the string will cause line breaks. If the parameter is omitted or null, a line break is output. This method can not be used from Visual Basic since print is a reserved word in Visual Basic and can't be used as a method name on any object.
      Since:
      Epic 4.3
    • print

      public static void print()
      Method overload which omits the last parameter.
    • getPath

      public static String getPath()
      specifies the location of the directory that contains the program files needed to run the software.
      Since:
      Epic 4.4.1
    • createEvent

      public static Event createEvent(String eventType) throws AOMException
      Creates an event of type ApplicationEvent.
      Parameters:
      eventType - The eventType parameter specifies the type of Event interface to be created. If the Event interface specified is supported by the implementation this method will return a new Event of the interface type requested. If the Event is to be dispatched via the dispatchEvent method the appropriate event init method must be called after creation in order to initialize the Event's values.
      Returns:
      The newly created Event
      Throws:
      AOMException - Raised if the implementation does not support the type of Event interface requested.
      Since:
      Epic 4.4.1
    • run

      public static void run(String name) throws AOMException
      Runs the macro or alias named name. The name is first looked up as a macro using the active document macro scope. If no such macro is found in any scope, then name is looked up as a command alias.
      Parameters:
      name - The name of the macro or alias to execute.
      Throws:
      AOMException - Raised if name is not recognized as a macro or alias or if an error occurs while executing the macro or alias.
      Since:
      Epic 4.4.2
    • getHaveWindows

      public static boolean getHaveWindows()
      Returns true if the application is running in windows-mode. Returns false if running as PTC Arbortext Publishing Engine server or in one-shot command mode (-c specified as a startup option).
      Since:
      Epic 5.1
    • getInitDone

      public static boolean getInitDone()
      Returns true if the product has completed initialization.
      Since:
      Epic 5.1
    • getIsE3

      public static boolean getIsE3()
      Returns true if the product is running as PTC Arbortext Publishing Engine, either server or interactive mode. Server mode can be determined by also testing the haveWindows attribute.
      Since:
      Epic 5.1
    • getName

      public static String getName()
      Specifies the name of the PTC Arbortext product, for example, "PTC Arbortext Editor". This string is not localized. The localized version of the string can be obtained by calling getLocalizedMessage on the result.
      Since:
      Epic 5.1
    • getCustomProperties

      public static PropertyMap getCustomProperties()
      Returns a PropertyMap object containing custom properties for an application. This object is initialized from the application-specific global parameters specified in an application's application.xml file.
      Since:
      Epic 5.1
    • getUserProperties

      public static PropertyMap getUserProperties()
      Returns a PropertyMap object containing user properties (preferences) that override custom properties set for an application. This object is initialized from the user property section of the epic.wcf preferences file. Changes made to the userProperties object are saved back to the preferences file on exit.
      Since:
      Epic 5.1
    • getCustomDirectory

      public static String getCustomDirectory(String name)
      Returns the installation directory for a specified application. If name is omitted or the null string, then the default custom directory is returned, either the first value of the APTCUSTOM environment variable if set or else the custom subdirectory in the product installation directory.
      If name is a number, then this specifies the 0-based index into the list of custom directories. This allows an iterator to enumerate the list of custom directories by calling this method in a loop, incrementing the index until a null string is returned.
      If name is a negative integer, then the list is traversed in reverse. "-1" returns the last custom directory, "-2" the second to last custom directory and so on.
      Parameters:
      name - Specifies the application name or index.
      Returns:
      The full path name of the specified application's custom directory or null if name is not a loaded application name or if it specifies an index out of range.
      Since:
      Epic 5.1
    • getCustomDirectory

      public static String getCustomDirectory()
      Method overload which omits the last parameter.
    • error

      public static void error(String message)
      Sounds a beep and displays the error message specified by message in the status bar of the active window if possible, otherwise in a separate dialog. The message is also assigned to the ERROR predefined ACL variable
      The error method is used by PTC Arbortext Editor to display most error messages.
      Parameters:
      message - Specifies the message to display.
      Since:
      Epic 5.1
    • messageBox

      public static int messageBox(String message, int flags, String title)
      Displays a message box with the text message and optional title title. The flags parameter determines what predefined buttons and icons display in the message box, and is formed by ORing the flags from the following groups of flag bits.
      Specify one of the following flags to indicate the buttons that will display in the message box:
      • 0x00 — Display OK button only. This is the default.
      • 0x01 — Display OK and Cancel buttons.
      • 0x02 — Display Abort, Retry, and Ignore buttons.
      • 0x03 — Display Yes, No, and Cancel buttons.
      • 0x04 — Display Yes and No buttons.
      • 0x05 — Display Retry and Cancel buttons.

      Specify one of the following flags to indicate the icon to display in the message box. If you do not specify one of these flags, an icon does not display.
      • 0x10 — Display the Error (Stop) icon. This icon is typically used with the Abort, Retry, and Ignore buttons
      • 0x20 — Display the Question icon. This icon is typically used with the Yes and No buttons.
      • 0x30 — Display the Warning icon.
      • 0x40 — Display the Information icon.

      Specify one of the following flags to indicate the default button:
      • 0x000 — The first button is the default. This is the default if no other default button flag is specified.
      • 0x100 — The second button is the default.
      • 0x200 — The third button is the default.

      If the dialog box has a Cancel or Ignore button, the function returns 3 if the Cancel or Ignore button or ESC key was pressed, or if the dialog box was closed from the Close system menu or Close button. If the dialog box does not have a Cancel or Ignore button and is closed with the ESC key or by the Close system menu or Close button, the function returns 2 if the dialog has only Yes and No buttons. If the dialog box only has an OK button, it returns a 1.
      Parameters:
      message - Specifies the message to display.
      flags - Specifies a bitmask of options constructed by ORing the bits from the MessageBoxFlags enumeration.
      title - Specifies the dialog box title. If omitted, the title defaults to "Message".
      Returns:
      The return value is one of the following:
      • 1 - The first button (Yes, OK, Abort, or Retry) was pressed.
      • 2 - The No button was pressed.
      • 3 - The third button (Cancel or Ignore) was pressed.
      Since:
      Epic 5.1
    • messageBox

      public static int messageBox(String message, int flags)
      Method overload which omits the last parameter.
    • messageBox

      public static int messageBox(String message)
      Method overload which omits the last 2 parameters.
    • quit

      public static void quit(int code, int status)
      Terminates the application with the exit status status. The parameter code determines if the user is prompted for unsaved changes or not and has one of the values:
      • 0 — prompt about any unsaved changes.
      • 1 — save all modified documents without prompting.
      • 2 — do not prompt about unsaved changes and quit without saving modified documents.
      Parameters:
      code - Specifies whether unsaved changes are prompted (0), saved without prompting (1), or discarded without prompting (2). The default is 0.
      status - Specifies the exit status for the program. The default is 0.
      Since:
      Epic 5.1
    • quit

      public static void quit(int code)
      Method overload which omits the last parameter.
    • quit

      public static void quit()
      Method overload which omits the last 2 parameters.
    • getAdapterQNames

      public static StringList getAdapterQNames()
      A list of adapter qualified names for all registered adapters that are available to the application. These values are suitable for use with the Application.getAdapter() method.
      Since:
      Epic 5.2
    • getActiveSession

      public static CMSSession getActiveSession()
      Represents the active CMSSession (if any).
      Since:
      Epic 5.2
    • setActiveSession

      public static void setActiveSession(CMSSession activeSession)
      Represents the active CMSSession (if any).
      Since:
      Epic 5.2
    • registerIOAdapter

      public static void registerIOAdapter(IOAdapter adapter, String name, String qName) throws CMSException
      Called during startup by the adapter to register itself with PTC Arbortext Editor. This call should be the last thing done in the initialization/loading code for the adapter. An adapter cannot be unregistered once it has been registered.
      Parameters:
      adapter - The adapter instance.
      name - The human-readable name of the adapter.
      qName - The qualified name that uniquely identifies this adapter. Qualified names should follow the same reverse domain name convention used by Java.
      Throws:
      CMSException - Raised for any error.
      Since:
      Epic 5.2
    • getLocale

      public static String getLocale(String category)
      Returns the requested locale string.
      Parameters:
      category - null or a supported locale category string.On UNIX, this returns the shorter form of the locale name regardless of the value of the category parameter.On Windows, the following category strings are supported (case sensitive).
      category Method Result
      null or empty string Abbreviated locale string (2-3 letter code). Example: ENU
      LC_COLLATE The locale governing certain collating functions.
      LC_CTYPE The locale governing human-readable messages.
      LC_MESSAGES Equivalent to LC_CTYPE.
      LC_MONETARY The locale governing money formatting.
      LC_NUMERIC The locale governing numeric formatting.
      LC_TIME The locale governing time formatting.
      Any other string. Method will return an empty string.
      Returns:
      The requested locale string. Will be null for any unrecognized category string.
      Since:
      Epic 5.2
    • getLocale

      public static String getLocale()
      Method overload which omits the last parameter.
    • getAdapter

      public static CMSAdapter getAdapter(String adapterQName)
      Returns the requested adapter if available.
      Parameters:
      adapterQName - Adapter qualified name.
      Returns:
      The requested CMSAdapter or null if no such adapter is registered.
      Since:
      Epic 5.2
    • logicalIdToSession

      public static CMSSession logicalIdToSession(String logicalId)
      If the specified path is the correct Logical ID format for a connected CMS, this returns the CMSSession object associated with that session.
      Parameters:
      logicalId - CMS-specific Logical ID. The existence of this Logical ID is not considered when looking for a session.
      Returns:
      CMSSession which claimed ownership of the given Logical ID. Will return null if no session claimed ownership.
      Since:
      Epic 5.2
    • constructObject

      public static CMSObject constructObject(String logicalId, Document doc, boolean reserved) throws CMSException
      Create a new CMSObject for the object referenced by logicalId.
      Parameters:
      logicalId - Logical ID for a CMS object to be referenced.
      doc - NULL or document to use for context information.
      reserved - This parameter is reserved for future use and should always be false.
      Returns:
      New object handle.
      Throws:
      CMSException - Raised if the CMS object does not exist or an error occurs.
      Since:
      Epic 5.2
    • constructObject

      public static CMSObject constructObject(String logicalId, Document doc) throws CMSException
      Method overload which omits the last parameter.
      Throws:
      CMSException
    • constructObject

      public static CMSObject constructObject(String logicalId) throws CMSException
      Method overload which omits the last 2 parameters.
      Throws:
      CMSException
    • logicalIdExists

      public static boolean logicalIdExists(String logicalId)
      Tests the existence of Logical IDs associated with any active CMS session as well as for file-system and http/https resources.
      Parameters:
      logicalId - Logical ID for a CMS or a file-system or http/https resource.
      Returns:
      true if the referenced object/resource exists, false otherwise.If there is any error accessing the resource, this will return false and will not throw an exception.
      Since:
      Epic 5.2
    • createWindow

      public static Window createWindow(String windowClass, int flags, Document doc, String geometry, Window parent, String xuiPath) throws AOMException
      Creates a window of the specified windowClass with optional components given by flags. The window created is not initially displayed. Use the Window.show() method to make the window appear.
      Parameters:
      windowClass - Windows are of two types:
      • Document class windows that display a document tree and have a windowClass of edit, helpwin[1-4], or msgwin[1-4].
      • Dialog class windows that display either a list selection dialog box of windowClass list or xui.
      The class determines the default geometry and, for classes other than list, the class-specific keymap. By default, a new keymap is created for the window on the first map ACL command processed for the window. This keymap has the name windown, where n is the identifier of the window, and is deleted when the window is destroyed. If a set keymap=user ACL command is executed for the window, or if bit 0x00040 is specified in flags, the global keymap for the class will be used. See the flags bit descriptions below.
      flags - The flags parameter is a bit mask that depends on the windowClass and is defined below:The following are the flag bits for list and xui class windows.
      • 0x1 - Supply vertical scrollbar.
      • 0x2 - Verify input (that is, set verify Item attribute).
      • 0x4 - Supply an Apply button,
      • 0x8 - Supply a Help button.
      • 0x10 - For XUI dialog boxes, delete the document after the window is destroyed. In the following example, doc will be destroyed automatically after win is destroyed: Document doc = Application.openDocument("c:\\myproject\\myxuifile", 1); Window win = Application.createWindow("xui", 0x10, doc);
      • 0x040000 - Make the new window a top-level window with its parent being the desktop. This flag is only useful to the xui and list class windows; the windows of all other window classes are created as top-level windows.
      OK and Cancel buttons are always supplied.The following are the flag bits for document class (all non-list) windows.
      • 0x00001 - Supply vertical scrollbar (pane).
      • 0x00002 - Supply menu bar.
      • 0x00004 - Supply command subwindow if windowClass is edit.
      • 0x00008 - Supply message footer subwindow.
      • 0x00010 - Automatically call ADocument.close() on the attached document when the window is destroyed. (pane).
      • 0x00020 -Supply edit toolbar (that is, Toolbar 1) (pane).
      • 0x00040 -Attach the global window class keymap to the window instead of creating a private keymap (pane).
      • 0x00080 - Supply horizontal scrollbar (pane).
      • 0x00100 - Do edit command intializations, include reading the document type instance command files (instance.acl and instance.js) and document command files (docname.acl and docname .js) if they exist, and calling the ACL editfilehook when a document is attached to the window. This bit applies only to edit class windows (pane).
      • 0x00800 - Make the window a typical user edit window (as opposed to a display window).
      • 0x01000 - Supply a table column width ruler (pane).
      • 0x02000 - Supply a table row height ruler (pane).
      • 0x04000 - Supply the Markup toolbar (that is, Toolbar 2).
      • 0x08000 - Supply the Table toolbar (that is, Toolbar 3).
      • 0x10000 - Supply the Application toolbar (that is, Toolbar 4).
      • 0x080000 - Do not update the PTC Arbortext Editor File menu list of recently edited documents, or the Microsoft Windows list of recently edited documents with the path name associated with the doc parameter (if the 0x00800 flag is specified). Note that this does not apply to documents subsequently loaded in the window.
      If a menu bar is requested, it must be initialized using the menu_load or menu_add ACL commands before the window is first displayed.If a message footer is created, error messages and output from the message ACL command are displayed in the left part of the footer if the message is short enough (otherwise a popup dialog box is used). Any messages directed to the message footer are considered transient and are erased on the next key or button event received in the window.
      doc - Specifies the document tree to be attached to the window. The document must not already be displayed in another window. If it is, the function returns null. If doc is null, a scratch document is created that will automatically be destroyed when the window is destroyed. In this case, the associated document type is ascii for edit class windows or the built-in help document type for other classes.This parameter does not apply to list class windows and is ignored if given.
      geometry - Specifies the initial geometry for the window and is a string of the form WxH+X+Y, where W and H are the width and height of the window in pixels, and X and Y give the location of the upper left corner of the window.
      parent - An optional parameter used to specify the parent window for the new window. Only supports dialog class.
      xuiPath - An optional parameter used only by edit windows to supply an alternative XUI file to define the toolbars used by the edit window. If xuiPath is not supplied (or empty), then Arbortext-path\lib\dialogs\editwindow.xml is used.
      Returns:
      A new Window object.
      Throws:
      AOMException - Raised if the method detects any error.
      Since:
      Arbortext 5.4
    • createWindow

      public static Window createWindow(String windowClass, int flags, Document doc, String geometry, Window parent) throws AOMException
      Method overload which omits the last parameter.
      Throws:
      AOMException
    • createWindow

      public static Window createWindow(String windowClass, int flags, Document doc, String geometry) throws AOMException
      Method overload which omits the last 2 parameters.
      Throws:
      AOMException
    • createWindow

      public static Window createWindow(String windowClass, int flags, Document doc) throws AOMException
      Method overload which omits the last 3 parameters.
      Throws:
      AOMException
    • createWindow

      public static Window createWindow(String windowClass, int flags) throws AOMException
      Method overload which omits the last 4 parameters.
      Throws:
      AOMException
    • createWindow

      public static Window createWindow(String windowClass) throws AOMException
      Method overload which omits the last 5 parameters.
      Throws:
      AOMException
    • addEventListener

      public static void addEventListener(String type, EventListener listener, boolean useCapture)
      This method allows the registration of event listeners on the event target. If an EventListener is added to an EventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.
      If multiple identical EventListeners are registered on the same EventTarget with the same parameters the duplicate instances are discarded. They do not cause the EventListener to be called twice and since they are discarded they do not need to be removed with the removeEventListener method.
      Parameters:
      type - The event type for which the user is registering
      listener - The listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs.
      useCapture - If true, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being dispatched to any EventTargets beneath them in the tree. Events which are bubbling upward through the tree will not trigger an EventListener designated to use capture.
    • removeEventListener

      public static void removeEventListener(String type, EventListener listener, boolean useCapture)
      This method allows the removal of event listeners from the event target. If an EventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. EventListeners can never be invoked after being removed.
      Calling removeEventListener with arguments which do not identify any currently registered EventListener on the EventTarget has no effect.
      Parameters:
      type - Specifies the event type of the EventListener being removed.
      listener - The EventListener parameter indicates the EventListener to be removed.
      useCapture - Specifies whether the EventListener being removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.
    • dispatchEvent

      public static boolean dispatchEvent(Event evt) throws EventException
      This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which dispatchEvent is called.
      Parameters:
      evt - Specifies the event type, behavior, and contextual information to be used in processing the event.
      Returns:
      The return value of dispatchEvent indicates whether any of the listeners which handled the event called preventDefault. If preventDefault was called the value is false, else the value is true.
      Throws:
      EventException - UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not specified by initializing the event before dispatchEvent was called. Specification of the Event's type as null or an empty string will also trigger this exception.
    • getLocalizedMessage

      public static String getLocalizedMessage(String inString, Object obj)
      Returns the localized, substituted, and formatted string for inString.
      Parameters:
      inString - The pattern message to use to find the localized version.
      obj - The object to substitute the curly braces in the localized pattern message.
      Returns:
      A localized, substituted, and formatted string. If the localized pattern message is not found, inString will be used as the pattern message
      Since:
      Epic 4.2
    • getLocalizedMessage

      public static String getLocalizedMessage(String inString, Object obj1, Object obj2)
      Returns the localized, substituted, and formated string for the inString.
      Parameters:
      inString - The pattern message to find its localized version.
      obj1 - The object to substitute the first curly braces.
      obj2 - The object to substitute the second curly braces.
      Returns:
      A localized, substituted, and formated string. If the localized pattern message is not found, the inString will be used as the pattern message
      Since:
      Epic 4.2
    • getLocalizedMessage

      public static String getLocalizedMessage(String inString, Object obj1, Object obj2, Object obj3)
      Returns the localized, substituted, and formated string for the inString.
      Parameters:
      inString - The pattern message to find its localized version.
      obj1 - The object to substitute the first curly braces.
      obj2 - The object to substitute the second curly braces.
      obj3 - The object to substitute the third curly braces.
      Returns:
      A localized, substituted, and formated string. If the localized pattern message is not found, the inString will be used as the pattern message
      Since:
      Epic 4.2
    • getLocalizedMessage

      public static String getLocalizedMessage(String inString, Object obj1, Object obj2, Object obj3, Object obj4)
      Returns the localized, substituted, and formated string for the inString.
      Parameters:
      inString - The pattern message to find its localized version.
      obj1 - The object to substitute the first curly braces.
      obj2 - The object to substitute the second curly braces.
      obj3 - The object to substitute the third curly braces.
      obj4 - The object to substitute the fourth curly braces.
      Returns:
      A localized, substituted, and formated string. If the localized pattern message is not found, the inString will be used as the pattern message
      Since:
      Epic 4.2
    • getLocalizedMessage

      public static String getLocalizedMessage(String inString, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5)
      Returns the localized, substituted, and formated string for the inString.
      Parameters:
      inString - The pattern message to find its localized version.
      obj1 - The object to substitute the first curly braces.
      obj2 - The object to substitute the second curly braces.
      obj3 - The object to substitute the third curly braces.
      obj4 - The object to substitute the fourth curly braces.
      obj5 - The object to substitute the fifth curly braces.
      Returns:
      A localized, substituted, and formated string. If the localized pattern message is not found, the inString will be used as the pattern message
      Since:
      Epic 4.2
    • getLocalizedMessage

      public static String getLocalizedMessage(String inString, Object... args)
      Returns the localized, substituted, and formatted string for the inString.
      Parameters:
      inString - The pattern message to find its localized version.
      args - The objects to substitute the curly braces.
      Returns:
      A localized, substituted, and formatted string. If the localized pattern message is not found, the inString will be used as the pattern message.
      Since:
      Arbortext 6.0 M040