org.palo.api.parameters
Interface ParameterProvider


public interface ParameterProvider

A ParameterProvider can be used to transport arbitrary parameters to any ParameterReceiver. How these parameters are generated is up to the specific implementation of the provider. For an example, have a look at the org.palo.viewapi.uimodels.folders package.

Version:
$Id: ParameterProvider.html,v 1.3 2009/07/09 11:01:47 ArndHouben Exp $

Method Summary
 java.lang.String[] getParameterNames()
          Returns all parameter names sent by this provider.
 java.lang.Object[] getPossibleValuesFor(java.lang.String parameterName)
          Returns all possible values for the given parameter name.
 ParameterReceiver getSourceObject()
          Returns the parameter receiver that is listening to this provider.
 void setParameterNames(java.lang.String[] parameterNames)
          Sets all parameter names that can be sent by this provider.
 void setPossibleValuesFor(java.lang.String parameterName, java.lang.Object[] possibleValues)
          Sets all possible values for the given parameter name.
 void setSourceObject(ParameterReceiver sourceObject)
          Sets the parameter receiver for this provider.
 

Method Detail

getSourceObject

ParameterReceiver getSourceObject()
Returns the parameter receiver that is listening to this provider. TODO what about multiple receivers?

Returns:
the parameter receiver that is listening to this provider.

setSourceObject

void setSourceObject(ParameterReceiver sourceObject)
Sets the parameter receiver for this provider.

Parameters:
sourceObject - the new parameter receiver.

getParameterNames

java.lang.String[] getParameterNames()
Returns all parameter names sent by this provider.

Returns:
all parameter names sent by this provider.

setParameterNames

void setParameterNames(java.lang.String[] parameterNames)
Sets all parameter names that can be sent by this provider.

Parameters:
parameterNames - the new set of parameter names understood by this provider.

getPossibleValuesFor

java.lang.Object[] getPossibleValuesFor(java.lang.String parameterName)
Returns all possible values for the given parameter name.

Parameters:
parameterName - the parameter name for which all possible values are to be returned.
Returns:
all possible values for the given parameter name.

setPossibleValuesFor

void setPossibleValuesFor(java.lang.String parameterName,
                          java.lang.Object[] possibleValues)
Sets all possible values for the given parameter name.

Parameters:
parameterName - the parameter name for which all possible values are to be set.
possibleValues - the possible values for the given parameter.