Package com.arbortext.epic
Class Acl
java.lang.Object
com.arbortext.epic.Acl
The
Acl interface represents the ACL (Arbortext Command
Language) interpreter. It allows the Java programmer to request that a
string be executed as an ACL command or evaluated as an ACL function.- Since:
- Epic 3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentDOMDocument(long docId) Returns the DOM Document object corresponding to an Arbortext document ID.static DocumentDOMDocument(String docId) Returns the DOM Document object corresponding to an Arbortext document ID.static NodeReturns the DOM Node associated with the supplied ACL object identifieroid.static StringescapeString(String value) This generates a doubly-quoted string (") and escapes \, ", and $.static StringEvaluates a string as an ACL expression and returns the result of the evaluation as a string.static booleanExecutes a string as an ACL command.static StringA convenience method for theevalmethod that accepts an ACL function name for the function and assembles the function name and the "()" into a single string.static StringA convenience method for theevalmethod that accepts an ACL function name and an argument for the function and assembles the function name and the argument into a single string.static StringA convenience method for theevalmethod that accepts an ACL function name and any number of arguments for the function and assembles the function name and the arguments into a single string.static StringA convenience method for theevalmethod that accepts an ACL function name and two arguments for the function and assembles the function name and arguments into a single string.static StringA convenience method for theevalmethod that accepts an ACL function name and three arguments for the function and assembles the function name and arguments into a single string.static StringA convenience method for theevalmethod that accepts an ACL function name and four arguments for the function and assembles the function name and arguments into a single string.static StringA convenience method for theevalmethod that accepts an ACL function name and five arguments for the function and assembles the function name and arguments into a single string.static StringA convenience method for theevalmethod that accepts an ACL function name and six arguments for the function and assembles the function name and arguments into a single string.static Stringfunc(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7) A convenience method for theevalmethod that accepts an ACL function name and seven arguments for the function and assembles the function name and arguments into a single string.static Stringfunc(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8) A convenience method for theevalmethod that accepts an ACL function name and eight arguments for the function and assembles the function name and arguments into a single string.static Stringfunc(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9) A convenience method for theevalmethod that accepts an ACL function name and nine arguments for the function and assembles the function name and arguments into a single string.static Stringfunc(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9, String arg10) A convenience method for theevalmethod that accepts an ACL function name and ten arguments for the function and assembles the function name and arguments into a single string.static Stringfunc(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9, String arg10, String arg11) A convenience method for theevalmethod that accepts an ACL function name and eleven arguments for the function and assembles the function name and arguments into a single string.static Stringfunc(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9, String arg10, String arg11, String arg12) A convenience method for theevalmethod that accepts an ACL function name and twelve arguments for the function and assembles the function name and arguments into a single string.static CMSObjectgetCMSObject(long objectId) Returns aCMSObjectobject equivalent to the given ACL dobj id.static CMSObjectgetCMSObject(String objectId) Returns aCMSObjectobject equivalent to the given ACL dobj id.static CMSSessiongetCMSSession(long sessionId) Returns theCMSSessionobject associated with the given ACL session id.static CMSSessiongetCMSSession(String sessionId) Returns theCMSSessionobject associated with the given ACL session id.static DocumentgetDOMDocument(long docId) Returns the DOM Document object corresponding to an Arbortext document ID.static DocumentgetDOMDocument(String docId) Returns the DOM Document object corresponding to an Arbortext document ID.static NodeReturns the DOM Node associated with the supplied ACL object identifieroid.static StringgetFirstOIDFromNode(Node node) Deprecated.As of Epic 4.0, replaced by getFirstOID in ANode.static StringgetLastOIDFromNode(Node node) Deprecated.As of Epic 4.0, replaced by getLastOID in ANode.static StringReturns the value of an ACL scalar variable as a string.static WindowgetWindow(long winId) Returns the AOMWindowobject corresponding to an Arbortext window ID.static WindowReturns the AOMWindowobject corresponding to an Arbortext window ID.static voidSets the value of an ACL scalar variable to the specified string.
-
Constructor Details
-
Acl
public Acl()
-
-
Method Details
-
getDOMDocument
Returns the DOM Document object corresponding to an Arbortext document ID. The desired document must be open in Editor or PE before calling this method, but the document does not need to be visible in a window. Developers can obtain the document identifier they need by using theevalmethod to call an ACL function such ascurrent_doc.- Parameters:
docId- The ACL document identifier of a document. If zero (0), the method uses the returned value of the ACL functioncurrent_doc.- Returns:
- The DOM Document object.
- Throws:
NumberFormatException- Raised if thedocIddoes not contain a parsable long.- Since:
- Epic 3.0
-
getDOMDocument
Returns the DOM Document object corresponding to an Arbortext document ID. The desired document must be open in Editor or PE before calling this method, but the document does not need to be visible in a window. Developers can obtain the document identifier they need by using theevalmethod to call an ACL function such ascurrent_doc.- Parameters:
docId- The ACL document identifier of a document. If zero (0), the method uses the returned value of the ACL functioncurrent_doc.- Returns:
- The DOM Document object.
- Since:
- Epic 5.2
-
DOMDocument
Returns the DOM Document object corresponding to an Arbortext document ID. The desired document must be open in Editor or PE before calling this method, but the document does not need to be visible in a window. Developers can obtain the document identifier they need by using theevalmethod to call an ACL function such ascurrent_doc.- Parameters:
docId- The ACL document identifier of a document. If zero (0), the method uses the returned value of the ACL functioncurrent_doc.- Returns:
- The DOM Document object.
- Throws:
NumberFormatException- Raised if thedocIddoes not contain a parsable long.- Since:
- Epic 4.4
-
DOMDocument
Returns the DOM Document object corresponding to an Arbortext document ID. The desired document must be open in Editor or PE before calling this method, but the document does not need to be visible in a window. Developers can obtain the document identifier they need by using theevalmethod to call an ACL function such ascurrent_doc.- Parameters:
docId- The ACL document identifier of a document. If zero (0), the method uses the returned value of the ACL functioncurrent_doc.- Returns:
- The DOM Document object.
- Since:
- Epic 5.2
-
getWindow
Returns the AOMWindowobject corresponding to an Arbortext window ID. Developers can obtain the window identifier they need by using theevalmethod to call an ACL function such ascurrent_window.- Parameters:
winId- The ACL window identifier of a window. If zero (0), the method uses the returned value of the ACL functioncurrent_window.- Returns:
- The AOM Window object.
- Throws:
NumberFormatException- Raised if thewinIddoes not contain a parsable long.- Since:
- Epic 4.3
-
getWindow
Returns the AOMWindowobject corresponding to an Arbortext window ID. Developers can obtain the window identifier they need by using theevalmethod to call an ACL function such ascurrent_window.- Parameters:
winId- The ACL window identifier of a window. If zero (0), the method uses the returned value of the ACL functioncurrent_window.- Returns:
- The AOM Window object.
- Since:
- Epic 5.2
-
getDOMOID
Returns the DOM Node associated with the supplied ACL object identifieroid.
This method is useful for creating a DOM node object from a portion of a document instead of the entire document. The desired document must be open in Editor or PE before calling this method. The object identifieroidcan be obtained by using theevalmethod to call an ACL function such asoid_caret.- Parameters:
OIDString- The ACL object identifier.- Returns:
- The DOM Node object. If
OIDStringis invalid, returnsnull. - Since:
- Epic 3.0
-
DOMOID
Returns the DOM Node associated with the supplied ACL object identifieroid.
This method is useful for creating a DOM node object from a portion of a document instead of the entire document. The desired document must be open in Editor or PE before calling this method. The object identifieroidcan be obtained by using theevalmethod to call an ACL function such asoid_caret.
Alias of getDOMOID.- Parameters:
OIDString- The ACL object identifier.- Returns:
- The DOM Node object. If
OIDStringis invalid, returnsnull. - Since:
- Epic 3.0
-
execute
Executes a string as an ACL command. The return value varies depending on the interface.
Variable substitution in the expression string occurs on the ACL side of the AOM interface, not on the client side. You can include ACL variables in the expression string. However, do not include variables native to the client program.- Parameters:
command- The ACL command to execute.- Returns:
- This method always returns true.
- Throws:
AclException- SYNTAX_ERR: Raised if the command has syntax errors. RUNTIME_ERR: Raised if a problem occurred during executing the command.- Since:
- Epic 3.0
-
eval
Evaluates a string as an ACL expression and returns the result of the evaluation as a string. The string to evaluate must contain an expression. For example:2+2ortbl_oid_cell(oid_caret(),oid_caret_pos())
Variable substitution in the expression string occurs on the ACL side of the AOM interface, not on the client side. You can include ACL variables in the expression string. However, do not include variables native to the client program.- Parameters:
function- The ACL expression to evaluate.- Returns:
- The result of the evaluated expression as a string.
- Throws:
AclException- RUNTIME_ERR: Raised if a problem occurred during executing the function.- Since:
- Epic 3.0
-
escapeString
This generates a doubly-quoted string (") and escapes \, ", and $. This also escapes character whose value is less than 32. Escaping $ prevents a sequence like $p from being treated like a variable reference. Escaping low-valued characters avoids breaking a string onto multiple lines (in the case of a newline) which would cause it to fail in ACL. We purposefully avoid using a single-quote because, for example it is impossible to represent the single-character string \ as a single-quoted string.- Parameters:
value- String to quote.- Returns:
- Doubly-quoted string containing the given string.
-
func
A convenience method for theevalmethod that accepts an ACL function name and any number of arguments for the function and assembles the function name and the arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
A convenience method for theevalmethod that accepts an ACL function name for the function and assembles the function name and the "()" into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
A convenience method for theevalmethod that accepts an ACL function name and an argument for the function and assembles the function name and the argument into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
A convenience method for theevalmethod that accepts an ACL function name and two arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
A convenience method for theevalmethod that accepts an ACL function name and three arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
A convenience method for theevalmethod that accepts an ACL function name and four arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
public static String func(String name, String arg1, String arg2, String arg3, String arg4, String arg5) A convenience method for theevalmethod that accepts an ACL function name and five arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
public static String func(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6) A convenience method for theevalmethod that accepts an ACL function name and six arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
public static String func(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7) A convenience method for theevalmethod that accepts an ACL function name and seven arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
public static String func(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8) A convenience method for theevalmethod that accepts an ACL function name and eight arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
public static String func(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9) A convenience method for theevalmethod that accepts an ACL function name and nine arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
public static String func(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9, String arg10) A convenience method for theevalmethod that accepts an ACL function name and ten arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
public static String func(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9, String arg10, String arg11) A convenience method for theevalmethod that accepts an ACL function name and eleven arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
func
public static String func(String name, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8, String arg9, String arg10, String arg11, String arg12) A convenience method for theevalmethod that accepts an ACL function name and twelve arguments for the function and assembles the function name and arguments into a single string. Theevalmethod is then called with the string. This method returns the return value of theevalcall. -
getFirstOIDFromNode
Deprecated.As of Epic 4.0, replaced by getFirstOID in ANode.- See Also:
-
getLastOIDFromNode
Deprecated.As of Epic 4.0, replaced by getLastOID in ANode.- See Also:
-
getCMSObject
Returns aCMSObjectobject equivalent to the given ACL dobj id.- Parameters:
objectId- Represents a valid ACL object id.- Returns:
CMSObjectobject equivalent to the given ACL dobj id.nullwill be returned if the given ACL dobj id is invalid.- Throws:
NumberFormatException- Raised if theobjectIddoes not contain a parsable long.- Since:
- Epic 5.2
-
getCMSObject
Returns aCMSObjectobject equivalent to the given ACL dobj id.- Parameters:
objectId- Represents a valid ACL object id.- Returns:
CMSObjectobject equivalent to the given ACL dobj id.nullwill be returned if the given ACL dobj id is invalid.- Since:
- Epic 5.2
-
getCMSSession
Returns theCMSSessionobject associated with the given ACL session id.
This does not support the default (file-system) session id value of0.- Parameters:
sessionId- Represents an active ACL session id.- Returns:
- CMSSession object associated with the given ACL session id.
nullwill be returned if the given ACL session id is invalid. - Throws:
NumberFormatException- Raised if thesessionIddoes not contain a parsable long.- Since:
- Epic 5.2
-
getCMSSession
Returns theCMSSessionobject associated with the given ACL session id.
This does not support the default (file-system) session id value of0.- Parameters:
sessionId- Represents an active ACL session id.- Returns:
- CMSSession object associated with the given ACL session id.
nullwill be returned if the given ACL session id is invalid. - Since:
- Epic 5.2
-
getVar
Returns the value of an ACL scalar variable as a string.- Parameters:
name- The name of the ACL variable to retrieve. If the variable is not qualified with a package name, themainpackage is used.- Returns:
- The value of the specified ACL variable as a string.
- Since:
- Epic 5.2
-
setVar
Sets the value of an ACL scalar variable to the specified string.- Parameters:
name- The name of the ACL variable to set. If the variable is not qualified with a package name, themainpackage is used.value- The new value for the ACL variable. There are no size limits (beyond available memory) on the length of the string.- Throws:
AOMException- Since:
- Epic 5.2
-