public synchronized void storeResourceConfig(String clusterName,ResourceType resourceType,TungstenProperties resourceProps) throws ConfigurationException {
  if (getClusterHome() == null) {
    throw new ConfigurationException("The 'clusterHome' property was not found in the configuration file:" + getModulePropertiesFileName(ConfigurationConstants.TR_PROPERTIES,getClusterHome()));
  }
  String resourceDir=getResourceConfigDirName(getClusterHome(),clusterName,resourceType);
  File resources=new File(resourceDir);
  if (!resources.isDirectory()) {
    if (resources.mkdirs()) {
      logger.info(String.format("Created directory '%s'",resourceDir));
    }
 else {
      String msg=String.format("The path indicated by the name %s must be a directory.",getResourceConfigDirName(getClusterHome(),clusterName,resourceType));
      logger.error(msg);
      throw new ConfigurationException(msg);
    }
  }
  String outFileName=resources.getAbsolutePath() + File.separator + resourceProps.getString("name")+ ".properties";
  store(resourceProps,outFileName);
}

public synchronized void storeResourceConfig ( String clusterName , ResourceType resourceType , TungstenProperties resourceProps ) throws ConfigurationException { if ( getClusterHome ( ) == null ) { throw new ConfigurationException ( "The 'clusterHome' property was not found in the configuration file:" + getModulePropertiesFileName ( ConfigurationConstants . TR_PROPERTIES , getClusterHome ( ) ) ) ; } String resourceDir = getResourceConfigDirName ( getClusterHome ( ) , clusterName , resourceType ) ; File resources = new File ( resourceDir ) ; if ( ! resources . isDirectory ( ) ) { if ( resources . mkdirs ( ) ) { logger . info ( String . format ( "Created directory '%s'" , resourceDir ) ) ; } else { String msg = String . format ( "The path indicated by the name %s must be a directory." , getResourceConfigDirName ( getClusterHome ( ) , clusterName , resourceType ) ) ; logger . error ( msg ) ; throw new ConfigurationException ( msg ) ; } } String outFileName = resources . getAbsolutePath ( ) + File . separator + resourceProps . getString ( "name" ) + ".properties" ; store ( resourceProps , outFileName ) ; }
store a properties file as a resource configuration using the resource configuration standards for tungsten
