Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.provider.v2
Class ParameterDefinition

java.lang.Object
  extended by oracle.portal.provider.v2.ParameterDefinition
All Implemented Interfaces:
Validateable
Direct Known Subclasses:
DefaultParameterDefinition

public class ParameterDefinition
extends java.lang.Object
implements Validateable

A ParameterDefinition is the definition of a parameter used either as an input parameter to the portlet's renderer, or as a parameter passed out of the portlet when an event is raised. As with Portlets, parameters have string elements which should be stored in a resource bundle so that they are translated. The following attributes can be retrieved from a resource bundle: displayName and description If using a resource bundle, be sure to set the key for lookup using setDisplayNameKey and setDescriptionKey respectively.


Constructor Summary
ParameterDefinition()
          Default constructor.
 
Method Summary
 java.lang.String getDescription(java.util.Locale l)
           
 java.lang.String getDescriptionKey()
           
 java.lang.String getDisplayName(java.util.Locale l)
           
 java.lang.String getDisplayNameKey()
           
 java.lang.String getName()
           
 java.util.ResourceBundle getResourceBundle(java.util.Locale l)
          Gets the resource bundle for this Portlet in the given Locale.
 void setDescription(java.lang.String description)
          Sets the parameter's description.
 void setDescriptionKey(java.lang.String descriptionKey)
          Sets the parameter's description key.
 void setDisplayName(java.lang.String displayName)
          Sets the parameter's display name.
 void setDisplayNameKey(java.lang.String displayNameKey)
          Sets the parameter's display name key.
 void setName(java.lang.String name)
          Sets the parameter's name.
 void setResource(java.lang.String resourceClassName)
          Sets the name of the default resource bundle class for this parameter
 void validate(java.lang.String context, ValidationError errors)
          Validates the internal state of this ParameterDefinition instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterDefinition

public ParameterDefinition()
Default constructor.

Method Detail

getResourceBundle

public java.util.ResourceBundle getResourceBundle(java.util.Locale l)
Gets the resource bundle for this Portlet in the given Locale.

Parameters:
l - the Locale of the resource bundle being requested.
Returns:
the resource bundle for this parameter. null if there isn't one.

setResource

public void setResource(java.lang.String resourceClassName)
Sets the name of the default resource bundle class for this parameter

Parameters:
resourceClassName - full name of class extending ResourceBundle.

getName

public java.lang.String getName()
Returns:
String this parameter's name.

setName

public void setName(java.lang.String name)
Sets the parameter's name. This name should be unique from any other parameters under the parent. This name must also be a legal string that can be passed as a URL parameter to the portlet's renderer.

Parameters:
name - the parameter's name.

getDisplayName

public java.lang.String getDisplayName(java.util.Locale l)
Returns:
String this parameter's display name.

setDisplayName

public void setDisplayName(java.lang.String displayName)
Sets the parameter's display name. This is a short name used in the Portal UI.

Parameters:
displayName - a friendly name to be used in the Portal UI.

getDisplayNameKey

public java.lang.String getDisplayNameKey()
Returns:
the key used to look up this parameter's display name from a resource bundle.

setDisplayNameKey

public void setDisplayNameKey(java.lang.String displayNameKey)
Sets the parameter's display name key.

Parameters:
displayNameKey - the string value for the key used to look up the parameter's display name in a resource bundle.

getDescription

public java.lang.String getDescription(java.util.Locale l)
Returns:
String this parameter's description .

setDescription

public void setDescription(java.lang.String description)
Sets the parameter's description. This is displayed in the Portal UI to give the page designer a better idea of what it will be used for.

Parameters:
description - a short description of what this parameter is.

getDescriptionKey

public java.lang.String getDescriptionKey()
Returns:
the key used to look up this parameter's description from a resource bundle.

setDescriptionKey

public void setDescriptionKey(java.lang.String descriptionKey)
Sets the parameter's description key.

Parameters:
descriptionKey - the string value for the key used to look up the parameter's description in a resource bundle.

validate

public void validate(java.lang.String context,
                     ValidationError errors)
Validates the internal state of this ParameterDefinition instance. Errors found are reported using the supplied ValidationError instance.

Specified by:
validate in interface Validateable
Parameters:
context - The context of the calling instance.
errors - The current list of errors.

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.