Example usage for com.liferay.portal.kernel.portlet FriendlyURLMapper setMapping

List of usage examples for com.liferay.portal.kernel.portlet FriendlyURLMapper setMapping

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.portlet FriendlyURLMapper setMapping.

Prototype

public void setMapping(String mapping);

Source Link

Document

Sets the friendly URL mapping for this portlet.

Usage

From source file:com.liferay.portlet.PortletBagFactory.java

License:Open Source License

protected FriendlyURLMapper newFriendlyURLMapper(Portlet portlet) throws Exception {

    if (Validator.isNull(portlet.getFriendlyURLMapperClass())) {
        return null;
    }//w w  w .  j a v  a  2  s.com

    FriendlyURLMapper friendlyURLMapper = (FriendlyURLMapper) newInstance(FriendlyURLMapper.class,
            portlet.getFriendlyURLMapperClass());

    friendlyURLMapper.setMapping(portlet.getFriendlyURLMapping());
    friendlyURLMapper.setPortletId(portlet.getPortletId());
    friendlyURLMapper.setPortletInstanceable(portlet.isInstanceable());

    Router router = newFriendlyURLRouter(portlet);

    friendlyURLMapper.setRouter(router);

    return friendlyURLMapper;
}