Package com.arbortext.e3c
Class ClientComposer
java.lang.Object
com.arbortext.e3c.ClientComposer
Java object that manages E3 composition for Epic Editor.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose()Called exit_editor_hook in initrtns.cpp to terminate our storage.Entry point for both synchronous and asynchronous composition.static ClientComposerGet singleton instance, allocating if necesary.Returns a map containing parameters for use by the ACL routine compose::callPostProcessorForE3().Returns the absolute path to our working directoryhandleResponse(com.arbortext.e3.client.E3ResponseInterface response, Map<String, String> parameters, E3Tracer tracer) Decodes a response returned by the PE server.handleResponse(com.arbortext.e3.client.E3ResponseInterface response, Map<String, String> parameters, List<String> missingGraphicWarnings, E3Tracer tracer) Decodes a response returned by the PE server.static voidlogAsynchronousError(String msg, String interactive) Appends an error message to the composerlog stanza associated with the current operation.normalizeOpenDocument(String pName, String aclId, com.arbortext.e3c.ClientComposer.DocOptions options, File inputDir, String graphDir, String graphicTransform, List<String> missingGraphicWarnings, E3Tracer tracer) Writes a flattened version of an open Arbortext Editor document to the input directory (the directory that will be zipped and transmitted to the PE server).static StringpopMissingGraphicWarning(String listKey) Retrieves a 'missing graphic' warning message from the global list and returns it.static voidprocessComposerLog(String jarName, String interString) Looks for a composerlog.xml in the given response and, if present, extracts the records and inserts them into the current client-side composerlog associated with this compose.static intLoads a 'missing graphic' warning messages into global storage.static voidsetDeleteCompDirs(boolean newValue) Stores a new value for 'deleteCompDirs'static voidsetDeleteWorkDir(boolean newValue) Stores a new value for 'deleteWorkDir'static voidsetTraceFile(boolean newValue) Stores a new value for 'traceFile'static voidsetTraceLevel(int newValue) Stores a new value for 'traceLevel'static voidsetTraceSystem(boolean newValue) Stores a new value for 'traceSystem'
-
Field Details
-
QUEUE_NAME
queue name- See Also:
-
-
Method Details
-
getInstance
Get singleton instance, allocating if necesary.- Returns:
- client composer instance
- Throws:
IOException
-
close
public static void close()Called exit_editor_hook in initrtns.cpp to terminate our storage. -
compose
Entry point for both synchronous and asynchronous composition. Either calls 'doCompose' directly or starts a thread to call 'doCompose' in the background.- Parameters:
parameters- associative parameter array; some parameters control 'doCompose' operation, some are passed to E3.types- associative parameter type array; indicates the type of each parameter in 'parameters'.- Returns:
- "ok" if the operation is synchronous and succeeds; "async" if the operation is asynchronous; else returns an error message
-
getPostProcessorParameters
Returns a map containing parameters for use by the ACL routine compose::callPostProcessorForE3().- Returns:
Mapof string name/value pairs
-
handleResponse
public String handleResponse(com.arbortext.e3.client.E3ResponseInterface response, Map<String, String> parameters, E3Tracer tracer) throws ExceptionDecodes a response returned by the PE server.- Parameters:
response- response to processparameters- composition parameterstracer- log object- Returns:
- "OK" if operation succeeded, or an error message
- Throws:
Exception- upon error
-
handleResponse
public String handleResponse(com.arbortext.e3.client.E3ResponseInterface response, Map<String, String> parameters, List<String> missingGraphicWarnings, E3Tracer tracer) throws ExceptionDecodes a response returned by the PE server.- Parameters:
response- response to processparameters- composition parametersmissingGraphicWarnings- list of warnings accumulated before the document was transmitted to PEtracer- log object- Returns:
- "OK" if operation succeeded, or an error message
- Throws:
Exception- upon error
-
getWorkDir
Returns the absolute path to our working directory- Returns:
- String containing work directory path
-
logAsynchronousError
Appends an error message to the composerlog stanza associated with the current operation.Called after an asynchronous call do do_compose() fails; called through ACL java_static() so that this code runs on the main Epic thread.
- Parameters:
msg- message to append.interactive- "1" if we were ultimately called by the GUI, "0" otherwise
-
normalizeOpenDocument
public String normalizeOpenDocument(String pName, String aclId, com.arbortext.e3c.ClientComposer.DocOptions options, File inputDir, String graphDir, String graphicTransform, List<String> missingGraphicWarnings, E3Tracer tracer) throws Exception Writes a flattened version of an open Arbortext Editor document to the input directory (the directory that will be zipped and transmitted to the PE server).May also copy graphics or insert _graphic_data PIs, insert location PIs, or translate 3D graphics to 2D.
- Parameters:
pName- parameter name (for error messages)aclId- ACL document IDoptions-DocOptionsobject specifying graphic handling and other special stuffinputDir- directory that will be zipped and sent to the PE servergraphDir- directory to which we should copy graphics (null to copy to doc_cache_dir())graphicTransform- rules for transforming graphicsmissingGraphicWarnings- accumulate warnings heretracer- Trace object- Returns:
- tempDir-relative path to file we write
- Throws:
Exception- upon error
-
processComposerLog
Looks for a composerlog.xml in the given response and, if present, extracts the records and inserts them into the current client-side composerlog associated with this compose. NOTE: most of the tracing output below is to help me figure out the reason this routine causes wierd Unix crashes in asynchronous mode. I'll remove it later. (kbosley, 10/23/2003)- Parameters:
jarName- name of the .jar we got back from E3interString- 1 if we're running asynchronously
-
popMissingGraphicWarning
Retrieves a 'missing graphic' warning message from the global list and returns it.- Parameters:
listKey- key identifying the list to return- Returns:
- message or "" if list is empty
-
queueMissingGraphicWarning
Loads a 'missing graphic' warning messages into global storage.- Parameters:
msg- message to load- Returns:
- 1 for success, 0 for drror
-
setDeleteCompDirs
public static void setDeleteCompDirs(boolean newValue) Stores a new value for 'deleteCompDirs'- Parameters:
newValue- value to set
-
setDeleteWorkDir
public static void setDeleteWorkDir(boolean newValue) Stores a new value for 'deleteWorkDir'- Parameters:
newValue- value to set
-
setTraceFile
public static void setTraceFile(boolean newValue) Stores a new value for 'traceFile'- Parameters:
newValue- value to set
-
setTraceLevel
public static void setTraceLevel(int newValue) Stores a new value for 'traceLevel'- Parameters:
newValue- value to set
-
setTraceSystem
public static void setTraceSystem(boolean newValue) Stores a new value for 'traceSystem'- Parameters:
newValue- value to set
-