Express (Distributed operating systems), v8.0 > Secure applications and their environment > Authenticate users > Select a registry or repository > Manage realms in a federated repository > Virtual member manager > Develop with virtual member manager > Integrate virtual member manager into the application > Program tasks


Dynamically adding a new property configuration

Use this procedure to dynamically add a new property configuration to the specified profile repository.


Before you begin

This property must already exist in the schema.


About this task

When this dynamic call is made, only the configuration in memory is updated. The configuration file is not updated.

Event Type

DYNA_CONFIG_EVENT_ADD_PROPERTY_CONFIG

Configuration Data

DYNA_CONFIG_KEY_REPOS_ID (required) - [String]

ID of the repository to which to add the property configuration.

DYNA_CONFIG_KEY_PROP_CONFIG (required) - [DataObject]

Configuration data object based on the wimconfig.xsd file. This data object contains the configuration information about this property that is specific to the repository.
The following is a sample task:


Procedure

  1. Ensure that virtual member manager is running.
  2. Call dynamicUpdateConfig API method to add the property mapping. For example to add password to userPassword mapping to an LDAP repository configuration:
    // dynamic update
    Hashtable configData = new Hashtable();
    configData.put(DynamicConfigConstants.DYNA_CONFIG_KEY_REPOS_ID, "LDAP1");
    DataObject configProvider = SDOHelper.createConfigProviderDataObject();
    DataObject ldapRepos = SDOHelper.createConfigRepositoryDataObject(configProvider,
                           ConfigConstants.CONFIG_DO_LDAP_REPOSITORY_TYPE);
    DataObject attrConfig = ldapRepos.createDataObject(CONFIG_DO_ATTRIBUTE_CONFIGUARTION);
    DataObject attr = attrConfig.createDataObject(CONFIG_DO_ATTRIBUTES);
    attr.setString(CONFIG_PROP_PROPERTY_NAME, "password");
    attr.setString(CONFIG_PROP_NAME, "userPassword");
    configData.put(DynamicConfigConstants.DYNA_CONFIG_KEY_PROP_CONFIG, attr);
    service.dynamicUpdateConfig(DynamicConfigConstants.DYNA_CONFIG_EVENT_ADD_PROPERTY_CONFIG, configData);
    

Parent topic: Program tasks



+

Search Tips   |   Advanced Search