public static void replaceSubConfigAttributeDefaultValues(String serviceName,Set sunServiceID,String realm,String subConfigName,String attributeName,Set oldValues,Set newValues){
  String classMethod="UpgradeUtils:replaceSubConfigAttributeDefaultValues : ";
  try {
    ServiceConfigManager scm=getServiceConfigManager(serviceName);
    ServiceConfig sc=scm.getOrganizationConfig(realm,null);
    ServiceConfig subConfig=sc.getSubConfig(subConfigName);
    String serviceID=getSunServiceID(subConfig);
    if (debug.messageEnabled()) {
      debug.message("sunServiceID :" + sunServiceID);
      debug.message("serviceID :" + serviceID);
      debug.message("subConfigName :" + subConfigName);
    }
    if (sunServiceID.contains(serviceID)) {
      subConfig.replaceAttributeValues(attributeName,oldValues,newValues);
    }
  }
 catch (  SSOException ssoe) {
    debug.error(classMethod + "Invalid SSO Token: ",ssoe);
  }
catch (  SMSException sme) {
    debug.error(classMethod + "Error replacing default values for attribute : " + attributeName,sme);
  }
}

public static void replaceSubConfigAttributeDefaultValues ( String serviceName , Set sunServiceID , String realm , String subConfigName , String attributeName , Set oldValues , Set newValues ) { String classMethod = "UpgradeUtils:replaceSubConfigAttributeDefaultValues : " ; try { ServiceConfigManager scm = getServiceConfigManager ( serviceName ) ; ServiceConfig sc = scm . getOrganizationConfig ( realm , null ) ; ServiceConfig subConfig = sc . getSubConfig ( subConfigName ) ; String serviceID = getSunServiceID ( subConfig ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "sunServiceID :" + sunServiceID ) ; debug . message ( "serviceID :" + serviceID ) ; debug . message ( "subConfigName :" + subConfigName ) ; } if ( sunServiceID . contains ( serviceID ) ) { subConfig . replaceAttributeValues ( attributeName , oldValues , newValues ) ; } } catch ( SSOException ssoe ) { debug . error ( classMethod + "Invalid SSO Token: " , ssoe ) ; } catch ( SMSException sme ) { debug . error ( classMethod + "Error replacing default values for attribute : " + attributeName , sme ) ; } }
replaces attributes default values in service sub - configuration .
