|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyFactory
An factory interface provided by the Property Broker.
It provides methods for creation of
PropertyController
, PropertyValue
, ActionController
and ParameterController
objects.
The PropertyFactory
interface is implemented by a PortletService
.
A portlet can obtain the service by using JNDI. A boolean guard may be used to guard uses of the PropertyFactory
by the portlet; this will enable the portlet to execute correctly in JSR-168 compliant portlet
containers outside of WebSphere Portal.
A snippet of the JNDI lookup code:
boolean propertyFactoryAvailable = false;
A similar interface,
PropertyFactory propertyFactory = null;
try {
Context ctx = new InitialContext();
PortletServiceHome serviceHome = (PortletServiceHome) ctx.lookup("portletservice/com.ibm.portal.propertybroker.service.PropertyFactory");
propertyFactory = (PropertyFactory)serviceHome.getPortletService(com.ibm.portal.propertybroker.service.PropertyFactory.class);
propertyFactoryAvailable = true;
}
catch(Throwable t) {
}
com.ibm.wps.pb.property.PropertyFactory
is available for use by portlets written to IBM's portlet API.
Method Summary | |
---|---|
ActionController |
createAction(javax.portlet.PortletConfig config)
Creates and returns an action associated with a portlet, given the PortletConfig . |
ActionController |
createAction(javax.portlet.PortletRequest request)
Creates and returns an action associated with a portlet, given the PortletRequest . |
ParameterController |
createParameter(Action action,
Property property)
Creates and returns a parameter associated with a portlet's action. |
PropertyController |
createProperty(javax.portlet.PortletConfig config)
Creates and returns a property associated with a portlet, given the PortletConfig . |
PropertyController |
createProperty(javax.portlet.PortletRequest request)
Creates and returns a property associated with a portlet, given the PortletRequest . |
PropertyValue |
createPropertyValue(javax.portlet.PortletRequest request,
Property property,
java.lang.Object value)
Creates and returns a PropertyValue . |
PropertyValue |
createPropertyValue(javax.portlet.PortletRequest request,
Property property,
java.lang.Object value,
PropertyValueChangeType changeType)
Creates and returns a PropertyValue with a change reason code. |
Method Detail |
---|
PropertyValue createPropertyValue(javax.portlet.PortletRequest request, Property property, java.lang.Object value) throws CreateFailedException, AccessFailedException
PropertyValue
.
PropertyValue encapsulates a Property with its value.
request
- the current portlet request. Must not be null.property
- the Property to be encapsulated in the returned object. Must not be null.value
- the value to be encapsulated in the returned object. May be null.
PropertyValue
object encapsulating the information passed in
CreateFailedException
AccessFailedException
PropertyValue
PropertyValue createPropertyValue(javax.portlet.PortletRequest request, Property property, java.lang.Object value, PropertyValueChangeType changeType) throws CreateFailedException, AccessFailedException
PropertyValue
with a change reason code.
PropertyValue encapsulates a Property with its value and a reason the value changed.
request
- the current portlet request. Must not be null.property
- the Property to be encapsulated in the returned object. Must not be null.value
- the value to be encapsulated in the returned object. May be null.changeType
- the reason the property value changed
PropertyValue
object encapsulating the information passed in
CreateFailedException
AccessFailedException
PropertyValue
PropertyController createProperty(javax.portlet.PortletRequest request) throws CreateFailedException
PortletRequest
.
PropertyController
has setters which allow various attribute values
to be set.
request
- the PortletRequest
object. Must not be null.
PropertyController
object created for this portlet
CreateFailedException
- if the property cannot be createdProperty
,
PropertyController
PropertyController createProperty(javax.portlet.PortletConfig config) throws CreateFailedException
PortletConfig
.
PropertyController
has setters which allow various attribute values
for the property to be set.
This will be typically done during the portlet's init() method.
config
- the PortletConfig
object. Must not be null.
PropertyController
object created for this portlet
CreateFailedException
- if the property cannot be createdProperty
,
PropertyController
ActionController createAction(javax.portlet.PortletRequest request) throws CreateFailedException
PortletRequest
.
ActionController
has setters which allow various attribute values
of the action to be set.
request
- the PortletRequest
object. Must not be null
ActionController
object created for this portlet
CreateFailedException
- if the action cannot be createdAction
,
ActionController
ActionController createAction(javax.portlet.PortletConfig config) throws CreateFailedException
PortletConfig
.
ActionController
has setters which allow various attribute values
of the action to be set.
This will be typically done during the portlet's init() method.
config
- the PortletConfig
object. Must not be null
ActionController
object created for this portlet
CreateFailedException
- if the action cannot be createdAction
,
ActionController
ParameterController createParameter(Action action, Property property) throws CreateFailedException
ParameterController
to modify any attributes
of the parameter prior to registering the action.
action
- the Action
the parameter is associated with. Must not be null.property
- the Property
the parameter is associated with. Must not be null.
ParameterController
object created for this portlet
CreateFailedException
- if the parameter cannot be createdParameterController
,
Action
,
Property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |