public static void addSubConfigAttributeDefaultValues(String serviceName,Set sunServiceID,String realm,String subConfigName,String attributeName,Set defaultValues){
  String classMethod="UpgradeUtils:addSubConfigAttributeDefaultValues : ";
  try {
    Set oldVal=new HashSet();
    ServiceConfigManager scm=getServiceConfigManager(serviceName);
    ServiceConfig sc=scm.getOrganizationConfig(realm,null);
    ServiceConfig subConfig=sc.getSubConfig(subConfigName);
    String serviceID=getSunServiceID(subConfig);
    if (sunServiceID.contains(serviceID)) {
      Set valSet=getExistingValues(subConfig,attributeName,defaultValues);
      defaultValues.removeAll(valSet);
      subConfig.replaceAttributeValues(attributeName,oldVal,defaultValues);
    }
  }
 catch (  SSOException ssoe) {
    debug.error(classMethod + "Invalid SSOToken",ssoe);
  }
catch (  SMSException sme) {
    debug.error(classMethod + "Error adding values ",sme);
  }
}

public static void addSubConfigAttributeDefaultValues ( String serviceName , Set sunServiceID , String realm , String subConfigName , String attributeName , Set defaultValues ) { String classMethod = "UpgradeUtils:addSubConfigAttributeDefaultValues : " ; try { Set oldVal = new HashSet ( ) ; ServiceConfigManager scm = getServiceConfigManager ( serviceName ) ; ServiceConfig sc = scm . getOrganizationConfig ( realm , null ) ; ServiceConfig subConfig = sc . getSubConfig ( subConfigName ) ; String serviceID = getSunServiceID ( subConfig ) ; if ( sunServiceID . contains ( serviceID ) ) { Set valSet = getExistingValues ( subConfig , attributeName , defaultValues ) ; defaultValues . removeAll ( valSet ) ; subConfig . replaceAttributeValues ( attributeName , oldVal , defaultValues ) ; } } catch ( SSOException ssoe ) { debug . error ( classMethod + "Invalid SSOToken" , ssoe ) ; } catch ( SMSException sme ) { debug . error ( classMethod + "Error adding values " , sme ) ; } }
adds defaults values to service sub - configuration
