planetj.dataengine.action
Class ActionDescriptor

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byplanetj.property.PropertyGroup
              extended byplanetj.property.DefaultPropertyGroup
                  extended byplanetj.dataengine.action.ActionDescriptor
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.util.Map, java.io.Serializable
Direct Known Subclasses:
PagingPropertyGroup

public class ActionDescriptor
extends DefaultPropertyGroup

An ActionDisplayDescriptor property group contains all the information needed in order to display the action.

See Also:
Serialized Form

Field Summary
static java.lang.String ACTION_DISPLAY_DESCRIPTOR
          Used for the default ActionDisplayDescriptor's property group name.
static java.lang.String ACTION_NAME
          Action name (e.g.
static java.lang.String ACTION_TYPE
          Action type (e.g.
static java.util.List ALL_ACTION_DESCRIPTOR_PROPERTIES
          List of String property names.
static java.lang.String className
          Class name.
static java.lang.String DESCRIPTION
          Description of action to display.
static java.lang.String DETAILS_LOCATION
           
static java.lang.String DETAILS_MODE
          When showing details, during which modes do we generate actions?
static java.lang.String DETAILS_MODE_COPY
           
static java.lang.String DETAILS_MODE_DELETE
           
static java.lang.String DETAILS_MODE_EDIT
           
static java.lang.String DETAILS_MODE_INSERT
           
static java.lang.String DETAILS_MODE_VIEW
           
static java.lang.String DISPLAY_TYPE
          How to display the action (e.g.
static java.lang.String DISPLAY_TYPE_BUTTON
           
static java.lang.String DISPLAY_TYPE_CHECKBOX
           
static java.lang.String DISPLAY_TYPE_LINK
           
static java.lang.String IMAGE_SRC
          Image URI to use for generated action's background.
static java.lang.String LABEL
          Label when displaying action.
static java.lang.String LOCATION
          Location of where to generate the action.
static java.lang.String LOCATION_BOTTOM_LEFT
           
static java.lang.String LOCATION_BOTTOM_RIGHT
           
static java.lang.String LOCATION_BUTTONS_FAR_LEFT
           
static java.lang.String LOCATION_BUTTONS_FAR_RIGHT
           
static java.lang.String LOCATION_BUTTONS_LEFT
           
static java.lang.String LOCATION_BUTTONS_RIGHT
           
static java.lang.String LOCATION_HEADER
           
static java.lang.String LOCATION_INLINE
           
static java.lang.String LOCATION_NONE
           
static java.lang.String LOCATION_PARAMETER_SEARCH_LEFT
           
static java.lang.String LOCATION_PARAMETER_SEARCH_RIGHT
           
static java.lang.String LOCATION_TOOLBAR
           
static java.lang.String LOCATION_TOP_LEFT
           
static java.lang.String LOCATION_TOP_RIGHT
           
static java.lang.String LOCATION_UNKNOWN
           
static java.lang.String NAVIGATION_GROUP_END
          Whether or not this action should end the current navigation group.
static java.lang.String NAVIGATION_GROUP_START
          Whether or not this action should start a new navigation group.
static java.lang.String NEW_WINDOW_PROPERTIES
          Properties for the new window (only applicable if a target is specified).
static java.lang.String NO_SELECTION_ERROR
          The error message to display when no row is selected
static java.lang.String TARGET
          Target window to load action in.
 
Fields inherited from class planetj.property.PropertyGroup
ALL, ALL_FALSE, ALL_TRUE, BOOLEAN_PROPERTY, DATE_PROPERTY, DOUBLE_PROPERTY, FLOAT_PROPERTY, INTEGER_PROPERTY, JAVA_CLASS_PROPERTY, LIST_PROPERTY, MAP_PROPERTY, NONE, ROW_COLLECTION_KEY, STRING_PROPERTY
 
Constructor Summary
ActionDescriptor()
          ActionDescriptor constructor comment.
ActionDescriptor(int initialCapacity)
          ActionDescriptor constructor comment.
ActionDescriptor(java.lang.String propertyGroupName)
          ActionDescriptor constructor comment.
 
Method Summary
static ActionDescriptor createDescriptor(java.lang.String actionType, java.lang.String actionName)
          Convience method to create an ActionDescriptor for the given type and name.
 Property createProperty(java.lang.String pName, java.lang.Object pValue)
          Creates a new Property object based on a name and value (the Property is not added to this PropertyGroup).
 java.lang.String getActionName()
          Get the name of action being described for display.
 java.lang.String getActionType()
          Get the type of action being described for display.
 java.util.List getAllPropertyNames()
          Gets a List containing the names of all the supported properties, not including metaproperties.
 java.lang.String getDescription()
          Get the description of the action.
 java.util.List getDetailsLocations()
          Gets the List of locations where the action should be displayed on the details page.
 java.util.List getDetailsModes()
          Gets the List of modes when the action should be displayed in the details view
 java.lang.String getDisplayType()
          Get the display type to generate for action.
 java.lang.String getImageSource()
          Get the URI of image to use for the background of the display type.
 java.lang.String getLabel()
          Get the label of the action to generate when displayed.
 java.util.List getLayoutPropertyNames()
          Gets a List containing the names of all the supported properties, not including metaproperties.
 java.lang.String getLocation()
          Deprecated. Replaced by getLocations() since there could be more than one location
 java.util.List getLocations()
          Gets the List of locations where the action should be displayed.
 java.lang.String getNewWindowProperties()
          Gets the string containing properties for the new window
 java.lang.String getNoSelectionErrorMessage()
          Get the error message to display when a required selection hasn't been made
 java.lang.String getTarget()
          Get the target window the action should execute in.
 boolean hasNavigationEnd()
          Method to check whether or not this action discriptor specifies whether or not to end the current navigation group.
 boolean hasNavigationStart()
          Method to check whether or not this action discriptor specifies whether or not to start a new navigation group.
 boolean isNavigationEnd()
          Method to check whether or not this action discriptor specifies should end the current navigation group.
 boolean isNavigationStart()
          Method to check whether or not this action discriptor specifies should start a new navigation group.
protected  short propertyType(java.lang.String name)
          Gets the type of property for a specified property name.
 void setActionName(java.lang.String actionName)
          Set the name of action being described for display.
 void setActionType(java.lang.String actionType)
          Set the type of action being described for display.
 void setDisplayType(java.lang.String dspType)
          Set the display type for the action being displayed (button or link).
 void setEndNavigationGroup(boolean val)
          Set the if the action ends the navigation group or not
 void setImageSource(java.lang.String imgSource)
          Set the source image for the action being displayed.
 void setLabel(java.lang.String val)
          Set the label for the action being displayed
 void setLocation(java.lang.String location)
          Set the location where the action should be generated.
 void setStartNavigationGroup(boolean val)
          Set the if the action ends the navigation group or not
 void setTarget(java.lang.String target)
          Set the target window the action should execute in.
 java.lang.Object updateProperty(java.lang.String pName, java.lang.Object pValue)
          Updates a Property's value.
protected  void validate()
          Validates this property group, throwing a validation exception if there is a problem.
 
Methods inherited from class planetj.property.DefaultPropertyGroup
getDefaultPropertiesString, getRequiredPropertyNames
 
Methods inherited from class planetj.property.PropertyGroup
add, addProperty, addProperty, append, clone, compareTo, compareTo, compareTo, containsProperty, copyUndefinedPropertiesFrom, createValue, getAllMetapropertyNames, getAllSetBooleanPropertyNames, getAllSetIntPropertyNames, getAllSetListPropertyNames, getAllSetPropertyNames, getAllSetStringPropertyNames, getBooleanValue, getDateFormat, getDateValue, getDoubleValue, getFloatValue, getIntValue, getJavaClassValue, getListValue, getMapValue, getName, getProperty, getPropertyType, getStringValue, getValue, isMergeableOnList, isMetaproperty, iterator, mergeOnList, metapropertyType, put, put, put, setName, toString, validateMetadata, validateMetadataBoolean
 
Methods inherited from class java.util.HashMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

className

public static final java.lang.String className
Class name.


ACTION_DISPLAY_DESCRIPTOR

public static final java.lang.String ACTION_DISPLAY_DESCRIPTOR
Used for the default ActionDisplayDescriptor's property group name.

See Also:
Constant Field Values

ACTION_TYPE

public static final java.lang.String ACTION_TYPE
Action type (e.g. rc, row, column).

See Also:
Constant Field Values

ACTION_NAME

public static final java.lang.String ACTION_NAME
Action name (e.g. insert, update, etc...).

See Also:
Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
Description of action to display.

See Also:
Constant Field Values

DETAILS_MODE

public static final java.lang.String DETAILS_MODE
When showing details, during which modes do we generate actions?

See Also:
Constant Field Values

DETAILS_MODE_EDIT

public static final java.lang.String DETAILS_MODE_EDIT
See Also:
Constant Field Values

DETAILS_MODE_DELETE

public static final java.lang.String DETAILS_MODE_DELETE
See Also:
Constant Field Values

DETAILS_MODE_VIEW

public static final java.lang.String DETAILS_MODE_VIEW
See Also:
Constant Field Values

DETAILS_MODE_COPY

public static final java.lang.String DETAILS_MODE_COPY
See Also:
Constant Field Values

DETAILS_MODE_INSERT

public static final java.lang.String DETAILS_MODE_INSERT
See Also:
Constant Field Values

DISPLAY_TYPE

public static final java.lang.String DISPLAY_TYPE
How to display the action (e.g. button, link, etc...).

See Also:
Constant Field Values

DISPLAY_TYPE_BUTTON

public static final java.lang.String DISPLAY_TYPE_BUTTON
See Also:
Constant Field Values

DISPLAY_TYPE_LINK

public static final java.lang.String DISPLAY_TYPE_LINK
See Also:
Constant Field Values

DISPLAY_TYPE_CHECKBOX

public static final java.lang.String DISPLAY_TYPE_CHECKBOX
See Also:
Constant Field Values

IMAGE_SRC

public static final java.lang.String IMAGE_SRC
Image URI to use for generated action's background.

See Also:
Constant Field Values

LABEL

public static final java.lang.String LABEL
Label when displaying action.

See Also:
Constant Field Values

LOCATION

public static final java.lang.String LOCATION
Location of where to generate the action.

See Also:
Constant Field Values

DETAILS_LOCATION

public static final java.lang.String DETAILS_LOCATION
See Also:
Constant Field Values

LOCATION_TOOLBAR

public static final java.lang.String LOCATION_TOOLBAR
See Also:
Constant Field Values

LOCATION_HEADER

public static final java.lang.String LOCATION_HEADER
See Also:
Constant Field Values

LOCATION_INLINE

public static final java.lang.String LOCATION_INLINE
See Also:
Constant Field Values

LOCATION_TOP_LEFT

public static final java.lang.String LOCATION_TOP_LEFT
See Also:
Constant Field Values

LOCATION_TOP_RIGHT

public static final java.lang.String LOCATION_TOP_RIGHT
See Also:
Constant Field Values

LOCATION_BOTTOM_LEFT

public static final java.lang.String LOCATION_BOTTOM_LEFT
See Also:
Constant Field Values

LOCATION_BOTTOM_RIGHT

public static final java.lang.String LOCATION_BOTTOM_RIGHT
See Also:
Constant Field Values

LOCATION_BUTTONS_LEFT

public static final java.lang.String LOCATION_BUTTONS_LEFT
See Also:
Constant Field Values

LOCATION_BUTTONS_RIGHT

public static final java.lang.String LOCATION_BUTTONS_RIGHT
See Also:
Constant Field Values

LOCATION_BUTTONS_FAR_LEFT

public static final java.lang.String LOCATION_BUTTONS_FAR_LEFT
See Also:
Constant Field Values

LOCATION_BUTTONS_FAR_RIGHT

public static final java.lang.String LOCATION_BUTTONS_FAR_RIGHT
See Also:
Constant Field Values

LOCATION_PARAMETER_SEARCH_LEFT

public static final java.lang.String LOCATION_PARAMETER_SEARCH_LEFT
See Also:
Constant Field Values

LOCATION_PARAMETER_SEARCH_RIGHT

public static final java.lang.String LOCATION_PARAMETER_SEARCH_RIGHT
See Also:
Constant Field Values

LOCATION_UNKNOWN

public static final java.lang.String LOCATION_UNKNOWN
See Also:
Constant Field Values

LOCATION_NONE

public static final java.lang.String LOCATION_NONE
See Also:
Constant Field Values

TARGET

public static final java.lang.String TARGET
Target window to load action in.

See Also:
Constant Field Values

NAVIGATION_GROUP_START

public static final java.lang.String NAVIGATION_GROUP_START
Whether or not this action should start a new navigation group.

See Also:
Constant Field Values

NAVIGATION_GROUP_END

public static final java.lang.String NAVIGATION_GROUP_END
Whether or not this action should end the current navigation group.

See Also:
Constant Field Values

NO_SELECTION_ERROR

public static final java.lang.String NO_SELECTION_ERROR
The error message to display when no row is selected

See Also:
Constant Field Values

NEW_WINDOW_PROPERTIES

public static final java.lang.String NEW_WINDOW_PROPERTIES
Properties for the new window (only applicable if a target is specified). An example of some new window properies: toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=400

See Also:
Constant Field Values

ALL_ACTION_DESCRIPTOR_PROPERTIES

public static final java.util.List ALL_ACTION_DESCRIPTOR_PROPERTIES
List of String property names.

Constructor Detail

ActionDescriptor

public ActionDescriptor()
ActionDescriptor constructor comment.


ActionDescriptor

public ActionDescriptor(int initialCapacity)
ActionDescriptor constructor comment.

Parameters:
initialCapacity - int

ActionDescriptor

public ActionDescriptor(java.lang.String propertyGroupName)
ActionDescriptor constructor comment.

Method Detail

createProperty

public Property createProperty(java.lang.String pName,
                               java.lang.Object pValue)
Creates a new Property object based on a name and value (the Property is not added to this PropertyGroup). Override this method if you want a subclass of Property returned.

Overrides:
createProperty in class PropertyGroup

createDescriptor

public static ActionDescriptor createDescriptor(java.lang.String actionType,
                                                java.lang.String actionName)
Convience method to create an ActionDescriptor for the given type and name.


getActionName

public java.lang.String getActionName()
Get the name of action being described for display. (e.g. insert, update, etc...)


getActionType

public java.lang.String getActionType()
Get the type of action being described for display. (e.g. rc, row, col)


getAllPropertyNames

public java.util.List getAllPropertyNames()
Gets a List containing the names of all the supported properties, not including metaproperties.

Overrides:
getAllPropertyNames in class DefaultPropertyGroup

getDescription

public java.lang.String getDescription()
Get the description of the action.


getDetailsLocations

public java.util.List getDetailsLocations()
Gets the List of locations where the action should be displayed on the details page. (Locations are always uppercase.)


getDetailsModes

public java.util.List getDetailsModes()
Gets the List of modes when the action should be displayed in the details view


getDisplayType

public java.lang.String getDisplayType()
Get the display type to generate for action. (e.g. button, link, etc...)


getImageSource

public java.lang.String getImageSource()
Get the URI of image to use for the background of the display type.


getLabel

public java.lang.String getLabel()
Get the label of the action to generate when displayed.


getLayoutPropertyNames

public java.util.List getLayoutPropertyNames()
Gets a List containing the names of all the supported properties, not including metaproperties.


getLocation

public java.lang.String getLocation()
Deprecated. Replaced by getLocations() since there could be more than one location

Gets one location where the action should be displayed.


getLocations

public java.util.List getLocations()
Gets the List of locations where the action should be displayed. (Locations are always uppercase.)


getNewWindowProperties

public java.lang.String getNewWindowProperties()
Gets the string containing properties for the new window


getNoSelectionErrorMessage

public java.lang.String getNoSelectionErrorMessage()
Get the error message to display when a required selection hasn't been made


getTarget

public java.lang.String getTarget()
Get the target window the action should execute in.


isNavigationEnd

public boolean isNavigationEnd()
Method to check whether or not this action discriptor specifies should end the current navigation group. If not specified in the property group, false is returned. Note: should be used in conjuction with hasNavigationEnd in order to determine if anything should be set.


isNavigationStart

public boolean isNavigationStart()
Method to check whether or not this action discriptor specifies should start a new navigation group. If not specified in the property group, false is returned. Note: should be used in conjuction with hasNavigationStart in order to determine if anything should be set.


hasNavigationEnd

public boolean hasNavigationEnd()
Method to check whether or not this action discriptor specifies whether or not to end the current navigation group.


hasNavigationStart

public boolean hasNavigationStart()
Method to check whether or not this action discriptor specifies whether or not to start a new navigation group.


propertyType

protected short propertyType(java.lang.String name)
Gets the type of property for a specified property name.

Overrides:
propertyType in class DefaultPropertyGroup

setActionName

public void setActionName(java.lang.String actionName)
Set the name of action being described for display. (e.g. insert, update, etc...)


setActionType

public void setActionType(java.lang.String actionType)
Set the type of action being described for display. (e.g. rc, row, column, etc...)


setDisplayType

public void setDisplayType(java.lang.String dspType)
Set the display type for the action being displayed (button or link).


setEndNavigationGroup

public void setEndNavigationGroup(boolean val)
Set the if the action ends the navigation group or not


setImageSource

public void setImageSource(java.lang.String imgSource)
Set the source image for the action being displayed.


setLabel

public void setLabel(java.lang.String val)
Set the label for the action being displayed


setLocation

public void setLocation(java.lang.String location)
Set the location where the action should be generated.


setStartNavigationGroup

public void setStartNavigationGroup(boolean val)
Set the if the action ends the navigation group or not


setTarget

public void setTarget(java.lang.String target)
Set the target window the action should execute in. This method allows adding "new window" property to action => ad.setTarget("_blank")


updateProperty

public java.lang.Object updateProperty(java.lang.String pName,
                                       java.lang.Object pValue)
Description copied from class: PropertyGroup
Updates a Property's value. If the property does not exist in this PropertyGroup, a new Property object is created.

Overrides:
updateProperty in class PropertyGroup
Returns:
The old value of the property before it was updated

validate

protected void validate()
                 throws ValidationException
Description copied from class: PropertyGroup
Validates this property group, throwing a validation exception if there is a problem. Subclasses may override this method as long as they invoke the superclass method

Overrides:
validate in class PropertyGroup
Throws:
ValidationException