private static void initialize(){
  if (!initialized) {
    try {
      String adminDN=(String)AccessController.doPrivileged(new AdminDNAction());
      String adminPassword=(String)AccessController.doPrivileged(new AdminPasswordAction());
      SSOTokenManager mgr=SSOTokenManager.getInstance();
      ServiceConfigManager scm=new ServiceConfigManager(SERVICE_NAME,mgr.createSSOToken(new AuthPrincipal(adminDN),adminPassword));
      if (!addedListener) {
        addedListener=true;
        scm.addListener(new AdminInterfaceUtils());
      }
      ServiceConfig globalConfig=scm.getGlobalConfig(null);
      ServiceConfig templatesConfig=globalConfig.getSubConfig(TEMPLATES);
      ServiceConfig structTemplateSubConfig=templatesConfig.getSubConfig(STRUCTURE_TEMPLATES);
      ServiceConfig groupContConfig=structTemplateSubConfig.getSubConfig(GCCREATE_ATTR_NAME);
      ServiceConfig peopleContConfig=structTemplateSubConfig.getSubConfig(PCCREATE_ATTR_NAME);
      ServiceConfig orgAdminConfig=structTemplateSubConfig.getSubConfig(ORG_ADMIN_ATTR_NAME);
      ServiceConfig helpDeskAdminConfig=structTemplateSubConfig.getSubConfig(HELP_DESK_ADMIN_ATTR_NAME);
      ServiceConfig policyAdminConfig=structTemplateSubConfig.getSubConfig(POLICY_ADMIN_ATTR_NAME);
      defaultGCCreateDuringOrgConfig=getConfigAttributeValue(groupContConfig,defaultGCCreateDuringOrgConfig);
      defaultPCCreateDuringOrgConfig=getConfigAttributeValue(peopleContConfig,defaultPCCreateDuringOrgConfig);
      defaultORGADMIN=getConfigAttributeValue(orgAdminConfig,defaultORGADMIN);
      defaultHELP_DESK_ADMIN=getConfigAttributeValue(helpDeskAdminConfig,defaultHELP_DESK_ADMIN);
      defaultPOLICY_ADMIN=getConfigAttributeValue(policyAdminConfig,defaultPOLICY_ADMIN);
      ServiceSchemaManager sm=new ServiceSchemaManager(CONSOLE_SERVICE_NAME,mgr.createSSOToken(new AuthPrincipal(adminDN),adminPassword));
      if (!addedListener) {
        addedListener=true;
        sm.addListener(new AdminInterfaceUtils());
      }
      ServiceSchema schema=sm.getGlobalSchema();
      defaultAC=getAttributeValue(schema,AC_ATTR_NAME,defaultAC);
      defaultGC=getAttributeValue(schema,GC_ATTR_NAME,defaultGC);
      defaultPC=getAttributeValue(schema,PC_ATTR_NAME,defaultPC);
    }
 catch (    Exception e) {
      debug.warning("AdminInterfaceUtils: Unable to get " + "default People, Groups, Org Admin Role, " + "Help Desk Admin Role, Policy Admin Role and "+ "Agents containers from SM",e);
    }
    if (debug.messageEnabled()) {
      debug.message("AdminInterfaceUtils: Defaults container: " + defaultPC + ", "+ defaultGC+ ", "+ defaultAC+ ", "+ defaultPCCreateDuringOrgConfig+ ", "+ defaultGCCreateDuringOrgConfig+ ", "+ defaultORGADMIN+ ", "+ defaultHELP_DESK_ADMIN+ ", "+ defaultPOLICY_ADMIN);
    }
    initialized=true;
  }
}

private static void initialize ( ) { if ( ! initialized ) { try { String adminDN = ( String ) AccessController . doPrivileged ( new AdminDNAction ( ) ) ; String adminPassword = ( String ) AccessController . doPrivileged ( new AdminPasswordAction ( ) ) ; SSOTokenManager mgr = SSOTokenManager . getInstance ( ) ; ServiceConfigManager scm = new ServiceConfigManager ( SERVICE_NAME , mgr . createSSOToken ( new AuthPrincipal ( adminDN ) , adminPassword ) ) ; if ( ! addedListener ) { addedListener = true ; scm . addListener ( new AdminInterfaceUtils ( ) ) ; } ServiceConfig globalConfig = scm . getGlobalConfig ( null ) ; ServiceConfig templatesConfig = globalConfig . getSubConfig ( TEMPLATES ) ; ServiceConfig structTemplateSubConfig = templatesConfig . getSubConfig ( STRUCTURE_TEMPLATES ) ; ServiceConfig groupContConfig = structTemplateSubConfig . getSubConfig ( GCCREATE_ATTR_NAME ) ; ServiceConfig peopleContConfig = structTemplateSubConfig . getSubConfig ( PCCREATE_ATTR_NAME ) ; ServiceConfig orgAdminConfig = structTemplateSubConfig . getSubConfig ( ORG_ADMIN_ATTR_NAME ) ; ServiceConfig helpDeskAdminConfig = structTemplateSubConfig . getSubConfig ( HELP_DESK_ADMIN_ATTR_NAME ) ; ServiceConfig policyAdminConfig = structTemplateSubConfig . getSubConfig ( POLICY_ADMIN_ATTR_NAME ) ; defaultGCCreateDuringOrgConfig = getConfigAttributeValue ( groupContConfig , defaultGCCreateDuringOrgConfig ) ; defaultPCCreateDuringOrgConfig = getConfigAttributeValue ( peopleContConfig , defaultPCCreateDuringOrgConfig ) ; defaultORGADMIN = getConfigAttributeValue ( orgAdminConfig , defaultORGADMIN ) ; defaultHELP_DESK_ADMIN = getConfigAttributeValue ( helpDeskAdminConfig , defaultHELP_DESK_ADMIN ) ; defaultPOLICY_ADMIN = getConfigAttributeValue ( policyAdminConfig , defaultPOLICY_ADMIN ) ; ServiceSchemaManager sm = new ServiceSchemaManager ( CONSOLE_SERVICE_NAME , mgr . createSSOToken ( new AuthPrincipal ( adminDN ) , adminPassword ) ) ; if ( ! addedListener ) { addedListener = true ; sm . addListener ( new AdminInterfaceUtils ( ) ) ; } ServiceSchema schema = sm . getGlobalSchema ( ) ; defaultAC = getAttributeValue ( schema , AC_ATTR_NAME , defaultAC ) ; defaultGC = getAttributeValue ( schema , GC_ATTR_NAME , defaultGC ) ; defaultPC = getAttributeValue ( schema , PC_ATTR_NAME , defaultPC ) ; } catch ( Exception e ) { debug . warning ( "AdminInterfaceUtils: Unable to get " + "default People, Groups, Org Admin Role, " + "Help Desk Admin Role, Policy Admin Role and " + "Agents containers from SM" , e ) ; } if ( debug . messageEnabled ( ) ) { debug . message ( "AdminInterfaceUtils: Defaults container: " + defaultPC + ", " + defaultGC + ", " + defaultAC + ", " + defaultPCCreateDuringOrgConfig + ", " + defaultGCCreateDuringOrgConfig + ", " + defaultORGADMIN + ", " + defaultHELP_DESK_ADMIN + ", " + defaultPOLICY_ADMIN ) ; } initialized = true ; } }
initializes the default containers using sms
