use of org.alfresco.repo.forms.processor.node.MockClassAttributeDefinition in project alfresco-repository by Alfresco.
the class WorkflowFormProcessorTest method makeTaskPropertyDefs.
private Map<QName, PropertyDefinition> makeTaskPropertyDefs() {
Map<QName, PropertyDefinition> properties = new HashMap<QName, PropertyDefinition>();
QName intType = DataTypeDefinition.INT;
MockClassAttributeDefinition priorityDef = MockClassAttributeDefinition.mockPropertyDefinition(PRIORITY_NAME, intType, "2");
properties.put(PRIORITY_NAME, priorityDef);
QName textType = DataTypeDefinition.TEXT;
// Add a Description property
PropertyDefinition descValue = MockClassAttributeDefinition.mockPropertyDefinition(DESC_NAME, textType);
properties.put(DESC_NAME, descValue);
// Add a Status property
PropertyDefinition titleValue = MockClassAttributeDefinition.mockPropertyDefinition(STATUS_NAME, textType);
properties.put(STATUS_NAME, titleValue);
// Add a Status property
PropertyDefinition with_ = MockClassAttributeDefinition.mockPropertyDefinition(PROP_WITH_, textType);
properties.put(PROP_WITH_, with_);
// Add a Package Action property
QName pckgActionGroup = PROP_PACKAGE_ACTION_GROUP;
PropertyDefinition pckgAction = MockClassAttributeDefinition.mockPropertyDefinition(pckgActionGroup, textType, "add_package_item_actions");
properties.put(pckgActionGroup, pckgAction);
// Add a Package Action property
QName pckgItemActionGroup = PROP_PACKAGE_ITEM_ACTION_GROUP;
PropertyDefinition pckgItemAction = MockClassAttributeDefinition.mockPropertyDefinition(pckgItemActionGroup, textType, "start_package_item_actions");
properties.put(pckgItemActionGroup, pckgItemAction);
return properties;
}
use of org.alfresco.repo.forms.processor.node.MockClassAttributeDefinition in project alfresco-repository by Alfresco.
the class FormProcessorTest method makeTaskAssociationDefs.
protected Map<QName, AssociationDefinition> makeTaskAssociationDefs() {
Map<QName, AssociationDefinition> associations = new HashMap<QName, AssociationDefinition>();
QName actorName = QName.createQName(NamespaceService.BPM_MODEL_1_0_URI, "Actor");
// Add Assigneee association
MockClassAttributeDefinition assigneeDef = MockClassAttributeDefinition.mockAssociationDefinition(ASSIGNEE_NAME, actorName);
associations.put(ASSIGNEE_NAME, assigneeDef);
// Add Assigneee association
MockClassAttributeDefinition actorsDef = MockClassAttributeDefinition.mockAssociationDefinition(ACTORS_NAME, actorName);
associations.put(ACTORS_NAME, actorsDef);
// Add association with _
MockClassAttributeDefinition with_ = MockClassAttributeDefinition.mockAssociationDefinition(ASSOC_WITH_, actorName);
associations.put(ASSOC_WITH_, with_);
return associations;
}
Aggregations