fr.gouv.culture.sdx.utils.save
Class SaveParameters

java.lang.Object
  extended by org.apache.avalon.framework.configuration.AbstractConfiguration
      extended by org.apache.avalon.framework.configuration.DefaultConfiguration
          extended by fr.gouv.culture.sdx.utils.save.SaveParameters
All Implemented Interfaces:
java.io.Serializable, org.apache.avalon.framework.configuration.Configuration, org.apache.avalon.framework.configuration.MutableConfiguration

public class SaveParameters
extends org.apache.avalon.framework.configuration.DefaultConfiguration

Author:
jlecren This class contains the informations that are necessary to save and restore data.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.avalon.framework.configuration.DefaultConfiguration
EMPTY_ARRAY
 
Constructor Summary
SaveParameters(org.apache.avalon.framework.configuration.Configuration config, SaveParameters parent_config)
           
SaveParameters(org.apache.avalon.framework.configuration.Configuration config, java.lang.String storeBasePath)
           
SaveParameters(java.lang.String name, SaveParameters parent_config)
           
SaveParameters(java.lang.String name, SaveParameters parent_config, java.lang.String storeRelativeDirectory)
           
SaveParameters(java.lang.String name, SaveParameters parent_config, java.lang.String storeBasePath, java.lang.String storeRelativeDirectory)
           
SaveParameters(java.lang.String name, java.lang.String storeBasePath)
           
 
Method Summary
 void addAllChildren(org.apache.avalon.framework.configuration.Configuration other)
          Add all child Configuration objects from specified configuration element to current configuration element.
 SaveParameters getSaveParametersById(java.lang.String sdxobjectid)
          This method return the SaveParameters given a sdx_object id.
 java.lang.String getStoreBasePath()
          Get the absolute path where all object are stored
 java.lang.String getStoreCompletePath()
          Get the absolute path where the current is stored
 java.lang.String getStorePath()
          Get the relative path from base path where the current object data will be stored.
 long getUniqueID()
          Get an unique ID for this saveconfig AutoIncrement after each call.
 java.lang.String getUniqueIDString()
          Get an unique ID for this saveconfig AutoIncrement after each call.
 boolean isAllElementSelected()
           
 void savePathInConfig(java.lang.String pathleaf)
          Add relative path in the config file
 void setUniqueID(long id)
          Set an unique ID for this saveconfig
 
Methods inherited from class org.apache.avalon.framework.configuration.DefaultConfiguration
addAll, addAll, addAllAttributes, addAllChildren, addAttribute, addChild, appendValueData, checkWriteable, equals, getAttribute, getAttributeNames, getChild, getChildCount, getChildren, getChildren, getLocation, getMutableChild, getMutableChild, getMutableChildren, getMutableChildren, getName, getNamespace, getPrefix, getValue, getValue, hashCode, isReadOnly, makeReadOnly, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setValue, setValue, setValue, setValue, setValue, setValue
 
Methods inherited from class org.apache.avalon.framework.configuration.AbstractConfiguration
getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsInteger, getAttributeAsLong, getAttributeAsLong, getChild, getValueAsBoolean, getValueAsBoolean, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.framework.configuration.Configuration
getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsFloat, getAttributeAsInteger, getAttributeAsInteger, getAttributeAsLong, getAttributeAsLong, getChild, getValueAsBoolean, getValueAsBoolean, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFloat, getValueAsInteger, getValueAsInteger, getValueAsLong, getValueAsLong
 

Constructor Detail

SaveParameters

public SaveParameters(org.apache.avalon.framework.configuration.Configuration config,
                      java.lang.String storeBasePath)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

SaveParameters

public SaveParameters(org.apache.avalon.framework.configuration.Configuration config,
                      SaveParameters parent_config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

SaveParameters

public SaveParameters(java.lang.String name,
                      java.lang.String storeBasePath)

SaveParameters

public SaveParameters(java.lang.String name,
                      SaveParameters parent_config)

SaveParameters

public SaveParameters(java.lang.String name,
                      SaveParameters parent_config,
                      java.lang.String storeRelativeDirectory)

SaveParameters

public SaveParameters(java.lang.String name,
                      SaveParameters parent_config,
                      java.lang.String storeBasePath,
                      java.lang.String storeRelativeDirectory)
Method Detail

addAllChildren

public void addAllChildren(org.apache.avalon.framework.configuration.Configuration other)
Add all child Configuration objects from specified configuration element to current configuration element.

Specified by:
addAllChildren in interface org.apache.avalon.framework.configuration.MutableConfiguration
Overrides:
addAllChildren in class org.apache.avalon.framework.configuration.DefaultConfiguration
Parameters:
other - the other Configuration value

getSaveParametersById

public SaveParameters getSaveParametersById(java.lang.String sdxobjectid)
                                     throws SDXException
This method return the SaveParameters given a sdx_object id.

Parameters:
sdxobjectid - the id of the sdx object
Returns:
the save parameters of the sdxobject we are searching for, null if not found
Throws:
SDXException

getStorePath

public java.lang.String getStorePath()
Get the relative path from base path where the current object data will be stored.

Returns:
the store path

getStoreBasePath

public java.lang.String getStoreBasePath()
Get the absolute path where all object are stored

Returns:
the store base path

getStoreCompletePath

public java.lang.String getStoreCompletePath()
Get the absolute path where the current is stored

Returns:
the store base path + the relative store path

setUniqueID

public void setUniqueID(long id)
Set an unique ID for this saveconfig


getUniqueID

public long getUniqueID()
Get an unique ID for this saveconfig AutoIncrement after each call.

Returns:
an unique ID

getUniqueIDString

public java.lang.String getUniqueIDString()
Get an unique ID for this saveconfig AutoIncrement after each call.

Returns:
an unique ID

savePathInConfig

public void savePathInConfig(java.lang.String pathleaf)
Add relative path in the config file

Parameters:
pathleaf -

isAllElementSelected

public boolean isAllElementSelected()


Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.