com.anwrt.anycontent.extensions.information
Class ActionInformation

java.lang.Object
  extended bycom.anwrt.anycontent.extensions.information.Information
      extended bycom.anwrt.anycontent.extensions.information.ActionInformation

public class ActionInformation
extends Information

This implementation allows to create an button that launch a javascript action.
This button is always present and have always the same appearance.


Nested Class Summary
 
Nested classes inherited from class com.anwrt.anycontent.extensions.information.Information
Information.Indicator, Information.Separator
 
Field Summary
 
Fields inherited from class com.anwrt.anycontent.extensions.information.Information
XML_INDICATOR, XML_INDICATOR_ACTION, XML_INDICATOR_ACTION_ID_PARAM, XML_INDICATOR_ACTION_PARAM, XML_INDICATOR_ACTION_PARAMS, XML_INDICATOR_ACTION_VALUE_PARAM, XML_INDICATOR_CATALOGUE, XML_INDICATOR_DISABLED, XML_INDICATOR_I18N_ATTRIBUTE, XML_INDICATOR_ICON, XML_INDICATOR_LABEL, XML_INDICATOR_SCRIPTS, XML_INDICATOR_SCRIPTS_SCRIPT, XML_INDICATOR_STYLE, XML_INDICATOR_TOOLTIP, XML_SEPARATOR
 
Constructor Summary
ActionInformation()
           
 
Method Summary
 void configure(Configuration configuration)
          At configuration time, this method is called to allow the class to configure.
 java.lang.Object[] getInformation(java.lang.String location, java.util.Map objectModel, ServiceManager manager, java.lang.String areaName)
          Generate an array of information components: indicator or separators.
 void initialize()
          Called at initialization time (after all components have been configured).
static boolean isActionInformation(Configuration configuration)
          Determines if an information configuration is an action
 boolean isEmpty(java.lang.String location, java.util.Map objectModel, ServiceManager manager, java.lang.String areaName)
          Determines if this information will return anything.
 
Methods inherited from class com.anwrt.anycontent.extensions.information.Information
getPluginId, getPluginName, setInformation, toSAX
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionInformation

public ActionInformation()
Method Detail

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Description copied from class: Information
At configuration time, this method is called to allow the class to configure.
You can not use deploy values at this time. See initialization.

Specified by:
configure in class Information
Parameters:
configuration - XML configuration from the plug file that declared this information (including the information declaring tag)
Throws:
ConfigurationException

initialize

public void initialize()
Description copied from class: Information
Called at initialization time (after all components have been configured).
You can use deploy values at this time if necessary to initialize your component

Specified by:
initialize in class Information

isEmpty

public boolean isEmpty(java.lang.String location,
                       java.util.Map objectModel,
                       ServiceManager manager,
                       java.lang.String areaName)
Description copied from class: Information
Determines if this information will return anything.
This method determines if getInformation will be called;
Carefull, return false means an information will exist! if not separators may appears at unwanted places.

Specified by:
isEmpty in class Information
Parameters:
location - The information toolbar location (site, page...) see constants in InformationManager
objectModel - Cocoon object model, to give access to the request and all others object,
manager - The manager to retrieve for example the repository.
areaName - The name of the area where the information is to be used on (or null if not applicable)
Returns:
true if the information will return nothing (getInformation will not be called)

getInformation

public java.lang.Object[] getInformation(java.lang.String location,
                                         java.util.Map objectModel,
                                         ServiceManager manager,
                                         java.lang.String areaName)
Description copied from class: Information
Generate an array of information components: indicator or separators.
When you implement this method you can return 2 kind of objects:
- inner class Indicator: for an indicator component
- inner class Separator: for a separator
You should not return a separator at begining or at end of the array (this could lead to a toolbar starting by a separator). The separators between yours information components and others will be set in the global information configuration.

Specified by:
getInformation in class Information
Parameters:
location - The toolbar location (site, page...) see constants in InformationManager
objectModel - Cocoon object model, to give access to the request and all others object,
manager - The manager to retrieve for example the repository.
areaName - The name of the area where the information is to be used on (or null if not applicable)
Returns:
An array of Indicator and Separator.

isActionInformation

public static boolean isActionInformation(Configuration configuration)
Determines if an information configuration is an action

Parameters:
configuration - An information configuration to check
Returns:
true if the configuration can be an action one


Copyright © 2006 Anyware Technologies. All Rights Reserved.