com.anwrt.anycontent.extensions.deploy
Class DeployExtensionPoint

java.lang.Object
  extended bycom.anwrt.anycontent.plugin.ExtensionPoint
      extended bycom.anwrt.anycontent.extensions.deploy.DeployExtensionPoint

public class DeployExtensionPoint
extends ExtensionPoint

This extension point manages the parameters of the CMS that have to be stored, by the plugins.


Constructor Summary
DeployExtensionPoint()
           
 
Method Summary
 void configureDeploy(java.lang.String pluginName, Configuration configuration)
          This method allows the deploy extension point to store new available parameter.
 void configureExtension(java.lang.String pluginName, java.lang.String pluginId, Configuration configuration)
          Add an extension to this point.
 DeployParameter get(java.lang.String id)
          Get the deploy parameter by its id
 java.lang.String[] getParametersIds()
          Get the id of the deploy's parameters.
 void initialize()
          Method called at the end of the initialization process.
 boolean isComplete()
          Returns false if the model is initialized and all parameters are valued
 boolean isSingle()
          Returns wether this extension point is single
 void save(java.util.Map untypedValues, java.lang.String fileName)
          Update the deploy file with the given values
Values are untyped (all are of type String) and might be null.
 void toSAX(org.xml.sax.ContentHandler handler, java.util.Map objectModel, SourceResolver resolver)
          SAX the deploy parameters and values into a content handler
 
Methods inherited from class com.anwrt.anycontent.plugin.ExtensionPoint
configure, getId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeployExtensionPoint

public DeployExtensionPoint()
Method Detail

isSingle

public boolean isSingle()
Description copied from class: ExtensionPoint
Returns wether this extension point is single

Specified by:
isSingle in class ExtensionPoint
Returns:
true if this extension point is single

isComplete

public boolean isComplete()
Returns false if the model is initialized and all parameters are valued

Returns:
false if the model is initialized and all parameters are valued

initialize

public void initialize()
Description copied from class: ExtensionPoint
Method called at the end of the initialization process.
At this time, all extensions have been added (through configureExtension())

Specified by:
initialize in class ExtensionPoint

configureExtension

public void configureExtension(java.lang.String pluginName,
                               java.lang.String pluginId,
                               Configuration configuration)
                        throws ConfigurationException
Description copied from class: ExtensionPoint
Add an extension to this point. Each implementation knows the meaning of the given configuration.

Specified by:
configureExtension in class ExtensionPoint
Parameters:
configuration - the information about the extension to be added
pluginName - Unique identifier for the plugin hosting the extension (equals to the directory name)
pluginId - Unique plugin identifier (unique for a given pluginName)
Throws:
ConfigurationException

configureDeploy

public void configureDeploy(java.lang.String pluginName,
                            Configuration configuration)
                     throws ConfigurationException
This method allows the deploy extension point to store new available parameter.
The configureExtension will allow to select which ones are usefull.

Parameters:
pluginName - the name of the plugin defining the parameters
configuration - configuration of the plugin file
Throws:
ConfigurationException - if the xml is not correct

getParametersIds

public java.lang.String[] getParametersIds()
Get the id of the deploy's parameters. Use get* to retrive the typed parameter

Returns:
An array of String containing the id of the typed parameters existing in the model

get

public DeployParameter get(java.lang.String id)
Get the deploy parameter by its id

Parameters:
id - Id of the deploy parameter to get
Returns:
The deploy parameter.

toSAX

public void toSAX(org.xml.sax.ContentHandler handler,
                  java.util.Map objectModel,
                  SourceResolver resolver)
           throws org.xml.sax.SAXException
SAX the deploy parameters and values into a content handler

Parameters:
handler - Handler for sax events
objectModel - Cocoon object model (can be used by enumerated parameters)
resolver - the source resolver
Throws:
org.xml.sax.SAXException - if an error occured

save

public void save(java.util.Map untypedValues,
                 java.lang.String fileName)
          throws java.lang.Exception
Update the deploy file with the given values
Values are untyped (all are of type String) and might be null.

Parameters:
untypedValues - A map (key, untyped value).
fileName - the deploy.xml absolute path
Throws:
java.lang.Exception - If an error occured while saving values


Copyright © 2006 Anyware Technologies. All Rights Reserved.