Previous Topic: Object AssociationsNext Topic: Retrieve Objects from the Policy Store


Add Objects to the Policy Store

After creating a Policy Management API object, you can create objects to add to the policy store.

To add objects to the policy store

  1. Create an object to be added to the policy store.

    For example, if you want to create an agent object:

    SmAgent agent = new SmAgent();
    
  2. Set the appropriate fields for the object—for example:
    agent.setName ("myAgent");
    agent.setSecret ("siteminder");
    agent.setDescription ("Sample agent");
    agent.setAgentType (SmAgentType.DefaultAgentType);
    
  3. Add the object to the policy store, as follows:

    For example:

    result = policyApi.addAgent(agent);
    
  4. Examine the result.

If the call is successful: