public class RequestParameterLinkBuilder extends AbstractLinkBuilder
A link builder which supports linking to dispatch state via request parameters.
This provides a very simple, request-parameter driven way of creating URLs. URLs are created according to the following design:
For references to a page:pageId>pageId>&f=<formatId>pageTypeId>pageTypeId>&f=<formatId>objectId>objectId>&f=<formatId>| Modifier | Constructor and Description |
|---|---|
|
RequestParameterLinkBuilder(WebFrameworkConfigElement webFrameworkConfigElement,
ModelObjectService modelObjectService,
ResourceService resourceService)
This is the preferred constructor to use when instantiating a
RequestParameterLinkBuilder because
it allows the services to be set directly. |
protected |
RequestParameterLinkBuilder(WebFrameworkServiceRegistry serviceRegistry)
Deprecated.
Because it relies on the supplied
WebFrameworkServiceRegistry to obtain the required services. |
| Modifier and Type | Method and Description |
|---|---|
String |
object(RequestContext context,
String objectId,
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.
|
object, object, page, page, page, pageType, pageType, pageTypegetObjectService, getResourceService, getServiceRegistry, getWebFrameworkConfigurationprotected RequestParameterLinkBuilder(WebFrameworkServiceRegistry serviceRegistry)
WebFrameworkServiceRegistry to obtain the required services.serviceRegistry - WebFrameworkServiceRegistrypublic RequestParameterLinkBuilder(WebFrameworkConfigElement webFrameworkConfigElement, ModelObjectService modelObjectService, ResourceService resourceService)
This is the preferred constructor to use when instantiating a RequestParameterLinkBuilder because
it allows the services to be set directly.
webFrameworkConfigElement - WebFrameworkConfigElementmodelObjectService - ModelObjectServiceresourceService - ResourceServicepublic String page(RequestContext context, String pageId, String formatId, String objectId, Map<String,String> params)
LinkBuilderpage in interface LinkBuilderpage in class AbstractLinkBuildercontext - 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 AbstractLinkBuildercontext - 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 objectId, String formatId, Map<String,String> params)
LinkBuilderobject in interface LinkBuilderobject in class AbstractLinkBuildercontext - The Request Context instanceobjectId - 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 AbstractLinkBuildercontext - RequestContexturi - StringCopyright © 2005–2016 Alfresco Software. All rights reserved.