public abstract class AbstractLinkBuilder extends BaseFactoryBean implements LinkBuilder
Abstract base class for LinkBuilder implementations. This is provided as a convenience to developers who wish to build their own custom LinkBuilder variations.
The Link Builder defines methods that are used generically to construct links to other pages, page types or objects within the system.
In general, links are either to specific "known" pages or to page placeholders that must be resolved when the link is clicked.Example - a link to a page:
| Constructor and Description |
|---|
AbstractLinkBuilder(WebFrameworkConfigElement webFrameworkConfigElement,
ModelObjectService modelObjectService,
ResourceService resourceService)
This is the preferred constructor to use when instantiating an
AbstractLinkBuilder. |
AbstractLinkBuilder(WebFrameworkServiceRegistry serviceRegistry)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
String |
object(RequestContext context,
String objectId)
Constructs a link to a given object.
|
String |
object(RequestContext context,
String objectId,
String formatId)
Constructs a link to a given object.
|
abstract 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)
Constructs a link to a given page instance.
|
String |
page(RequestContext context,
String pageId,
String formatId)
Constructs a link to a given page for a given format.
|
String |
page(RequestContext context,
String pageId,
String formatId,
String objectId)
Constructs a link to a given page for a given format.
|
abstract 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)
Constructs a link to a given page type.
|
String |
pageType(RequestContext context,
String pageTypeId,
String formatId)
Constructs a link to a given page type for a given format.
|
String |
pageType(RequestContext context,
String pageTypeId,
String formatId,
String objectId)
Constructs a link to a given page type for a given format.
|
abstract 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.
|
abstract String |
resource(RequestContext context,
String uri)
Constructs a link to a resources at a given relative uri.
|
getObjectService, getResourceService, getServiceRegistry, getWebFrameworkConfigurationpublic AbstractLinkBuilder(WebFrameworkServiceRegistry serviceRegistry)
This constructor has been deprecated because it uses the deprecated WebFrameworkServiceRegistry
to obtain the actual Spring bean elements needed by the AbstractLinkBuilder.
serviceRegistry - WebFrameworkServiceRegistrypublic AbstractLinkBuilder(WebFrameworkConfigElement webFrameworkConfigElement, ModelObjectService modelObjectService, ResourceService resourceService)
This is the preferred constructor to use when instantiating an AbstractLinkBuilder. By supplying the
WebFrameworkConfigElement, ModelObjectService and ResourceService arguments
directly (rather than obtaining them from the WebFrameworkServiceRegistry) you can have link builders
using different services.
webFrameworkConfigElement - WebFrameworkConfigElementmodelObjectService - ModelObjectServiceresourceService - ResourceServicepublic String page(RequestContext context, String pageId)
LinkBuilderpage in interface LinkBuildercontext - The Request Context instancepageId - The id of the page instancepublic String page(RequestContext context, String pageId, String formatId)
LinkBuilderpage in interface LinkBuildercontext - The Request Context instancepageId - The id of the page instanceformatId - The id of the format to renderpublic String page(RequestContext context, String pageId, String formatId, String objectId)
LinkBuilderpage in interface LinkBuildercontext - The Request Context instancepageId - The id of the page instanceformatId - The id of the format to renderobjectId - The id of the objectpublic abstract String page(RequestContext context, String pageId, String formatId, String objectId, Map<String,String> params)
LinkBuilderpage in interface LinkBuildercontext - 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)
LinkBuilderpageType in interface LinkBuildercontext - The Request Context instancepageTypeId - The type of the pagepublic String pageType(RequestContext context, String pageTypeId, String formatId)
LinkBuilderpageType in interface LinkBuildercontext - The Request Context instancepageTypeId - The type of the pageformatId - The id of the format to renderpublic String pageType(RequestContext context, String pageTypeId, String formatId, String objectId)
LinkBuilderpageType in interface LinkBuildercontext - The Request Context instancepageTypeId - The type of the pageformatId - The id of the format to renderobjectId - The id of the objectpublic abstract String pageType(RequestContext context, String pageTypeId, String formatId, String objectId, Map<String,String> params)
LinkBuilderpageType in interface LinkBuildercontext - 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)
LinkBuilderobject in interface LinkBuildercontext - The Request Context instanceobjectId - The id of the objectpublic String object(RequestContext context, String objectId, String formatId)
LinkBuilderobject in interface LinkBuildercontext - The Request Context instanceobjectId - The id of the objectformatId - The id of the format to renderpublic abstract String object(RequestContext context, String objectId, String formatId, Map<String,String> params)
LinkBuilderobject in interface LinkBuildercontext - 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 abstract String resource(RequestContext context, String uri)
LinkBuilderresource in interface LinkBuildercontext - RequestContexturi - StringCopyright © 2005–2016 Alfresco Software. All rights reserved.