Class OperationTypeImpl
- java.lang.Object
-
- org.nuxeo.ecm.automation.core.impl.OperationTypeImpl
-
- All Implemented Interfaces:
OperationType
public class OperationTypeImpl extends Object implements OperationType
- Author:
- Bogdan Stefanescu, Guillaume Renard
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]
aliases
The operation ID Aliases array.protected String
contributingComponent
protected boolean
enabled
protected String
id
The operation ID - used for lookups.protected List<Field>
injectableFields
Fields that should be injected from contextprotected String
inputType
The input type of a chain/operation.protected List<InvokableMethod>
methods
Invocable methodsprotected Map<String,Field>
params
Injectable parameters.protected AutomationService
service
The service that registered the operationprotected Class<?>
type
The operation typeprotected List<WidgetDefinition>
widgetDefinitionList
-
Constructor Summary
Constructors Constructor Description OperationTypeImpl(AutomationService service, Class<?> type)
OperationTypeImpl(AutomationService service, Class<?> type, String contributingComponent)
OperationTypeImpl(AutomationService service, Class<?> type, String contributingComponent, List<WidgetDefinition> widgetDefinitionList)
-
Method Summary
-
-
-
Field Detail
-
service
protected AutomationService service
The service that registered the operation
-
id
protected String id
The operation ID - used for lookups.
-
aliases
protected String[] aliases
The operation ID Aliases array.- Since:
- 7.1
-
type
protected Class<?> type
The operation type
-
params
protected Map<String,Field> params
Injectable parameters. a map between the parameter name and the Field object
-
methods
protected List<InvokableMethod> methods
Invocable methods
-
inputType
protected String inputType
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).- Since:
- 7.4
-
contributingComponent
protected String contributingComponent
-
widgetDefinitionList
protected List<WidgetDefinition> widgetDefinitionList
-
enabled
protected boolean enabled
- Since:
- 2021.17
-
-
Constructor Detail
-
OperationTypeImpl
public OperationTypeImpl(AutomationService service, Class<?> type)
-
OperationTypeImpl
public OperationTypeImpl(AutomationService service, Class<?> type, String contributingComponent)
-
OperationTypeImpl
public OperationTypeImpl(AutomationService service, Class<?> type, String contributingComponent, List<WidgetDefinition> widgetDefinitionList)
- Since:
- 5.9.5
-
-
Method Detail
-
getService
public AutomationService getService()
Description copied from interface:OperationType
Gets the service that registered that type.- Specified by:
getService
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
-
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
-
initMethods
protected void initMethods()
-
initFields
protected void initFields()
-
newInstance
public Object newInstance(OperationContext ctx, Map<String,Object> args) throws OperationException
- Specified by:
newInstance
in interfaceOperationType
- Throws:
OperationException
-
resolveObject
protected Object resolveObject(OperationContext ctx, String key, Map<String,?> args)
- Since:
- 5.9.2
-
inject
public void inject(OperationContext ctx, Map<String,?> args, Object target) throws OperationException
- Throws:
OperationException
-
getMethodsMatchingInput
public InvokableMethod[] getMethodsMatchingInput(Class<?> in)
- Specified by:
getMethodsMatchingInput
in interfaceOperationType
-
getDocumentation
public OperationDocumentation getDocumentation()
- Specified by:
getDocumentation
in interfaceOperationType
-
getContributingComponent
public String getContributingComponent()
Description copied from interface:OperationType
Gets the name of the component that contributed the operation.- Specified by:
getContributingComponent
in interfaceOperationType
-
getParamDocumentationType
protected String getParamDocumentationType(Class<?> type, boolean isIterable)
-
getMethods
public List<InvokableMethod> getMethods()
- Specified by:
getMethods
in interfaceOperationType
- Since:
- 5.7.2
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceOperationType
-
clone
public OperationTypeImpl 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
-
-