public class CostGatewayClient extends Interface_Client
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_costURI
the uri of the YAWL Cost Service
a default would be "http://localhost:8080/costService/gateway"
|
Constructor and Description |
---|
CostGatewayClient() |
CostGatewayClient(java.lang.String uri)
the constructors
|
Modifier and Type | Method and Description |
---|---|
double |
calculate(YSpecificationID specID,
java.lang.String caseID,
java.lang.String predicate,
java.lang.String handle) |
java.lang.String |
checkConnection(java.lang.String handle)
Check that a session handle is active
|
java.lang.String |
clearModels(YSpecificationID specID,
java.lang.String handle)
Clears all the cost model for a particular specification from the service
|
java.lang.String |
connect(java.lang.String userID,
java.lang.String password)
Connects an external entity to the cost service
|
void |
disconnect(java.lang.String handle)
Disconnects an external entity from the cost service
|
boolean |
evaluate(YSpecificationID specID,
java.lang.String caseID,
java.lang.String predicate,
java.lang.String handle) |
java.lang.String |
exportModel(YSpecificationID specID,
java.lang.String modelID,
java.lang.String handle)
Gets a cost model from the service
|
java.lang.String |
exportModels(YSpecificationID specID,
java.lang.String handle)
Gets the cost models for a specification from the service
|
java.lang.String |
getAnnotatedLog(YSpecificationID specID,
boolean withData,
java.lang.String handle) |
java.lang.String |
getFixedCosts(YSpecificationID specID,
java.lang.String taskName,
java.lang.String handle)
Gets an XML list of all the fixed costs for the specified specification - task
combination.
|
java.lang.String |
getFunctionList(YSpecificationID specID,
java.lang.String taskName,
java.lang.String handle)
Gets an XML list of all cost functions for the specified specification - task
combination.
|
java.lang.String |
getResourceCosts(YSpecificationID specID,
java.lang.String taskName,
java.util.Set<java.lang.String> resources,
java.lang.String handle) |
java.lang.String |
getResourceCosts(YSpecificationID specID,
java.lang.String taskName,
java.lang.String resources,
java.lang.String handle)
Gets the cost of performing an activity for each resource in a Set.
|
java.lang.String |
importModel(java.lang.String modelXML,
java.lang.String handle)
Loads a cost model into the service
|
java.lang.String |
importModels(java.lang.String modelsXML,
java.lang.String handle)
Loads a number of cost models into the service
|
java.lang.String |
removeModel(YSpecificationID specID,
java.lang.String modelID,
java.lang.String handle)
Removes a cost model from the service
|
void |
setURI(java.lang.String uri) |
executeGet, executePost, getReply, initPostConnection, prepareParamMap, send, setReadTimeout, stripOuterElement, successful
protected java.lang.String _costURI
public CostGatewayClient(java.lang.String uri)
uri
- the uri of the YAWL Cost Servicepublic CostGatewayClient()
public void setURI(java.lang.String uri)
public java.lang.String connect(java.lang.String userID, java.lang.String password) throws java.io.IOException
userID
- the useridpassword
- the corresponding passwordjava.io.IOException
- if the service can't be reachedpublic java.lang.String checkConnection(java.lang.String handle) throws java.io.IOException
handle
- the session handle to checkjava.io.IOException
- if the service can't be reachedpublic void disconnect(java.lang.String handle) throws java.io.IOException
handle
- the sessionHandle to disconnectjava.io.IOException
- if the service can't be reachedpublic java.lang.String importModel(java.lang.String modelXML, java.lang.String handle) throws java.io.IOException
modelXML
- the model to importhandle
- a current sessionHandle to the cost servicejava.io.IOException
public java.lang.String importModels(java.lang.String modelsXML, java.lang.String handle) throws java.io.IOException
modelsXML
- the set of models to import, represented as an set of valid
cost mode XML child elements contained within an outer element
called 'costmodels'handle
- a current sessionHandle to the cost servicejava.io.IOException
public java.lang.String exportModels(YSpecificationID specID, java.lang.String handle) throws java.io.IOException
specID
- the id of the specification to get the models forhandle
- a current sessionHandle to the cost servicejava.io.IOException
public java.lang.String exportModel(YSpecificationID specID, java.lang.String modelID, java.lang.String handle) throws java.io.IOException
specID
- the id of the specification to get the model formodelID
- the id of the model to gethandle
- a current sessionHandle to the cost servicejava.io.IOException
public java.lang.String removeModel(YSpecificationID specID, java.lang.String modelID, java.lang.String handle) throws java.io.IOException
specID
- the id of the specification to remove the model formodelID
- the id of the model to removehandle
- a current sessionHandle to the cost servicejava.io.IOException
public java.lang.String clearModels(YSpecificationID specID, java.lang.String handle) throws java.io.IOException
specID
- the id of the specification to remove the models forhandle
- a current sessionHandle to the cost servicejava.io.IOException
public java.lang.String getAnnotatedLog(YSpecificationID specID, boolean withData, java.lang.String handle) throws java.io.IOException
specID
- withData
- handle
- a current sessionhandle to the cost servicejava.io.IOException
public boolean evaluate(YSpecificationID specID, java.lang.String caseID, java.lang.String predicate, java.lang.String handle) throws java.io.IOException
java.io.IOException
public double calculate(YSpecificationID specID, java.lang.String caseID, java.lang.String predicate, java.lang.String handle) throws java.io.IOException
java.io.IOException
public java.lang.String getFunctionList(YSpecificationID specID, java.lang.String taskName, java.lang.String handle) throws java.io.IOException
specID
- the specification identifiertaskName
- the task identifier (may be null, in which case only the case level
functions are required)handle
- a current sessionhandle to the cost servicejava.io.IOException
- if there's a problem connecting to the servicepublic java.lang.String getFixedCosts(YSpecificationID specID, java.lang.String taskName, java.lang.String handle) throws java.io.IOException
specID
- the specification identifiertaskName
- the task identifier (may be null, in which case only the case level
costs are required)handle
- a current sessionhandle to the cost servicejava.io.IOException
- if there's a problem connecting to the servicepublic java.lang.String getResourceCosts(YSpecificationID specID, java.lang.String taskName, java.lang.String resources, java.lang.String handle) throws java.io.IOException
specID
- the specification identifiertaskName
- the task name (may be null, in which case only the case level
costs are required)resources
- an XML document containing participant idshandle
- a current sessionhandle to the cost servicejava.io.IOException
- if there's a problem connecting to the servicepublic java.lang.String getResourceCosts(YSpecificationID specID, java.lang.String taskName, java.util.Set<java.lang.String> resources, java.lang.String handle) throws java.io.IOException
specID
- the specification identifiertaskName
- the task nameresources
- the set of participant ids to get costs forhandle
- a current sessionhandle to the cost servicejava.io.IOException
Copyright © 2004-2014 The YAWL Foundation.