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 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
protected String
getParamDocumentationType(Class<?> type)
protected String
getParamDocumentationType(Class<?> type, boolean isIterable)
AutomationService
getService()
Gets the service that registered that type.Class<?>
getType()
protected void
initFields()
protected void
initMethods()
void
inject(OperationContext ctx, Map<String,?> args, Object target)
Object
newInstance(OperationContext ctx, Map<String,Object> args)
protected Object
resolveObject(OperationContext ctx, String key, Map<String,?> args)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.automation.OperationType
equals, hashCode
-
-
-
-
Field Detail
-
service
protected final AutomationService service
The service that registered the operation
-
params
protected final Map<String,Field> params
Injectable parameters. a map between the parameter name and the Field object
-
methods
protected List<InvokableMethod> methods
Invocable methods
-
injectableFields
protected List<Field> injectableFields
Fields that should be injected from context
-
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
-
-
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)
-
getParamDocumentationType
protected String getParamDocumentationType(Class<?> type, boolean isIterable)
-
getMethods
public List<InvokableMethod> getMethods()
- Specified by:
getMethods
in interfaceOperationType
- Since:
- 5.7.2
-
-