static void createPolicyTree(String configName,String configId,ServiceConfigManager scm,String org) throws NoPermissionException, PolicyException, SSOException {
  try {
    ServiceConfig pConfig=scm.getOrganizationConfig(org,null);
    if (pConfig == null) {
      scm.createOrganizationConfig(org,null);
      pConfig=scm.getOrganizationConfig(org,null);
    }
    pConfig.addSubConfig(configName,configId,0,null);
  }
 catch (  ServiceAlreadyExistsException se) {
    if (debug.messageEnabled()) {
      debug.message("PolicyManager->createPolicyTree: Name: " + configName + " ID: "+ configId+ " Policy service already exists under org->"+ org);
    }
  }
catch (  SMSException e) {
    String[] objs={org};
    if (e.getExceptionCode() == SMSException.STATUS_NO_PERMISSION) {
      throw (new NoPermissionException(ResBundleUtils.rbName,"insufficient_access_rights",null));
    }
 else {
      throw (new PolicyException(ResBundleUtils.rbName,"unable_to_create_policy_for_org",objs,e));
    }
  }
}

static void createPolicyTree ( String configName , String configId , ServiceConfigManager scm , String org ) throws NoPermissionException , PolicyException , SSOException { try { ServiceConfig pConfig = scm . getOrganizationConfig ( org , null ) ; if ( pConfig == null ) { scm . createOrganizationConfig ( org , null ) ; pConfig = scm . getOrganizationConfig ( org , null ) ; } pConfig . addSubConfig ( configName , configId , 0 , null ) ; } catch ( ServiceAlreadyExistsException se ) { if ( debug . messageEnabled ( ) ) { debug . message ( "PolicyManager->createPolicyTree: Name: " + configName + " ID: " + configId + " Policy service already exists under org->" + org ) ; } } catch ( SMSException e ) { String [ ] objs = { org } ; if ( e . getExceptionCode ( ) == SMSException . STATUS_NO_PERMISSION ) { throw ( new NoPermissionException ( ResBundleUtils . rbName , "insufficient_access_rights" , null ) ) ; } else { throw ( new PolicyException ( ResBundleUtils . rbName , "unable_to_create_policy_for_org" , objs , e ) ) ; } } }
creates the policy tree , ou = policy , ou = services , . . .
