net.ontopia.topicmaps.webed.impl.basic
Class ActionParameters

java.lang.Object
  extended by net.ontopia.topicmaps.webed.impl.basic.ActionParameters
All Implemented Interfaces:
ActionParametersIF

public class ActionParameters
extends java.lang.Object
implements ActionParametersIF

INTERNAL: Default implementation of ActionParametersIF.


Constructor Summary
ActionParameters(java.lang.String fieldname, java.lang.String[] fieldvalues, FileValueIF filevalue, java.util.List params, TopicMapIF topicmap, WebEdRequestIF request)
           
 
Method Summary
 ActionParametersIF cloneAndOverride(java.util.List newparams)
          EXPERIMENTAL: Creates clones the ActionParametersIF object, overriding the parameter list to the given list.
 java.lang.Object get(int ix)
          PUBLIC: Returns the value of the numbered parameter as a single object.
 boolean getBooleanValue()
          PUBLIC: Returns true if the parameter value was 'on'; used with checkboxes to tell if the box was checked or not.
 java.util.Collection getCollection(int ix)
          PUBLIC: Returns the value of the numbered parameter as a collection containing all the parameter values.
 FileValueIF getFileValue()
          PUBLIC: Returns the parameter value as a file, if it was given as a file.
 int getParameterCount()
          PUBLIC: Returns the number of parameters.
 WebEdRequestIF getRequest()
          PUBLIC: Returns the web editor request that triggered this action.
 java.lang.String getStringValue()
          PUBLIC: Returns the string value of the request parameter that matched this action.
 java.lang.String[] getStringValues()
          PUBLIC: Returns the string values of the request parameter that matched this action.
 TMObjectIF getTMObjectValue()
          PUBLIC: Interprets the string value as a topic map object ID and returns that topic map object.
 java.util.Collection getTMObjectValues()
          PUBLIC: Interprets the string value as a set of topic map object IDs and returns a collection of topic map objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionParameters

public ActionParameters(java.lang.String fieldname,
                        java.lang.String[] fieldvalues,
                        FileValueIF filevalue,
                        java.util.List params,
                        TopicMapIF topicmap,
                        WebEdRequestIF request)
Method Detail

get

public java.lang.Object get(int ix)
Description copied from interface: ActionParametersIF
PUBLIC: Returns the value of the numbered parameter as a single object. If the parameter had multiple values only the first will be returned.

Specified by:
get in interface ActionParametersIF
Parameters:
ix - The index of the parameter, counting from 0.
Returns:
The first object in the collection, or null if it is empty.

getCollection

public java.util.Collection getCollection(int ix)
Description copied from interface: ActionParametersIF
PUBLIC: Returns the value of the numbered parameter as a collection containing all the parameter values.

Specified by:
getCollection in interface ActionParametersIF
Parameters:
ix - The index of the parameter, counting from 0.
Returns:
The entire collection.

getParameterCount

public int getParameterCount()
Description copied from interface: ActionParametersIF
PUBLIC: Returns the number of parameters.

Specified by:
getParameterCount in interface ActionParametersIF

getStringValue

public java.lang.String getStringValue()
Description copied from interface: ActionParametersIF
PUBLIC: Returns the string value of the request parameter that matched this action. If there is more than one value only the first will be returned.

Specified by:
getStringValue in interface ActionParametersIF

getStringValues

public java.lang.String[] getStringValues()
Description copied from interface: ActionParametersIF
PUBLIC: Returns the string values of the request parameter that matched this action.

Specified by:
getStringValues in interface ActionParametersIF

getBooleanValue

public boolean getBooleanValue()
Description copied from interface: ActionParametersIF
PUBLIC: Returns true if the parameter value was 'on'; used with checkboxes to tell if the box was checked or not.

Specified by:
getBooleanValue in interface ActionParametersIF

getTMObjectValue

public TMObjectIF getTMObjectValue()
Description copied from interface: ActionParametersIF
PUBLIC: Interprets the string value as a topic map object ID and returns that topic map object. Mainly used for selection lists and suchlike.

Specified by:
getTMObjectValue in interface ActionParametersIF

getTMObjectValues

public java.util.Collection getTMObjectValues()
Description copied from interface: ActionParametersIF
PUBLIC: Interprets the string value as a set of topic map object IDs and returns a collection of topic map objects. Mainly used for selection lists and suchlike.

Specified by:
getTMObjectValues in interface ActionParametersIF

getFileValue

public FileValueIF getFileValue()
Description copied from interface: ActionParametersIF
PUBLIC: Returns the parameter value as a file, if it was given as a file. If not, returns null.

Specified by:
getFileValue in interface ActionParametersIF

getRequest

public WebEdRequestIF getRequest()
Description copied from interface: ActionParametersIF
PUBLIC: Returns the web editor request that triggered this action.

Specified by:
getRequest in interface ActionParametersIF

cloneAndOverride

public ActionParametersIF cloneAndOverride(java.util.List newparams)
Description copied from interface: ActionParametersIF
EXPERIMENTAL: Creates clones the ActionParametersIF object, overriding the parameter list to the given list. This is useful for calling existing actions from custom actions.

Specified by:
cloneAndOverride in interface ActionParametersIF
Parameters:
newparams - The new parameter list. Each element in the list must be a java.util.Collection containing the value(s) for the parameter at that position.


Copyright © 2000-2012 Ontopia.