|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AutomationService
Service providing an operation registry and operation execution methods. The operation registry is thread safe and optimized for lookups. Progress monitor for asynchronous executions is not yet implemented.
Method Summary | ||
---|---|---|
CompiledChain |
compileChain(java.lang.Class<?> inputType,
OperationChain chain)
Builds the operation chain given a context. |
|
CompiledChain |
compileChain(java.lang.Class<?> inputType,
OperationParameters... chain)
Same as previous but takes an array of operation parameters |
|
|
getAdaptedValue(OperationContext ctx,
java.lang.Object toAdapt,
java.lang.Class<?> targetType)
Adapts an object to a target type if possible otherwise throws an exception. |
|
java.util.List<OperationDocumentation> |
getDocumentation()
Generates a documentation model for all registered operations. |
|
OperationType |
getOperation(java.lang.String id)
Gets an operation type given its ID. |
|
OperationChain |
getOperationChain(java.lang.String id)
Gets a registered operation chain. |
|
java.util.List<OperationChain> |
getOperationChains()
Gets a list of all registered chains |
|
OperationType[] |
getOperations()
Gets all operation types that was registered. |
|
TypeAdapter |
getTypeAdapter(java.lang.Class<?> accept,
java.lang.Class<?> produce)
Gets a type adapter for the input type accept and the output type produce. |
|
boolean |
isTypeAdaptable(java.lang.Class<?> typeToAdapt,
java.lang.Class<?> targetType)
Checks whether or not the given type is adaptable into the target type. |
|
void |
putOperation(java.lang.Class<?> type)
Registers an operation given its class. |
|
void |
putOperation(java.lang.Class<?> type,
boolean replace)
Registers an operation given its class. |
|
void |
putOperationChain(OperationChain chain)
Registers a parametrized operation chain. |
|
void |
putOperationChain(OperationChain chain,
boolean replace)
Registers a parametrized operation chain. |
|
void |
putTypeAdapter(java.lang.Class<?> accept,
java.lang.Class<?> produce,
TypeAdapter adapter)
Registers a new type adapter that can adapt an instance of the accepted type into one of the produced type. |
|
void |
removeOperation(java.lang.Class<?> key)
Removes an operation given its class. |
|
void |
removeOperationChain(java.lang.String id)
Removes a registered operation chain given its ID. |
|
void |
removeTypeAdapter(java.lang.Class<?> accept,
java.lang.Class<?> produce)
Removes a type adapter |
|
java.lang.Object |
run(OperationContext ctx,
OperationChain chain)
Builds and runs the operation chain given a context. |
|
java.lang.Object |
run(OperationContext ctx,
java.lang.String chainId)
Same as previous but for managed chains identified by an ID. |
Method Detail |
---|
void putOperation(java.lang.Class<?> type) throws OperationException
Operation
annotation. If an operation having the
same ID exists an exception will be thrown.
OperationException
void putOperation(java.lang.Class<?> type, boolean replace) throws OperationException
Operation
annotation. If the
replace
argument is true then any existing operation
having the same ID will replaced with this one.
OperationException
void removeOperation(java.lang.Class<?> key)
OperationType[] getOperations()
OperationType getOperation(java.lang.String id) throws OperationNotFoundException
OperationNotFoundException
CompiledChain compileChain(java.lang.Class<?> inputType, OperationChain chain) throws java.lang.Exception, InvalidChainException
InvalidChainException
is thrown.
The returned object can be used to run the chain.
java.lang.Exception
InvalidChainException
CompiledChain compileChain(java.lang.Class<?> inputType, OperationParameters... chain) throws java.lang.Exception, InvalidChainException
java.lang.Exception
InvalidChainException
java.lang.Object run(OperationContext ctx, OperationChain chain) throws java.lang.Exception, InvalidChainException
InvalidChainException
is thrown.
java.lang.Exception
InvalidChainException
java.lang.Object run(OperationContext ctx, java.lang.String chainId) throws java.lang.Exception, InvalidChainException
java.lang.Exception
InvalidChainException
void putOperationChain(OperationChain chain) throws OperationException
run
and passing the chain ID. If a chain
having the same ID exists an exception is thrown
OperationException
void putOperationChain(OperationChain chain, boolean replace) throws OperationException
run
and passing the chain ID. If the
replace attribute is true then any chain already registered under the
same id will be replaced otherwise an exception is thrown.
OperationException
void removeOperationChain(java.lang.String id)
OperationChain getOperationChain(java.lang.String id) throws OperationNotFoundException
OperationNotFoundException
java.util.List<OperationChain> getOperationChains()
void putTypeAdapter(java.lang.Class<?> accept, java.lang.Class<?> produce, TypeAdapter adapter)
void removeTypeAdapter(java.lang.Class<?> accept, java.lang.Class<?> produce)
TypeAdapter getTypeAdapter(java.lang.Class<?> accept, java.lang.Class<?> produce)
<T> T getAdaptedValue(OperationContext ctx, java.lang.Object toAdapt, java.lang.Class<?> targetType) throws java.lang.Exception
java.lang.Exception
boolean isTypeAdaptable(java.lang.Class<?> typeToAdapt, java.lang.Class<?> targetType)
This is a shortcut to
getTypeAdapter(typeToAdapt, targetType) != null
java.util.List<OperationDocumentation> getDocumentation()
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |