com.ibm.portal.portlet.service.model
Interface VanityURLModelProvider

All Superinterfaces:
PortletService, VanityURLModelProvider

public interface VanityURLModelProvider
extends VanityURLModelProvider, PortletService

This interface provides access to the vanity URL model given a request and response.

 final javax.naming.Context ctx = new javax.naming.InitialContext();
 com.ibm.portal.portlet.service.PortletServiceHome home = (com.ibm.portal.portlet.service.PortletServiceHome) ctx.lookup(VanityURLModelProvider.JNDI_NAME);
 if (home != null) {
     VanityURLModelProvider provider = (VanityURLModelProvider) home.getPortletService(VanityURLModelProvider.class);
     VanityURLModel model = provider.getVanityURLModel(req, res);
     
     // use the model
 }
 

Since:
8.5

Field Summary
static java.lang.String JNDI_NAME
          The JNDI name to access the home interface.
 
Method Summary
<T extends VanityURLNode>
VanityURLModel<T>
getVanityURLModel(javax.portlet.PortletRequest req, javax.portlet.PortletResponse res)
          Returns a vanity URL model for a given request and response.
 

Field Detail

JNDI_NAME

static final java.lang.String JNDI_NAME
The JNDI name to access the home interface.

See Also:
Constant Field Values
Method Detail

getVanityURLModel

<T extends VanityURLNode> VanityURLModel<T> getVanityURLModel(javax.portlet.PortletRequest req,
                                                              javax.portlet.PortletResponse res)
                                                          throws ModelException
Returns a vanity URL model for a given request and response.

Parameters:
req - the current request
res - the current response
Returns:
the vanity URL model valid for the given request and response
Throws:
ModelException - in case the model cannot be obtained