public abstract class AbstractEngineClient
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_defaultURI |
protected java.lang.String |
_engineLogonName |
protected java.lang.String |
_engineLogonPassword |
protected java.lang.String |
_engineURI |
protected InterfaceA_EnvironmentBasedClient |
_interfaceAClient |
protected InterfaceB_EnvironmentBasedClient |
_interfaceBClient |
protected org.apache.logging.log4j.Logger |
_log |
protected java.lang.String |
_serviceName |
protected java.lang.String |
_serviceURI |
protected java.lang.String |
_sessionHandle |
protected static java.lang.String |
ADMIN_STR |
protected static java.lang.String |
FAIL_STR |
protected static java.lang.String |
SUCCESS_STR |
protected static java.lang.String |
WORKITEM_ERR |
Modifier | Constructor and Description |
---|---|
protected |
AbstractEngineClient(java.lang.String logonName,
java.lang.String password,
java.lang.String uri,
java.lang.String name)
Initialises the class.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addExternalClient(YExternalClient client) |
java.lang.String |
addRegisteredService(YAWLServiceReference service) |
boolean |
canAddNewInstance(WorkItemRecord wir) |
java.lang.String |
cancelCase(java.lang.String caseID) |
protected boolean |
connected()
Checks if there is a connection to the engine, and
if there isn't, attempts to connect
|
WorkItemRecord |
createNewWorkItemInstance(java.lang.String id,
java.lang.String value) |
boolean |
engineIsAvailable()
Check that the engine is contactable
|
protected java.lang.String |
fail(java.lang.String msg) |
java.lang.String |
getAdminUserPassword() |
java.util.List<WorkItemRecord> |
getAllLiveWorkItems() |
java.util.Set<java.lang.String> |
getAllRunningCaseIDs() |
XNode |
getAllRunningCases() |
java.lang.String |
getCaseData(java.lang.String caseID) |
java.lang.String |
getCases(YSpecificationID specID) |
java.lang.String |
getEngineBuildProperties() |
java.lang.String |
getEngineLogonName() |
java.lang.String |
getEngineLogonPassword() |
java.lang.String |
getEngineURI()
Gets the stored URI of the Engine
|
java.util.Set<YExternalClient> |
getExternalClients() |
java.lang.String |
getIABackendURI() |
java.util.List<WorkItemRecord> |
getLiveWorkItemsForCase(java.lang.String caseID) |
java.util.List<WorkItemRecord> |
getLiveWorkItemsForIdentifier(java.lang.String idType,
java.lang.String id) |
java.lang.String |
getMITaskAttributes(YSpecificationID specID,
java.lang.String taskID) |
protected Namespace |
getNamespace() |
java.util.Set<YAWLServiceReference> |
getRegisteredServices() |
java.lang.String |
getRegisteredServicesAsXML() |
java.lang.String |
getRunningCases(YSpecificationID specID) |
java.util.List<java.lang.String> |
getRunningCasesAsList(YSpecificationID specID) |
java.lang.String |
getServiceURI()
Gets the Service's URI, initialising it if necessary
|
protected java.lang.String |
getServiceURI(java.lang.String serviceName)
Gets the URI for a named service, as stored in the Engine
|
java.lang.String |
getSessionHandle() |
java.lang.String |
getSpecification(YSpecificationID specID) |
java.lang.String |
getSpecificationDataSchema(YSpecificationID specID) |
java.lang.String |
getTaskParamsAsXML(YSpecificationID specID,
java.lang.String taskID) |
java.util.List<WorkItemRecord> |
getWorkItemsForService() |
void |
initEngineURI(java.lang.String engineURI)
Called on servlet startup with the various uris needed to initialise the
various clients
|
boolean |
isAdminSession(java.lang.String sessionHandle)
returns true if the session specified is an admin session
|
boolean |
isRunningCaseID(java.lang.String caseID) |
java.lang.String |
launchCase(YSpecificationID specID,
java.lang.String caseData,
YLogDataItemList logList) |
java.lang.String |
launchCase(YSpecificationID specID,
java.lang.String caseData,
YLogDataItemList logList,
java.util.Date delay) |
java.lang.String |
launchCase(YSpecificationID specID,
java.lang.String caseData,
YLogDataItemList logList,
javax.xml.datatype.Duration delay) |
java.lang.String |
launchCase(YSpecificationID specID,
java.lang.String caseData,
YLogDataItemList logList,
long delay) |
void |
reestablishClients(InterfaceB_EnvironmentBasedClient client)
Reestablishes clients when the service restarts
|
java.lang.String |
removeExternalClient(java.lang.String id) |
java.lang.String |
removeRegisteredService(java.lang.String id) |
void |
setInterfaceBClient(InterfaceB_EnvironmentBasedClient client)
Assigns the IB client from InterfaceBWebsideController
|
void |
setServiceURI()
Sets the Service URI as read from that stored in the Engine
|
java.lang.String |
skipWorkItem(java.lang.String itemID) |
boolean |
successful(java.lang.String input) |
java.lang.String |
suspendWorkItem(java.lang.String itemID) |
java.lang.String |
unloadSpecification(YSpecificationID specID) |
java.lang.String |
unsuspendWorkItem(java.lang.String itemID) |
java.lang.String |
updateExternalClient(java.lang.String id,
java.lang.String password,
java.lang.String doco) |
java.lang.String |
uploadSpecification(java.lang.String fileContents,
java.lang.String fileName) |
protected java.lang.String _sessionHandle
protected java.lang.String _engineLogonName
protected java.lang.String _engineLogonPassword
protected java.lang.String _defaultURI
protected java.lang.String _serviceName
protected java.lang.String _serviceURI
protected java.lang.String _engineURI
protected InterfaceA_EnvironmentBasedClient _interfaceAClient
protected InterfaceB_EnvironmentBasedClient _interfaceBClient
protected static final java.lang.String ADMIN_STR
protected static final java.lang.String WORKITEM_ERR
protected static final java.lang.String SUCCESS_STR
protected static final java.lang.String FAIL_STR
protected org.apache.logging.log4j.Logger _log
protected AbstractEngineClient(java.lang.String logonName, java.lang.String password, java.lang.String uri, java.lang.String name)
logonName
- the service's logon name (from web.xml)password
- the service's logon password (from web.xml)public void setInterfaceBClient(InterfaceB_EnvironmentBasedClient client)
client
- an IB Client instancepublic java.lang.String getEngineLogonName()
public java.lang.String getEngineLogonPassword()
protected Namespace getNamespace()
public java.lang.String getEngineURI()
public void initEngineURI(java.lang.String engineURI)
engineURI
- the URI of the Engine's Interface Bpublic void reestablishClients(InterfaceB_EnvironmentBasedClient client)
client
- the Interface B client from InterfaceBWebsideControllerpublic void setServiceURI()
public java.lang.String getServiceURI()
protected java.lang.String getServiceURI(java.lang.String serviceName)
serviceName
- the name of the service to get the URI forpublic boolean engineIsAvailable()
protected boolean connected()
public java.lang.String getSessionHandle()
public boolean successful(java.lang.String input)
public boolean isAdminSession(java.lang.String sessionHandle)
public java.lang.String getEngineBuildProperties()
public java.util.Set<YAWLServiceReference> getRegisteredServices()
public java.lang.String getAdminUserPassword()
public java.lang.String uploadSpecification(java.lang.String fileContents, java.lang.String fileName)
public java.lang.String unloadSpecification(YSpecificationID specID) throws java.io.IOException
java.io.IOException
public java.lang.String getRegisteredServicesAsXML() throws java.io.IOException
java.io.IOException
public java.lang.String addRegisteredService(YAWLServiceReference service) throws java.io.IOException
java.io.IOException
public java.lang.String removeRegisteredService(java.lang.String id) throws java.io.IOException
java.io.IOException
public java.util.Set<YExternalClient> getExternalClients() throws java.io.IOException
java.io.IOException
public java.lang.String addExternalClient(YExternalClient client) throws java.io.IOException
java.io.IOException
public java.lang.String removeExternalClient(java.lang.String id) throws java.io.IOException
java.io.IOException
public java.lang.String updateExternalClient(java.lang.String id, java.lang.String password, java.lang.String doco) throws java.io.IOException
java.io.IOException
public java.lang.String getIABackendURI()
public java.util.List<WorkItemRecord> getWorkItemsForService() throws java.io.IOException
java.io.IOException
public java.lang.String suspendWorkItem(java.lang.String itemID) throws java.io.IOException
java.io.IOException
public java.lang.String unsuspendWorkItem(java.lang.String itemID) throws java.io.IOException
java.io.IOException
public java.lang.String skipWorkItem(java.lang.String itemID) throws java.io.IOException
java.io.IOException
public java.lang.String getRunningCases(YSpecificationID specID) throws java.io.IOException
java.io.IOException
public java.lang.String cancelCase(java.lang.String caseID) throws java.io.IOException
java.io.IOException
public java.lang.String getCases(YSpecificationID specID) throws java.io.IOException
java.io.IOException
public java.lang.String getCaseData(java.lang.String caseID) throws java.io.IOException
java.io.IOException
public java.lang.String getSpecificationDataSchema(YSpecificationID specID) throws java.io.IOException
java.io.IOException
public java.lang.String getSpecification(YSpecificationID specID) throws java.io.IOException
java.io.IOException
public java.lang.String getMITaskAttributes(YSpecificationID specID, java.lang.String taskID) throws java.io.IOException
java.io.IOException
public java.util.List<WorkItemRecord> getLiveWorkItemsForCase(java.lang.String caseID)
public java.util.List<WorkItemRecord> getLiveWorkItemsForIdentifier(java.lang.String idType, java.lang.String id) throws java.io.IOException, JDOMException
java.io.IOException
JDOMException
public java.util.List<WorkItemRecord> getAllLiveWorkItems() throws java.io.IOException
java.io.IOException
public java.lang.String launchCase(YSpecificationID specID, java.lang.String caseData, YLogDataItemList logList) throws java.io.IOException
java.io.IOException
public java.lang.String launchCase(YSpecificationID specID, java.lang.String caseData, YLogDataItemList logList, long delay) throws java.io.IOException
java.io.IOException
public java.lang.String launchCase(YSpecificationID specID, java.lang.String caseData, YLogDataItemList logList, java.util.Date delay) throws java.io.IOException
java.io.IOException
public java.lang.String launchCase(YSpecificationID specID, java.lang.String caseData, YLogDataItemList logList, javax.xml.datatype.Duration delay) throws java.io.IOException
java.io.IOException
public XNode getAllRunningCases()
public java.util.Set<java.lang.String> getAllRunningCaseIDs()
public boolean isRunningCaseID(java.lang.String caseID)
public java.util.List<java.lang.String> getRunningCasesAsList(YSpecificationID specID)
public java.lang.String getTaskParamsAsXML(YSpecificationID specID, java.lang.String taskID) throws java.io.IOException
java.io.IOException
public boolean canAddNewInstance(WorkItemRecord wir)
public WorkItemRecord createNewWorkItemInstance(java.lang.String id, java.lang.String value)
protected java.lang.String fail(java.lang.String msg)
Copyright © 2004-2014 The YAWL Foundation.