Package org.apache.avalon.framework.configuration

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationSerializer


    return resultString;
  }

  public static void saveSubTree(HashTree subTree, OutputStream writer) throws IOException {
    Configuration config = (Configuration) getConfigsFromTree(subTree).get(0);
    DefaultConfigurationSerializer saver = new DefaultConfigurationSerializer();

    saver.setIndent(true);
    try {
      saver.serialize(writer, config);
    } catch (SAXException e) {
      throw new IOException("SAX implementation problem");
    } catch (ConfigurationException e) {
      throw new IOException("Problem using Avalon Configuration tools");
    }
View Full Code Here


  /**
   * @see org.apache.lenya.ac.impl.AbstractIPRange#save()
   */
  public void save() throws AccessControlException {
    DefaultConfigurationSerializer serializer = new DefaultConfigurationSerializer();
    Configuration config = createConfiguration();

    try {
      serializer.serializeToFile(getFile(), config);
    } catch (Exception e) {
      throw new AccessControlException(e);
    }
  }
View Full Code Here

   *  !ToDo (Constructor description)
   */
  public ResultCollector()
  {
    current = -1;
    serializer = new DefaultConfigurationSerializer();
    setErrorLogging(false);
  }
View Full Code Here

  public static void saveSubTree(HashTree subTree,OutputStream writer) throws
      IOException
  {
    Configuration config = (Configuration)getConfigsFromTree(subTree).get(0);
    DefaultConfigurationSerializer saver = new DefaultConfigurationSerializer();
    saver.setIndent(true);
    try
    {
      saver.serialize(writer,config);
    }
    catch(SAXException e)
    {
      throw new IOException("SAX implementation problem");
    }
View Full Code Here

     * Save the role
     *
     * @throws AccessControlException if the save fails
     */
    public void save() throws AccessControlException {
        DefaultConfigurationSerializer serializer = new DefaultConfigurationSerializer();
        Configuration config = createConfiguration();
        File xmlPath = getConfigurationDirectory();
        File xmlfile = new File(xmlPath, getId() + FileRoleManager.SUFFIX);

        try {
            serializer.serializeToFile(xmlfile, config);
        } catch (Exception e) {
            throw new AccessControlException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.configuration.DefaultConfigurationSerializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.