|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.wsspi.wim.GenericHelper
public class GenericHelper
This class contains utility methods to be used by virtual member manager adapter and plugin providers.
Field Summary | |
---|---|
static java.lang.String |
DO_FIRST_ENTITY
The XPATH string constant for first entity in the "entities" DataObject. |
static java.lang.String |
EXTERNAL_ID_PATH
The XPATH string constant for externalId. |
static java.lang.String |
EXTERNAL_NAME_PATH
The XPATH string constant for externalName. |
static java.util.List |
IDENTIFIER_REF
The list containing SchemaConstants.DO_IDENTIFIER as the reference property. |
static java.lang.String |
UNIQUE_ID_PATH
The XPATH string constant for uniqueId. |
static java.lang.String |
UNIQUE_NAME_PATH
The XPATH string constant for uniqueName. |
static java.lang.String |
WILDCARD
The string constant for wild card. |
Constructor Summary | |
---|---|
GenericHelper()
|
Method Summary | |
---|---|
static void |
checkLoginAccountReadOnlyProperties(java.lang.String type,
commonj.sdo.DataObject entity,
java.lang.String propName,
java.lang.String repositoryId)
For LoginAccount and its subclass types, check that principalName and
realm is not set for create() and update() APIs. |
static void |
copyAllPropsOfDataObject(commonj.sdo.DataObject destDO,
commonj.sdo.DataObject srcDO)
Copy all properties (including reference properties) from source dataobject to destination dataobject. |
static void |
copyDataObject(commonj.sdo.DataObject destDO,
commonj.sdo.DataObject srcDO,
java.util.List props,
java.util.List refs,
java.lang.String mappedPrincipalNameProperty,
boolean mappedPrincipalNamePropertyMultiValued,
java.lang.String repositoryId)
Copy selected properties from one dataobject to another. |
static void |
copyIdentifierDataObject(commonj.sdo.DataObject destDO,
commonj.sdo.DataObject srcDO)
Copy the identifier dataobject from source dataobject to destination dataobject. |
static commonj.sdo.DataObject |
createDataObject(commonj.sdo.DataObject parentDO,
java.lang.String propertyName,
java.lang.String prefixedTypeName)
Returns a new data object contained by the given parent dataobject using the specified property, which must be a containment property. |
static java.util.Map |
getControlMap(commonj.sdo.DataObject root)
Returns the control dataobjects set in the root dataobject. |
static java.lang.String |
getIdentifierString(commonj.sdo.DataObject entity)
Returns the entity identifier in a string format (for tracing). |
static java.lang.String |
getNewUniqueName(java.lang.String type,
commonj.sdo.DataObject entity,
java.lang.String uniqueName)
Builds the uniqueName of an entity, compares with the old uniqueName and returns the new uniqueName if it has changed. |
static boolean |
isDN(java.lang.String value)
Determines whether the specified value is a valid Distinguished Name. |
static void |
saveDataGraphToFile(commonj.sdo.DataGraph entityDG,
java.lang.String fileName)
Save the DataGraph to a file. |
static void |
validateNestingLevel(commonj.sdo.DataObject control,
java.lang.String controlType)
Validate the nesting level in control dataobjects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String UNIQUE_ID_PATH
public static final java.lang.String UNIQUE_NAME_PATH
public static final java.lang.String EXTERNAL_ID_PATH
public static final java.lang.String EXTERNAL_NAME_PATH
public static final java.lang.String DO_FIRST_ENTITY
public static final java.lang.String WILDCARD
public static final java.util.List IDENTIFIER_REF
Constructor Detail |
---|
public GenericHelper()
Method Detail |
---|
public static boolean isDN(java.lang.String value)
value
- A string value.public static java.lang.String getNewUniqueName(java.lang.String type, commonj.sdo.DataObject entity, java.lang.String uniqueName) throws WIMException
type
- entity typeentity
- entity dataobjectuniqueName
- old unique name
WIMException
public static void copyIdentifierDataObject(commonj.sdo.DataObject destDO, commonj.sdo.DataObject srcDO) throws WIMException
destDO
- Destination dataobject.srcDO
- Source dataobject.
WIMException
public static void copyAllPropsOfDataObject(commonj.sdo.DataObject destDO, commonj.sdo.DataObject srcDO) throws WIMException
destDO
- Destination dataobject.srcDO
- Source dataobject.
WIMException
public static void copyDataObject(commonj.sdo.DataObject destDO, commonj.sdo.DataObject srcDO, java.util.List props, java.util.List refs, java.lang.String mappedPrincipalNameProperty, boolean mappedPrincipalNamePropertyMultiValued, java.lang.String repositoryId) throws WIMException
destDO
- destination dataobject to which the properties are copied.srcDO
- source dataobject from which the properties are copied.props
- List of properties to be copied. If null or empty, no props
is copied. If not empty, properties in this list are copied.
If prop name is *, all properties are copied except operational
properties. Operational properties must be specified to be
returned.refs
- List of references(like, parent, member, etc) to be copied.
If null or empty, no reference is copied. If not empty,
references in this list are copied. If reference name is *, all
references are copied.mappedPrincipalNameProperty
- property name to which the principalName
property of LoginAccount is mapped. If not null, principalName
property is set in the destDO. The value(s) of the principalName
property will be same as the value of the mapped property.mappedPrincipalNamePropertyMultiValued
- boolean indicating whether
principalName
property is multi-valued. If true and
mappedPrincipalNameProperty is set, all the values of mapped
property will be set in the destDO.repositoryId
- repository identifier. if not null, repository id will be set in
the identifier dataobject of the destDO.
WIMException
public static commonj.sdo.DataObject createDataObject(commonj.sdo.DataObject parentDO, java.lang.String propertyName, java.lang.String prefixedTypeName)
parentDO
- the parent dataobject under which this dataobject will be created.propertyName
- the name of the specified containment property.prefixedTypeName
- the prefixed type name with "public static void checkLoginAccountReadOnlyProperties(java.lang.String type, commonj.sdo.DataObject entity, java.lang.String propName, java.lang.String repositoryId) throws UpdatePropertyException
principalName
and
realm
is not set for create() and update() APIs. These are read only properties.
type
- entity type.entity
- entity dataobject.propName
- property name.repositoryId
- repository identifier.
UpdatePropertyException
- if the principalName
or realm
property is set.public static void validateNestingLevel(commonj.sdo.DataObject control, java.lang.String controlType) throws InvalidArgumentException
control
- control dataobjectcontrolType
- type of control dataobject
InvalidArgumentException
- if SchemaConstants.PROP_LEVEL is less than 0.public static java.util.Map getControlMap(commonj.sdo.DataObject root)
root
- Root dataobject.public static java.lang.String getIdentifierString(commonj.sdo.DataObject entity)
public static void saveDataGraphToFile(commonj.sdo.DataGraph entityDG, java.lang.String fileName) throws WIMApplicationException
entityDG
- entity datagraph.fileName
- full path of the file.
WIMApplicationException
- if the DataGraph save fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |