IdMgrDataModel (AdminTask)
We can use the Jython or Jacl scripting language to manage the federated repository schema . Use commands in the IdMgrDataModel group to manage the property extension repository. The commands are available in connected or local mode using the -conntype NONE option.
addIdMgrPropertyToEntityTypes
Add a new property to one or more existing entity types with specified parameters.
Target Object None.
Required parameters
- -name
- Name of the new property added to one or more existing entity types.
(String, required)
- -dataType
- Data type of the property. (String, required)
- The default supported data types are:
- String
- Int
- Boolean
- Long
- Double
- Base64binary
- AnySimpleType
- AnyURI
- Byte
- DateTime
- Date
- Short
- Token
- IdentifierType
To extend a property of the type Object, use AnySimpleType data type.
- -entityTypeNames
- This parameter specifies the name of one or more existing entity types to which the new property is added. Use a semicolon (;) as the delimiter to specify multiple entity types.
We can use a valid namespace prefix (nsPrefix) to refer to the entity type names in a specific namespace. The default namespace prefix is wim. Use a colon (:) to specify the namespace prefix. For example, we can use: your_ext:Person_Account
- your_ext is the namespace prefix, which is mapped to the http://www.yourco.com/yourext namespace URI.
- Person_Account is the entity type name.
(String, required)
Optional parameters
- -securityDomainName
- Name that uniquely identifies the security domain. If not specified, the command uses the global federated repository. (String, optional)
- -nsURI
- Namespace to which the new property is added.
We must map each namespace URI (nsURI) value to a unique namespace prefix (nsPrefix) value the first time that you use the namespace URI. The new property is added to the default namespace if we do not specify a nsURI value. The default namespace is http://www.ibm.com/websphere/wim, which is mapped, by default, to the wim nsPrefix value.
(String, optional)
- -nsPrefix
- Specify the prefix for the namespace.
Specify a namespace prefix (nsPrefix) value, if specified a new namespace URI (nsURI) value, so that the new nsURI value is mapped to this nsPrefix value. The default nsPrefix value is wim, which is mapped, by default, to the http://www.ibm.com/websphere/wim nsURI value.
(String, optional)
- -isMultiValued
- Specify whether the new property accepts more than one value. The default value is false.
(Boolean, optional)
- -repositoryIds
- Specify the repository or repositories to which the new property is added.
Use a semicolon (;) as the delimiter to specify multiple repository identities. All of the configured repositories are included, if this parameter is not specified.
To add the new property into the property extension repository, specify LA as the value of this parameter.
To add the new property to the entity types for all the specified repositories, specify a list of repository identities and do not include LA in the list.
To extend the property to the property extension repository for particular LDAP repositories, specify a list that includes LA. The new extended property is then marked as not supported for the other LDAP repositories that are included in this list.
(String, optional)
- - requiredEntityTypeNames
- Specify one or more entity types for which the new property is required.
Use a semicolon (;) as the delimiter to specify multiple entity types.
We can use a valid namespace prefix (nsPrefix) to refer to the entity type names in a specific namespace. The default namespace prefix is wim. Use a colon (:) to specify the namespace prefix. For example, we can use: your_ext:Person_Account
- your_ext is the namespace prefix, which is mapped to the http://www.yourco.com/yourext namespace URI.
- Person_Account is the entity type name.
For example, if you are adding the contactNumber property to the PersonAccount and Group entity types and you require that all PersonAccount entity types have a contactNumber value, then specify:
{-name contactNumber -entityTypeNames PersonAccount;Group - requiredEntityTypeNames PersonAccount}
(String, optional)
- -applicationId
- Use this parameter to indicate the ID of the application for which the property is extended.
We can use the getIdMgrEntityTypeSchema command to retrieve the extended properties for a specific application ID, if specified a value for the applicationId parameter.
(String, optional)
Examples
Batch mode example:
- Jacl:
$AdminTask addIdMgrPropertyToEntityTypes {-name property_name_1 -dataType string -entityTypeNames entity_type_1;entity_type_2}
- Jython string...
AdminTask.addIdMgrPropertyToEntityTypes ('[-name property_name_1 -dataType string -entityTypeNames entity_type_1;entity_type_2]')
- Jython list:
AdminTask.addIdMgrPropertyToEntityTypes (['-name', 'property_name_1', '-dataType', 'string' '-entityTypeNames', 'entity_type_1;entity_type_2'])
Interactive mode:
- Jacl:
$AdminTask addIdMgrPropertyToEntityTypes {-interactive}
- Jython string...
AdminTask.addIdMgrPropertyToEntityTypes ('[-interactive]')
- Jython list:
AdminTask.addIdMgrPropertyToEntityTypes (['-interactive'])
getIdMgrEntityTypeSchema
The getIdMgrEntityTypeSchema command returns the entity type schema. This command is available in both connected and local modes.
(zos) Note: If we run this command in local mode for a user registry that uses Resource Access Control Facility (RACF), nothing is returned.
Target Object None.
Required parameters None.
Optional parameters
- -id
- Specify the ID of the repository. If not specified, the default entity type schema of federated repositories is returned. (String, optional)
Important: If we specify LA as the repository ID, an error occurs because LA is a reserved ID for the property extension repository. Use the listIdMgrPropertyExtension command to retrieve the schema of the property extension repository. For more information, see the description of the listIdMgrPropertyExtensions command.
- -entityTypeNames
- Names of one or more entity types for which the entity type schema must be retrieved. If we are specifying multiple entity type names, use the semicolon (;) as a delimiter. If we do not specify this parameter the entity type schema for all entity types are returned. We must use a valid namespace prefix to refer to the entity type if it does not belong to the default namespace. (String, optional)
- -securityDomainName
- Name that uniquely identifies the security domain. If not specified, the command uses the global federated repository. (String, optional)
Return values The getIdMgrEntityTypeSchema command returns a HashMap containing the following structure:
Map{entityType=Map{metadata}}
The getIdMgrEntityTypeSchema command returns a HashMap where the key is the entity type and the value is another HashMap containing the entity type schema. This HashMap contains the keys nsPrefix, nsURI and parentEntityName and their corresponding values. The following example shows sample results of this command:
{PersonAccount={nsPrefix=wim, nsURI=hhtp://www.ibm.com/websphere/wim, parentEntityName=loginAccount}, test1:PersonAccount={nsPrefix=test1, nsURI=hhtp://www.ibm.com/websphere/wim, parentEntityName=loginAccount}, Group={nsPrefix=wim, nsURI=hhtp://www.ibm.com/websphere/wim, parentEntityName=Party}, MyExtendedEntity={nsPrefix=wim , nsURI=hhtp://www.ibm.com/websphere/wim, parentEntityName=Person}}
If the same entity type is defined in different name spaces, then it is listed for each of those name spaces in the output results with the namespace prefix (nsPrefix) prefixed to the entity type name, for example, test1:PersonAccount.
Examples
Batch mode example:
- Jacl:
$AdminTask getIdMgrEntityTypeSchema
- Jython string...
AdminTask.getIdMgrEntityTypeSchema()
- Jython list:
AdminTask.getIdMgrEntityTypeSchema()
Interactive mode:
- Jacl:
$AdminTask getIdMgrEntityTypeSchema {-interactive}
- Jython string...
AdminTask.getIdMgrEntityTypeSchema ('[-interactive]')
- Jython list:
AdminTask.getIdMgrEntityTypeSchema (['-interactive'])
getIdMgrPropertySchema
The getIdMgrPropertySchema command returns the property schema, including that of extended properties, of the specified entity type or all entity types. This command is available in both connected and local modes.
(zos) Note: If we run this command in local mode for a user registry that uses Resource Access Control Facility (RACF), nothing is returned.
Target Object None.
Required parameters None.
Optional parameters
- -id
- Specify the ID of the repository. If not specified, the default properties schema of federated repositories is returned. (String, optional)
- Specify ‘LA' as the value of the -id parameter to retrieve the property schema of the property extension repository.
- -entityTypeName
- Name of the entity type for which the property schema must be retrieved. If we do not specify this parameter the property schema for all entity types are returned. We must use a valid namespace prefix to refer to the entity type if it does not belong to the default namespace. (String, optional)
- -propertyNames
- Specify one or more property names. If we are specifying multiple property names, use the semicolon (;) as a delimiter. If we do not specify this parameter, all of the properties are returned. We must use a valid namespace prefix to refer to the property names if they do not belong to the default namespace. (String, optional)
- -securityDomainName
- Name that uniquely identifies the security domain. If not specified, the command uses the global federated repository. (String, optional)
Return values The getIdMgrPropertySchema command returns a HashMap containing the following structure:
Map{entityType=Map{propName=Map{metadata}}}
The getIdMgrPropertySchema command returns a HashMap where the key is the entity type and the value is another HashMap containing the property schema. This HashMap contains the property name as the key and its value is yet another HashMap containing the each attribute of the property and its value. The following example shows sample results of this command:
{PersonAccount={prop1={isMultiValued=false, dataType=String, nsPrefix=wim, nsURI=hhtp://www.ibm.com/websphere/wim, isRequired=true}, test1:prop1={isMultiValued=false, dataType=Integer, nsPrefix=test1, nsURI=hhtp://www.ibm.com/websphere/test1, isRequired=true}, prop2={isMultiValued=false, dataType=Integer, nsPrefix=wim, nsURI=hhtp://www.ibm.com/websphere/wim, isRequired=true }}, Group={prop3={isMultiValued=false, dataType=String, nsPrefix=wim, nsURI=hhtp://www.ibm.com/websphere/wim, isRequired=false}}}
If the same property is defined in different name spaces for an entity type, then it is listed for each of those name spaces in the output results with the namespace prefix (nsPrefix) prefixed to the property name, for example, test1:prop1. The isRequired attribute is returned as true for the property of an entity type, if that entity type is listed in the requiredEntityTypeNames list.
Examples
Batch mode example:
- Jacl:
$AdminTask getIdMgrPropertySchema
- Jython string...
AdminTask.getIdMgrPropertySchema()
- Jython list:
AdminTask.getIdMgrPropertySchema()
Interactive mode:
- Jacl:
$AdminTask getIdMgrPropertySchema {-interactive}
- Jython string...
AdminTask.getIdMgrPropertySchema ('[-interactive]')
- Jython list:
AdminTask.getIdMgrPropertySchema (['-interactive'])
listIdMgrPropertyExtensions
Use the listIdMgrPropertyExtensions command to list the properties extended for entity types.
Target Object None.
Required parameters None.
Optional parameters
- -securityDomainName
- Name that uniquely identifies the security domain. If not specified, the command uses the global federated repository. (String, optional)
- -applicationId
- Use this parameter to indicate the ID of the application for which the extended properties are listed.
If we do not specify this parameter, all the extended properties are listed.
(String, optional)
Return value
This parameter returns a hash map containing the property name as the key. The value of each key is another hash map, which contains the same keys as the input parameters of the addIdMgrPropertyToEntityTypes command. For multivalued parameters, the value of the key is a List object.
Examples
Batch mode example:
- Jacl:
$AdminTask listIdMgrPropertyExtensions
- Jython string...
AdminTask.listIdMgrPropertyExtensions()
- Jython list:
AdminTask.listIdMgrPropertyExtensions()
Interactive mode:
- Jacl:
$AdminTask listIdMgrPropertyExtensions {-interactive}
- Jython string...
AdminTask.listIdMgrPropertyExtensions ('[-interactive]')
- Jython list:
AdminTask.listIdMgrPropertyExtensions (['-interactive'])
Supported configurations: This command lists the extended properties that are present in the wimxmlextension.xml file only.
Related tasks
Use the wsadmin scripting AdminTask object for scripted administration
Commands (AdminTask) IdMgrDBSetup (AdminTask)