Overview Package Class Tree Serialized Deprecated Index Help PREV class NEXT class SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
com.ibm.wps.pb.property
Interface Property
- public interface Property
For use by portlets written to the IBM portlet API.
Encapsulates property information. A property represents a data type which can be produced or consumed by a portlet. The type information is used by the Property Broker to determine matches between properties produced by a source portlet and properties consumed by a target portlet. If a portlet declares actions in a WSDL file, the Action objects and their associated Parameter objects and
Property objects are created and registered automatically by the runtime. Each Parameter object is associated with a
Property object. If actions are not declared in a WSDL file, PropertyFactory may be used to create instances of
Property. After instantiation, required fields must be set using setters. If a portlet does not use
Actions, it may register
Property objects exclusively. Such properties are not associated with actions, but are "standalone". In this event, the portlet must also implement the PropertyListener interface, and changes to property values will be delivered through the
setProperties method of that interface.
- Since:
- 5.0
- See Also:
- PropertyFactory, Action, Parameter, PropertyListener
Field Summary static int IN
IN indicates that the portlet produces the property.static int OUT
OUT indicates that the portlet consumes the property.
Method Summary java.lang.String getClassname()
Returns the fully qualified java class name for the property object.java.lang.String getDefaultValue()
Returns a default value for the property.java.lang.String getDescription()
Deprecated.java.lang.String java.util.Locale)">getDescription(java.util.Locale locale)
Returns a text description for this property for the provided locale.int getDirection()
Returns whether the property is produced or consumed.java.lang.String getName()
Returns the name of theProperty.
java.lang.String getNamespace()
Returns a string containing the type namespace.java.lang.Object getOwnerId()
Returns anObject whose hashcode and equals method may be used to identify the portlet that registered this property.
java.lang.String getTitle()
Deprecated.java.lang.String java.util.Locale)">getTitle(java.util.Locale locale)
Returns a short description for this property for the provided locale.java.lang.String getType()
Returns a string containing the property type.boolean isImplementedBy(org.apache.jetspeed.portlet.PortletSettings caller)
Returns true if the property was registered by the calling portlet.void setClassname(java.lang.String classname)
Sets the name of the java class encapsulating the property value.void setDefaultValue(java.lang.String defaultValue)
Sets a default value for this property.void setDescription(java.lang.String descriptionKey)
Deprecated.void setDescriptionKey(java.lang.String descriptionKey)
Sets the key used for retrieving the localized description.void setDirection(int direction)
Sets the direction of this property, i.e, whether it is produced or consumed.void java.util.Locale[])">setLocalizationInfo(java.lang.String nlsFileName, org.apache.jetspeed.portlet.PortletContext context, java.util.Locale[] locales)
This data is used to retrieve internationalized versions of the title and description.void setName(java.lang.String name)
Sets the name of the property.void setNamespace(java.lang.String namespace)
Sets the namespace of the property.void setTitle(java.lang.String titleKey)
Deprecated.void setTitleKey(java.lang.String titleKey)
Sets the key used for retrieving the localized title.void setType(java.lang.String type)
Sets the type of the property.
Field Detail IN
public static final int IN
- IN indicates that the portlet produces the property.
- See Also:
- Constant Field Values
OUT
public static final int OUT
- OUT indicates that the portlet consumes the property.
- See Also:
- Constant Field Values
Method Detail getName
public java.lang.String getName()
- Returns the name of the
Property. Property names must be unique within a portlet instance. The name is a required field (i.e. must not be null).
- Returns:
- a
String containing the name of the property.
getType
public java.lang.String getType()
- Returns a string containing the property type. This should identify the semantics of the property e.g. PhoneNo, orderID etc. This field is required. This field is used in conjunction with the namespace and attribute to determine type matches.
- Returns:
- a
String containing the property type.
- See Also:
- getNamespace(), getClassname()
getNamespace
public java.lang.String getNamespace()
- Returns a string containing the type namespace. A namespace may be used to group related types in a domain of types. This is optional. No namespace is indicated by the empty string. If specified, it will be used in conjunction with type to restrict matches.
- Returns:
- a
String containing the type namespace.
- See Also:
- getType()
getClassname
public java.lang.String getClassname()
- Returns the fully qualified java class name for the property object. An instance of this will be used to encapsulate the value of the property.
- Returns:
- the fully qualified java class name for the property object.
getDirection
public int getDirection()
- Returns whether the property is produced or consumed.
getTitle
public java.lang.String getTitle()
- Deprecated.
- This method is deprecated. Use the locale-specific version.
- Returns:
- a short description for this property. Used by tools.
- See Also:
- java.util.Locale)">getTitle(Locale)
java.util.Locale)">getTitle
public java.lang.String getTitle(java.util.Locale locale)
- Returns a short description for this property for the provided locale. Displayed by tools as an aid to the user.
- Parameters:
- locale - the current locale
- Returns:
- a short description for this property for the provided locale.
getDescription
public java.lang.String getDescription()
- Deprecated.
- This method is deprecated. Use the locale-specific version.
- Returns:
- a text description for this property. Used by tools/help text.
- See Also:
- java.util.Locale)">getDescription(Locale)
java.util.Locale)">getDescription
public java.lang.String getDescription(java.util.Locale locale)
- Returns a text description for this property for the provided locale. Displayed by tools or help text as an aid to the user.
- Parameters:
- locale - the current locale
- Returns:
- a text description for this property for the provided locale.
getDefaultValue
public java.lang.String getDefaultValue()
- Returns a default value for the property. If no default value was specified, will return null.
- Returns:
- a default value for the property.
getOwnerId
public java.lang.Object getOwnerId()
- Returns an
Object whose hashcode and equals method may be used to identify the portlet that registered this property.
- Returns:
- an
Object identifying the portlet which registered this property
isImplementedBy
public boolean isImplementedBy(org.apache.jetspeed.portlet.PortletSettings caller)
- Returns true if the property was registered by the calling portlet.
- Parameters:
- caller - the PortletSettings object representing the calling portlet.
- Returns:
- true if the calling portlet registered this property
setName
public void setName(java.lang.String name)
- Sets the name of the property.
- Parameters:
- name - the name
- See Also:
- getName()
setType
public void setType(java.lang.String type)
- Sets the type of the property.
- Parameters:
- type - the type
- See Also:
- getType()
setNamespace
public void setNamespace(java.lang.String namespace)
- Sets the namespace of the property.
- Parameters:
- namespace - the namespace
- See Also:
- getNamespace()
setClassname
public void setClassname(java.lang.String classname)
- Sets the name of the java class encapsulating the property value.
- Parameters:
- classname - the name of the java class for the property value
- See Also:
- getClassname()
setDirection
public void setDirection(int direction) throws InvalidPropertyException
- Sets the direction of this property, i.e, whether it is produced or consumed.
- Parameters:
- direction - the value of the direction attribute. The value must be one of
IN or
OUT constants defined in this class
- Throws:
- InvalidPropertyException - is thrown if the direction specifies an invalid value.
- See Also:
IN,
OUT, getDirection()
setTitle
public void setTitle(java.lang.String titleKey)
- Deprecated.
- This method is deprecated. Use
setTitleKey instead.
- Parameters:
- titleKey - the key for the title
- See Also:
- setTitleKey(String)
setTitleKey
public void setTitleKey(java.lang.String titleKey)
- Sets the key used for retrieving the localized title. Used in conjunction with
setLocalizationInfo.
setDescription
public void setDescription(java.lang.String descriptionKey)
- Deprecated.
- This method is deprecated. Use
setDescriptionKey instead.
- Parameters:
- descriptionKey - the key for the description
- See Also:
- #setDescriptionKey(), java.util.Locale)">getDescription(Locale)
setDescriptionKey
public void setDescriptionKey(java.lang.String descriptionKey)
- Sets the key used for retrieving the localized description. Used in conjunction with
setLocalizationInfo.
- Parameters:
- descriptionKey - the key for the description
- See Also:
- java.util.Locale[])">setLocalizationInfo(java.lang.String, org.apache.jetspeed.portlet.PortletContext, java.util.Locale[])
java.util.Locale[])">setLocalizationInfo
public void setLocalizationInfo(java.lang.String nlsFileName, org.apache.jetspeed.portlet.PortletContext context, java.util.Locale[] locales)
- This data is used to retrieve internationalized versions of the title and description. If the
Property is set as a result of registering an Action, the localization info for the Action will be used. This method only needs to be invoked if the
Property is registered standalone, i.e, not associated with an Action.
- Parameters:
- nlsFileName - the base name of the NLS resource file(s) containing the translated strings
- context - the PortletContext for the portlet this property is associated with
- locales - the locales supported by this portlet
- See Also:
- java.util.Locale)">getTitle(Locale), java.util.Locale)">getDescription(Locale)
setDefaultValue
public void setDefaultValue(java.lang.String defaultValue)
- Sets a default value for this property. At present, a default value may be provided only if the java class of the property value is
java.lang.String.
- Parameters:
- defaultValue - the default value of the property
- See Also:
- getDefaultValue()
Overview Package Class Tree Serialized Deprecated Index Help PREV class NEXT class SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.