|
Liferay 6.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.kernel.portlet.BaseFriendlyURLMapper
public abstract class BaseFriendlyURLMapper
The base implementation of FriendlyURLMapper.
Typically not subclassed directly. DefaultFriendlyURLMapper and a
friendly-url-routes.xml file will handle the needs of most
portlets.
DefaultFriendlyURLMapper| Field Summary | |
|---|---|
protected Router |
router
|
| Constructor Summary | |
|---|---|
BaseFriendlyURLMapper()
|
|
| Method Summary | |
|---|---|
protected void |
addParam(Map<String,String[]> parameterMap,
String name,
Object value)
Deprecated. use addParameter(Map, String, Object) instead |
protected void |
addParam(Map<String,String[]> parameterMap,
String name,
String value)
Deprecated. use addParameter(String, Map, String, String)
instead |
protected void |
addParameter(Map<String,String[]> parameterMap,
String name,
Object value)
Adds a default namespaced parameter of any type to the parameter map. |
protected void |
addParameter(Map<String,String[]> parameterMap,
String name,
String value)
Adds a default namespaced string parameter to the parameter map. |
protected void |
addParameter(String namespace,
Map<String,String[]> parameterMap,
String name,
Object value)
Adds a namespaced parameter of any type to the parameter map. |
protected void |
addParameter(String namespace,
Map<String,String[]> parameterMap,
String name,
String value)
Adds a namespaced string parameter to the parameter map. |
String |
getMapping()
Gets the friendly URL mapping for this portlet. |
protected String |
getNamespace()
Gets the default namespace. |
String |
getPortletId()
Gets the id of this portlet |
Router |
getRouter()
Gets the router for this friendly URL mapper |
boolean |
isCheckMappingWithPrefix()
Determines if the friendly URLs for this mapper should include the friendly URL separator. |
boolean |
isPortletInstanceable()
Determines if this portlet is instanceable. |
void |
setMapping(String mapping)
Sets the friendly URL mapping for this portlet. |
void |
setPortletId(String portletId)
Sets the id of this portlet. |
void |
setPortletInstanceable(boolean portletInstanceable)
Sets whether this portlet is instanceable. |
void |
setRouter(Router router)
Sets the router for this friendly URL mapper. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.liferay.portal.kernel.portlet.FriendlyURLMapper |
|---|
buildPath, populateParams |
| Field Detail |
|---|
protected Router router
| Constructor Detail |
|---|
public BaseFriendlyURLMapper()
| Method Detail |
|---|
public String getMapping()
FriendlyURLMapper
The friendly URL mapping is used by Liferay to identify the portlet a
friendly URL refers to. It generally appears directly after the
/-/ in the URL.
For instance, the blogs portlet mapping is "blogs". This
produces friendly URLs similar to
http://www.liferay.com/web/guest/blog/-/blogs/example-post
getMapping in interface FriendlyURLMapperpublic String getPortletId()
FriendlyURLMapper
getPortletId in interface FriendlyURLMapperpublic Router getRouter()
FriendlyURLMapper
getRouter in interface FriendlyURLMappernull if one has not been setpublic boolean isCheckMappingWithPrefix()
FriendlyURLMapper
Typically, friendly URLs will include the separator "/-/"
before the friendly URL mapping. If this method returns
false, a single slash will be used instead.
This method is called by PortalImpl when
a friendly URL is processed.
It is strongly recommended that this method always return
true.
isCheckMappingWithPrefix in interface FriendlyURLMappertrue if the "/-/" separator should be
included in friendly URLs, or false if only a
"/" should be usedpublic boolean isPortletInstanceable()
FriendlyURLMapperThe value returned from this method has no effect on whether a portlet is instanceable, it is a helper method used to determine if the instance id should be included in the URL.
isPortletInstanceable in interface FriendlyURLMappertrue if the portlet is instanceable;
false otherwisepublic void setMapping(String mapping)
FriendlyURLMapper
This method is automatically called by PortletBagFactory with the friendly URL mapping
defined in liferay-portlet.xml.
setMapping in interface FriendlyURLMappermapping - the friendly URL mapping for this portletpublic void setPortletId(String portletId)
FriendlyURLMapper
This method is automatically called by PortletBagFactory with the portlet id defined in
liferay-portlet.xml.
setPortletId in interface FriendlyURLMapperportletId - the id of this portlet.public void setPortletInstanceable(boolean portletInstanceable)
FriendlyURLMapper
setPortletInstanceable in interface FriendlyURLMapperportletInstanceable - whether this portlet is instanceablepublic void setRouter(Router router)
FriendlyURLMapper
This method is automatically called by PortletBagFactory with a router populated with the
routes defined in this portlet's friendly-url-routes.xml file. The location of this file is defined
in this portlet's liferay-portlet.xml file.
setRouter in interface FriendlyURLMapperrouter - the router for this friendly URL mapper
protected void addParam(Map<String,String[]> parameterMap,
String name,
Object value)
addParameter(Map, String, Object) instead
protected void addParam(Map<String,String[]> parameterMap,
String name,
String value)
addParameter(String, Map, String, String)
instead
protected void addParameter(Map<String,String[]> parameterMap,
String name,
Object value)
Do not use this method with an instanceable portlet, it will not properly namespace parameter names.
parameterMap - the parameter map to populatename - the name of the parametervalue - the value of the parameteraddParameter(Map, String, String)
protected void addParameter(Map<String,String[]> parameterMap,
String name,
String value)
Do not use this method with an instanceable portlet, it will not properly namespace parameter names.
parameterMap - the parameter map to populatename - the name of the parametervalue - the value of the parametergetNamespace()
protected void addParameter(String namespace,
Map<String,String[]> parameterMap,
String name,
Object value)
namespace - the namespace for portlet parameters. For instanceable
portlets this must include the instance id.parameterMap - the parameter map to populatename - space the namespace for portlet parameters. For instanceable
portlets this must include the instance id.value - the value of the parameteraddParameter(String, Map, String, String)
protected void addParameter(String namespace,
Map<String,String[]> parameterMap,
String name,
String value)
namespace - the namespace for portlet parameters. For instanceable
portlets this must include the instance id.parameterMap - the parameter map to populatename - space the namespace for portlet parameters. For instanceable
portlets this must include the instance id.value - the value of the parameterPortalUtil.getPortletNamespace(String),
DefaultFriendlyURLMapper.getPortletId(Map)protected String getNamespace()
Do not use this method with an instanceable portlet, it will not include the instance id.
PortalUtil.getPortletNamespace(String)
|
Liferay 6.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||