public class RestVariableHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Set |
INTERNAL_PROPERTIES |
Constructor and Description |
---|
RestVariableHelper() |
Modifier and Type | Method and Description |
---|---|
void |
addTaskVariables(java.util.List result,
java.util.Map 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(java.lang.Object value) |
java.lang.String |
extractTypeStringFromValue(java.lang.Object value) |
protected java.lang.Object |
getAssociationRepresentation(java.lang.Object value,
org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef) |
protected org.alfresco.repo.workflow.WorkflowQNameConverter |
getQNameConverter() |
protected java.lang.String |
getRepresentationForNodeRef(java.lang.Object value,
org.alfresco.service.cmr.dictionary.ClassDefinition classDefinition) |
protected java.lang.Object |
getSafePropertyValue(java.lang.Object value) |
java.util.List |
getTaskVariables(java.util.Map localVariables,
java.util.Map globalVariables,
org.alfresco.service.cmr.dictionary.TypeDefinition startFormTypeDefinition,
org.alfresco.service.cmr.dictionary.TypeDefinition taskTypeDefinition) |
java.util.List |
getVariables(java.util.Map variables,
org.alfresco.service.cmr.dictionary.TypeDefinition typeDefinition) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
protected void |
setVariableValueAndType(Variable variable,
java.lang.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)
protected org.alfresco.repo.workflow.WorkflowQNameConverter getQNameConverter()
public java.util.List getTaskVariables(java.util.Map localVariables, java.util.Map 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.typeDefinition
- the typê definition for this task, used to extract types.TaskVariable
, representing the given raw variablespublic java.util.List getVariables(java.util.Map 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(java.util.List result, java.util.Map variables, TypeDefinitionContext context, VariableScope scope)
TaskVariable
s and adds them to the given result-list.protected void setVariableValueAndType(Variable variable, java.lang.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 java.lang.Object getAssociationRepresentation(java.lang.Object value, org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef)
protected java.lang.Object getSafePropertyValue(java.lang.Object value)
protected java.lang.String getRepresentationForNodeRef(java.lang.Object value, org.alfresco.service.cmr.dictionary.ClassDefinition classDefinition)
public org.alfresco.service.namespace.QName extractTypeFromValue(java.lang.Object value)
public java.lang.String extractTypeStringFromValue(java.lang.Object value)
Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.