Class ScriptingOperationTypeImpl
- java.lang.Object
-
- org.nuxeo.automation.scripting.internals.ScriptingOperationTypeImpl
-
- All Implemented Interfaces:
OperationType
public class ScriptingOperationTypeImpl extends Object implements OperationType
- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field Description protected AutomationService
automation
protected ScriptingOperationDescriptor
desc
protected InvokableMethod
method
protected AutomationScriptingServiceImpl
scripting
-
Constructor Summary
Constructors Constructor Description ScriptingOperationTypeImpl(AutomationScriptingServiceImpl scripting, AutomationService automation, ScriptingOperationDescriptor desc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ScriptingOperationTypeImpl
clone()
boolean
equals(Object obj)
String[]
getAliases()
The operation ID Aliases array.String
getContributingComponent()
Gets the name of the component that contributed the operation.OperationDocumentation
getDocumentation()
String
getId()
String
getInputType()
The input type of a chain/operation.List<InvokableMethod>
getMethods()
InvokableMethod[]
getMethodsMatchingInput(Class<?> in)
AutomationService
getService()
Gets the service that registered that type.Class<?>
getType()
int
hashCode()
boolean
isEnabled()
void
merge(OperationType other)
Object
newInstance(OperationContext ctx, Map<String,Object> args)
protected static InvokableMethod
runMethod(ScriptingOperationTypeImpl op, String inputType)
Returns the rightrun
method according to whether the input type exists or not.
-
-
-
Field Detail
-
scripting
protected AutomationScriptingServiceImpl scripting
-
automation
protected AutomationService automation
-
desc
protected ScriptingOperationDescriptor desc
-
method
protected InvokableMethod method
-
-
Constructor Detail
-
ScriptingOperationTypeImpl
public ScriptingOperationTypeImpl(AutomationScriptingServiceImpl scripting, AutomationService automation, ScriptingOperationDescriptor desc)
-
-
Method Detail
-
getContributingComponent
public String getContributingComponent()
Description copied from interface:OperationType
Gets the name of the component that contributed the operation.- Specified by:
getContributingComponent
in interfaceOperationType
-
getDocumentation
public OperationDocumentation getDocumentation()
- Specified by:
getDocumentation
in interfaceOperationType
-
getId
public String getId()
- Specified by:
getId
in interfaceOperationType
-
getAliases
public String[] getAliases()
Description copied from interface:OperationType
The operation ID Aliases array.- Specified by:
getAliases
in interfaceOperationType
-
newInstance
public Object newInstance(OperationContext ctx, Map<String,Object> args) throws OperationException
- Specified by:
newInstance
in interfaceOperationType
- Throws:
OperationException
-
getType
public Class<?> getType()
- Specified by:
getType
in interfaceOperationType
-
getInputType
public String getInputType()
Description copied from interface:OperationType
The input type of a chain/operation. If set, the following input types {"document", "documents", "blob", "blobs"} for all 'run method(s)' will handled. Other values will be adapted as java.lang.Object. If not set, Automation will set the input type(s) as the 'run methods(s)' parameter types (by introspection).- Specified by:
getInputType
in interfaceOperationType
-
getService
public AutomationService getService()
Description copied from interface:OperationType
Gets the service that registered that type.- Specified by:
getService
in interfaceOperationType
-
getMethodsMatchingInput
public InvokableMethod[] getMethodsMatchingInput(Class<?> in)
- Specified by:
getMethodsMatchingInput
in interfaceOperationType
-
getMethods
public List<InvokableMethod> getMethods()
- Specified by:
getMethods
in interfaceOperationType
-
runMethod
protected static InvokableMethod runMethod(ScriptingOperationTypeImpl op, String inputType)
Returns the rightrun
method according to whether the input type exists or not.
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceOperationType
-
clone
public ScriptingOperationTypeImpl clone()
- Specified by:
clone
in interfaceOperationType
- Overrides:
clone
in classObject
-
merge
public void merge(OperationType other)
- Specified by:
merge
in interfaceOperationType
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceOperationType
- Overrides:
hashCode
in classObject
- Since:
- 2021.17
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceOperationType
- Overrides:
equals
in classObject
- Since:
- 2021.17
-
-