public class OwMappingUtils extends Object
Static class with utility functions to create mappings and read mappings from XML.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Field and Description |
---|---|
static int |
AUTO_SELECT_CLASS
direction attribute used in getObjectClassMap
|
static int |
AUTO_SELECT_FOLDER
direction attribute used in getObjectClassMap
|
static int |
EMPTY_MAPPING
direction attribute used in getObjectClassMap
|
Constructor and Description |
---|
OwMappingUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
getObjectClassMap(OwXMLUtil confignode_p,
Map objectclassmap_p)
Compute a Map of object class - subfolder mappings
reads the ObjectClassMapping section in the plugin descriptor
List of object class mappings to be used.
|
static Map |
getParameterMapValuesFromObject(OwXMLUtil confignode_p,
OwObject sourceObject_p,
String mappingElementName_p)
Compute a Map of values derived from the parent and to be set in advance in the new object
reads the ParameterMapping section in the plugin descriptor
Each Parameter from the Parent Object is set to the parameter in the new Object
Example: Instruction: Name=Customer.Name The Parameter Name in the new object gets the value of the Parameter Customer.Name in the Parent object where Customer is a Object Reference Property and Name is the property of that reference. |
static Map |
getParameterMapValuesFromRecord(OwXMLUtil confignode_p,
OwObject rootObject_p,
OwObject folderObject_p)
Compute a Map of values derived from the parent and to be set in advance in the new object,
reads the ParameterMapping section in the plugin descriptor.
|
public static final int EMPTY_MAPPING
public static final int AUTO_SELECT_CLASS
public static final int AUTO_SELECT_FOLDER
public static Map getParameterMapValuesFromRecord(OwXMLUtil confignode_p, OwObject rootObject_p, OwObject folderObject_p) throws Exception
confignode_p
- OwXMLUtil plugin configuration noderootObject_p
- the Parent OwObject where to create the object and derive the properties fromfolderObject_p
- the folder to look up the properties if not found look up in rootObject_pException
public static Map getParameterMapValuesFromObject(OwXMLUtil confignode_p, OwObject sourceObject_p, String mappingElementName_p) throws Exception
confignode_p
- OwXMLUtil plugin configuration nodesourceObject_p
- the folder to look up the properties if not found look up in rootObject_pException
public static int getObjectClassMap(OwXMLUtil confignode_p, Map objectclassmap_p) throws Exception
confignode_p
- OwXMLUtil plugin configuration nodeobjectclassmap_p
- Map which will be filled with object class mappings
depending on directionflag (see return value)
keys and values are:
AUTO_SELECT_CLASS: Key is the subfolder path
and value is the object class.
AUTO_SELECT_FOLDER: Key is the objectclass
and value is the subfolderpath.Exception
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.