com.oktiva.mogno
Class DefaultComponentFiler

java.lang.Object
  extended bycom.oktiva.mogno.DefaultComponentFiler
All Implemented Interfaces:
ComponentFiler

public class DefaultComponentFiler
extends java.lang.Object
implements ComponentFiler

This is the DefaultComponentFiler, wich uses an XML file to store the component's params.

Version:
$Id: DefaultComponentFiler.java,v 1.1.1.1 2005/01/05 16:52:47 ruoso Exp $
Author:
Itamar Carvalho <itamar@oktiva.com.br>

Constructor Summary
DefaultComponentFiler()
           
 
Method Summary
 java.util.Hashtable load()
          Loads the component's params from a XML file.
 java.util.Hashtable load(java.io.InputStream in)
          Loads the component's params using an InputStream.
 void setParams(java.util.Hashtable params)
           
 void store(java.util.Hashtable mine, java.util.Hashtable owned)
          Store the attributes to the XML file set.
 void store(java.util.Hashtable mine, java.util.Vector owned)
          Store the attributes to the XML file set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComponentFiler

public DefaultComponentFiler()
Method Detail

setParams

public void setParams(java.util.Hashtable params)
Specified by:
setParams in interface ComponentFiler
Parameters:
params - This filer only needs one parameter: a File where is the XML, under the key "xmlFile". If there is a second parameter with key "designing", this filer don't use the cache.

load

public java.util.Hashtable load()
                         throws java.io.IOException
Loads the component's params from a XML file.

Specified by:
load in interface ComponentFiler
Returns:
Hashtable contendo dois outros sob as chaves "mine" e "owned".
Throws:
java.io.IOException

load

public java.util.Hashtable load(java.io.InputStream in)
                         throws java.io.IOException
Loads the component's params using an InputStream.

Specified by:
load in interface ComponentFiler
Parameters:
in - InputStream from where the data will be read.
Returns:
Hashtable contendo dois outros sob as chaves "mine" e "owned".
Throws:
java.io.IOException

store

public void store(java.util.Hashtable mine,
                  java.util.Hashtable owned)
           throws java.io.IOException
Store the attributes to the XML file set.

Specified by:
store in interface ComponentFiler
Parameters:
mine - Hashtable contendo os atributos do compomente a ser salvo.
owned - Hashtable de hashtables contendo as propriedades dos componentes possuídos pelo componente a ser salvo. Os componentes serão salvos na ordem das chaves deste hash.
Throws:
java.io.IOException

store

public void store(java.util.Hashtable mine,
                  java.util.Vector owned)
           throws java.io.IOException
Store the attributes to the XML file set.

Specified by:
store in interface ComponentFiler
Parameters:
mine - Hashtable contendo os atributos do compomente a ser salvo.
owned - Vector de hashtables contendo as propriedades dos componentes possuídos pelo componente a ser salvo, na ordem desejada.
Throws:
java.io.IOException