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