public ServiceConfig createOrganizationConfig(String orgName,Map attrs) throws SMSException, SSOException {
  validateSSM();
  ServiceSchemaImpl ss=ssm.getSchema(SchemaType.ORGANIZATION);
  if (ss == null) {
    String[] args={serviceName};
    throw (new SMSException(IUMSConstants.UMS_BUNDLE_NAME,"sms-service-does-not-have-org-schema",args));
  }
  String orgdn=DNMapper.orgNameToDN(orgName);
  CreateServiceConfig.checkBaseNodesForOrg(token,orgdn,serviceName,version);
  String orgDN=scm.constructServiceConfigDN(SMSUtils.DEFAULT,CreateServiceConfig.ORG_CONFIG_NODE,orgdn);
  try {
    CachedSMSEntry cEntry=CachedSMSEntry.getInstance(token,orgDN);
    if (cEntry.isDirty()) {
      cEntry.refresh();
    }
    if (cEntry.isNewEntry()) {
      CreateServiceConfig.createSubConfigEntry(token,orgDN,ss,null,null,attrs,orgName);
      if (ServiceManager.isCoexistenceMode()) {
        String smsDN=DNMapper.orgNameToDN(orgName);
        OrgConfigViaAMSDK amsdk=new OrgConfigViaAMSDK(token,DNMapper.realmNameToAMSDKName(smsDN),smsDN);
        amsdk.assignService(serviceName);
      }
    }
 else     if (attrs != null && !attrs.isEmpty()) {
      ServiceConfig sc=getOrganizationConfig(orgName,null);
      sc.setAttributes(attrs);
    }
  }
 catch (  ServiceAlreadyExistsException slee) {
  }
  return (getOrganizationConfig(orgName,null));
}

public ServiceConfig createOrganizationConfig ( String orgName , Map attrs ) throws SMSException , SSOException { validateSSM ( ) ; ServiceSchemaImpl ss = ssm . getSchema ( SchemaType . ORGANIZATION ) ; if ( ss == null ) { String [ ] args = { serviceName } ; throw ( new SMSException ( IUMSConstants . UMS_BUNDLE_NAME , "sms-service-does-not-have-org-schema" , args ) ) ; } String orgdn = DNMapper . orgNameToDN ( orgName ) ; CreateServiceConfig . checkBaseNodesForOrg ( token , orgdn , serviceName , version ) ; String orgDN = scm . constructServiceConfigDN ( SMSUtils . DEFAULT , CreateServiceConfig . ORG_CONFIG_NODE , orgdn ) ; try { CachedSMSEntry cEntry = CachedSMSEntry . getInstance ( token , orgDN ) ; if ( cEntry . isDirty ( ) ) { cEntry . refresh ( ) ; } if ( cEntry . isNewEntry ( ) ) { CreateServiceConfig . createSubConfigEntry ( token , orgDN , ss , null , null , attrs , orgName ) ; if ( ServiceManager . isCoexistenceMode ( ) ) { String smsDN = DNMapper . orgNameToDN ( orgName ) ; OrgConfigViaAMSDK amsdk = new OrgConfigViaAMSDK ( token , DNMapper . realmNameToAMSDKName ( smsDN ) , smsDN ) ; amsdk . assignService ( serviceName ) ; } } else if ( attrs != null && ! attrs . isEmpty ( ) ) { ServiceConfig sc = getOrganizationConfig ( orgName , null ) ; sc . setAttributes ( attrs ) ; } } catch ( ServiceAlreadyExistsException slee ) { } return ( getOrganizationConfig ( orgName , null ) ) ; }
creates organization configuration for the default instance of the service given configuration attributes .
