public class RestVariableHelper extends Object
Modifier and Type | Field and Description |
---|---|
static Set<String> |
INTERNAL_PROPERTIES |
Constructor and Description |
---|
RestVariableHelper() |
Modifier and Type | Method and Description |
---|---|
void |
addTaskVariables(List<TaskVariable> result,
Map<String,Object> variables,
TypeDefinitionContext context,
VariableScope scope)
Converts the raw variables to
TaskVariable s and adds them to the given result-list. |
org.alfresco.service.namespace.QName |
extractTypeFromValue(Object value) |
String |
extractTypeStringFromValue(Object value) |
protected Object |
getAssociationRepresentation(Object value,
org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef) |
protected WorkflowQNameConverter |
getQNameConverter() |
protected String |
getRepresentationForNodeRef(Object value,
org.alfresco.service.cmr.dictionary.ClassDefinition classDefinition) |
protected Object |
getSafePropertyValue(Object value) |
List<TaskVariable> |
getTaskVariables(Map<String,Object> localVariables,
Map<String,Object> globalVariables,
org.alfresco.service.cmr.dictionary.TypeDefinition startFormTypeDefinition,
org.alfresco.service.cmr.dictionary.TypeDefinition taskTypeDefinition) |
List<Variable> |
getVariables(Map<String,Object> variables,
org.alfresco.service.cmr.dictionary.TypeDefinition typeDefinition) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
protected void |
setVariableValueAndType(Variable variable,
Object value,
TypeDefinitionContext context)
Sets the variable value with possible conversion to the correct format to be used in the response and sets
the type accordingly.
|
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
protected WorkflowQNameConverter getQNameConverter()
public List<TaskVariable> getTaskVariables(Map<String,Object> localVariables, Map<String,Object> globalVariables, org.alfresco.service.cmr.dictionary.TypeDefinition startFormTypeDefinition, org.alfresco.service.cmr.dictionary.TypeDefinition taskTypeDefinition)
localVariables
- raw local task variables, can be null.globalVariables
- raw global taks variables, can be null.startFormTypeDefinition
- TypeDefinitiontaskTypeDefinition
- the typê definition for this task, used to extract types.TaskVariable
, representing the given raw variablespublic List<Variable> getVariables(Map<String,Object> variables, org.alfresco.service.cmr.dictionary.TypeDefinition typeDefinition)
variables
- raw variablestypeDefinition
- the typê definition for the start-task of the process, used to extract types.Variable
, representing the given raw variablespublic void addTaskVariables(List<TaskVariable> result, Map<String,Object> variables, TypeDefinitionContext context, VariableScope scope)
TaskVariable
s and adds them to the given result-list.protected void setVariableValueAndType(Variable variable, Object value, TypeDefinitionContext context)
TypeDefinition
, the data-type is used. If it's not
defined, the type is deducted from the raw variable value.protected Object getAssociationRepresentation(Object value, org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef)
protected String getRepresentationForNodeRef(Object value, org.alfresco.service.cmr.dictionary.ClassDefinition classDefinition)
public org.alfresco.service.namespace.QName extractTypeFromValue(Object value)
Copyright © 2005–2017 Alfresco Software. All rights reserved.