OME
Class PluginParameter

java.lang.Object
  |
  +--OME.PluginParameter

public class PluginParameter
extends java.lang.Object

This class serves as a means of conveying information from the user to a PluginMethod before the latter is invoked. PluginParameters are specifically used to convey the cardinality (how many pieces of information are being requested), the type (the type of information been requested), and a helpful message that can be displayed to convey some message to the user.

With the current implementation, the only cardinality being supported is CARDINALITY_ONE.


Field Summary
static int CARDINALITY_ONE
           
static int CARDINALITY_ONE_OR_MORE
           
static int CARDINALITY_TWO_OR_MORE
           
static int CARDINALITY_ZERO_OR_MORE
           
static java.lang.Class IntegerType
          We support Integers as plugin parameters.
static java.lang.Class LocationType
          We support Locations as plugin parameters.
static java.lang.Class OMEContextType
          We support ViewContexts as plugin parameters.
static java.lang.Class OMEElementType
          We support OMEElements as plugin parameters.
static java.lang.Class OMELinkType
          We support OMELink as plugin parameters.
static java.lang.Class OMEObjectType
          We support OMEObjects as plugin parameters.
static java.lang.Class StringType
          We support Strings as plugin parameters.
 
Constructor Summary
PluginParameter()
          Creates a Plugin Parameter with cardinality CARDINALITY_ONE, of type String, and with no message.
PluginParameter(int cardinality, java.lang.String message, java.lang.Class type)
          Creates a PluginParameter with the specified cardinality, type and message
 
Method Summary
 int getCardinality()
          Returns the cardinality.
 java.lang.String getMessage()
          Returns said helpful message.
 java.lang.Class getType()
          Returns the type of parameter expected.
 void setCardinality(int cardinality)
          Set the cardinality.
 void setMessage(java.lang.String message)
          Sets a helpful message that can be displayed for the user to indicate what value is desired.
 void setType(java.lang.Class type)
          Sets the type of parameter expected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CARDINALITY_ONE

public static final int CARDINALITY_ONE

CARDINALITY_ZERO_OR_MORE

public static final int CARDINALITY_ZERO_OR_MORE

CARDINALITY_ONE_OR_MORE

public static final int CARDINALITY_ONE_OR_MORE

CARDINALITY_TWO_OR_MORE

public static final int CARDINALITY_TWO_OR_MORE

OMEObjectType

public static final java.lang.Class OMEObjectType
We support OMEObjects as plugin parameters.

OMEElementType

public static final java.lang.Class OMEElementType
We support OMEElements as plugin parameters.

OMELinkType

public static final java.lang.Class OMELinkType
We support OMELink as plugin parameters.

LocationType

public static final java.lang.Class LocationType
We support Locations as plugin parameters.

StringType

public static final java.lang.Class StringType
We support Strings as plugin parameters.

IntegerType

public static final java.lang.Class IntegerType
We support Integers as plugin parameters.

OMEContextType

public static final java.lang.Class OMEContextType
We support ViewContexts as plugin parameters.
Constructor Detail

PluginParameter

public PluginParameter()
Creates a Plugin Parameter with cardinality CARDINALITY_ONE, of type String, and with no message.

PluginParameter

public PluginParameter(int cardinality,
                       java.lang.String message,
                       java.lang.Class type)
Creates a PluginParameter with the specified cardinality, type and message
Parameters:
cardinality - the number of pieces of information requested. Note: The current implementation of OME3 only supports CARDINALITY_ONE.
message - a helpful message that can be displayed for the user to indicate what value is desired.
type - the type of information requested.
Method Detail

setCardinality

public void setCardinality(int cardinality)
Set the cardinality. Use the static cardinality values listed above (CARDINALITY_ONE, CARDINALITY_ZERO_OR_MORE etc.) Do not specify specific integer values like 7,8 etc.

Note: The current implementation of OME3 only supports CARDINALITY_ONE.

Parameters:
cardinality - the number of pieces of information requested.

getCardinality

public int getCardinality()
Returns the cardinality.

setMessage

public void setMessage(java.lang.String message)
Sets a helpful message that can be displayed for the user to indicate what value is desired.
Parameters:
message - the message to be displayed.

getMessage

public java.lang.String getMessage()
Returns said helpful message.

setType

public void setType(java.lang.Class type)
Sets the type of parameter expected. The list of parameter types support can be found in AbstractPluginMethod. Hopefully these types will be moved here eventually.
Parameters:
type - the type of information in this PluginParameter.
See Also:
AbstractPluginMethod

getType

public java.lang.Class getType()
Returns the type of parameter expected.