public class ServletLinkBuilder extends RequestParameterLinkBuilder
The Servlet implementation of LinkBuilder.
This extends the default builder to provide better page URIs for enhanced search engine optimization.
For references to a page:pageId>pageId>?f=<formatId>pageTypeId>pageTypeId>?f=<formatId>objectId>objectId>&f=<formatId>| Modifier and Type | Field and Description |
|---|---|
protected String |
objectUri |
protected String |
pageTypeUri |
protected String |
pageUri |
| Modifier | Constructor and Description |
|---|---|
|
ServletLinkBuilder(WebFrameworkConfigElement webFrameworkConfigElement,
ModelObjectService modelObjectService,
ResourceService resourceService)
This is the preferred constructor to use when instantiating a
PortletLinkBuilder because
it allows the services to be set directly. |
protected |
ServletLinkBuilder(WebFrameworkServiceRegistry serviceRegistry)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
String |
object(RequestContext context,
String resourceId,
String formatId,
Map<String,String> params)
Constructs a link to a given object.
|
String |
page(RequestContext context,
String pageId,
String formatId,
String objectId,
Map<String,String> params)
Constructs a link to a given page for a given format.
|
String |
pageType(RequestContext context,
String pageTypeId,
String formatId,
String objectId,
Map<String,String> params)
Constructs a link to a given page type for a given format.
|
String |
resource(RequestContext context,
String uri)
Constructs a link to a resources at a given relative uri.
|
void |
setObjectUri(String objectUri)
Sets the object uri.
|
void |
setPageTypeUri(String pageTypeUri)
Sets the page type uri.
|
void |
setPageUri(String pageUri)
Sets the page uri.
|
object, object, page, page, page, pageType, pageType, pageTypegetObjectService, getResourceService, getServiceRegistry, getWebFrameworkConfigurationprotected String pageUri
protected String pageTypeUri
protected String objectUri
protected ServletLinkBuilder(WebFrameworkServiceRegistry serviceRegistry)
serviceRegistry - WebFrameworkServiceRegistrypublic ServletLinkBuilder(WebFrameworkConfigElement webFrameworkConfigElement, ModelObjectService modelObjectService, ResourceService resourceService)
This is the preferred constructor to use when instantiating a PortletLinkBuilder because
it allows the services to be set directly.
webFrameworkConfigElement - WebFrameworkConfigElementmodelObjectService - ModelObjectServiceresourceService - ResourceServicepublic void setPageUri(String pageUri)
pageUri - the new page uripublic void setPageTypeUri(String pageTypeUri)
pageTypeUri - the new page type uripublic void setObjectUri(String objectUri)
objectUri - the new object uripublic String page(RequestContext context, String pageId, String formatId, String objectId, Map<String,String> params)
LinkBuilderpage in interface LinkBuilderpage in class RequestParameterLinkBuildercontext - The Request Context instancepageId - The id of the page instanceformatId - The id of the format to renderobjectId - The id of the objectparams - A map of name/value pairs to be appended to the URLpublic String pageType(RequestContext context, String pageTypeId, String formatId, String objectId, Map<String,String> params)
LinkBuilderpageType in interface LinkBuilderpageType in class RequestParameterLinkBuildercontext - The Request Context instancepageTypeId - The type of the pageformatId - The id of the format to renderobjectId - The id of the objectparams - A map of name/value pairs to be appended to the URLpublic String object(RequestContext context, String resourceId, String formatId, Map<String,String> params)
LinkBuilderobject in interface LinkBuilderobject in class RequestParameterLinkBuildercontext - The Request Context instanceresourceId - The id of the objectformatId - The id of the format to renderparams - A map of name/value pairs to be appended to the URLpublic String resource(RequestContext context, String uri)
LinkBuilderresource in interface LinkBuilderresource in class RequestParameterLinkBuildercontext - RequestContexturi - StringCopyright © 2005–2016 Alfresco Software. All rights reserved.