Package org.bonitasoft.engine.page
Interface PageMappingService
-
- All Known Implementing Classes:
PageMappingServiceImpl
public interface PageMappingService
Service that allows to map an arbitrary String key to a (Custom) Page or URL. Also allows to process the URL or Page return by providing an URLAdapter implementation that will be called automatically. Also allows to execute Authorization checkings by specifying rules to execute before returning the Page or URL.- Author:
- Baptiste Mesta, Emmanuel Duchastenier, Matthieu Chaffotte
- See Also:
URLAdapter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SPageMapping
create(java.lang.String key, java.lang.Long pageId, java.util.List<java.lang.String> authorizationRules)
SPageMapping
create(java.lang.String key, java.lang.String url, java.lang.String urlAdapter, java.util.List<java.lang.String> authorizationRules)
void
delete(SPageMapping SPageMapping)
delete this page mappingjava.util.List<SPageMapping>
get(long pageId, int startIndex, int maxResults)
Gets the paginated mappings of the page.SPageMapping
get(java.lang.String key)
SPageURL
resolvePageURL(SPageMapping pageMapping, java.util.Map<java.lang.String,java.io.Serializable> context, boolean executeAuthorizationRules)
void
update(SPageMapping pageMapping, java.lang.Long pageId)
update the given page mappingvoid
update(SPageMapping pageMapping, java.lang.String url, java.lang.String urlAdapter)
update the given page mapping
-
-
-
Method Detail
-
create
SPageMapping create(java.lang.String key, java.lang.Long pageId, java.util.List<java.lang.String> authorizationRules) throws SObjectCreationException
- Parameters:
key
- the key used to retrieve the mappingpageId
- the id of the custom pageauthorizationRules
- the names of the authorization rules to execute- Returns:
- the created page mapping
- Throws:
SObjectCreationException
- when there is an issue while creating this object- Since:
- 7.0.0
-
create
SPageMapping create(java.lang.String key, java.lang.String url, java.lang.String urlAdapter, java.util.List<java.lang.String> authorizationRules) throws SObjectCreationException
- Parameters:
key
- the key used to retrieve the mappingurl
- the external URL the mapping points tourlAdapter
- the name of the URL adapter that transform the URL in case of an external URL. i.e. it can add parametersauthorizationRules
- the names of the authorization rules to execute- Returns:
- the created page mapping
- Throws:
SObjectCreationException
- when there is an issue while creating this object- Since:
- 7.0.0
-
get
SPageMapping get(java.lang.String key) throws SObjectNotFoundException, SBonitaReadException
- Parameters:
key
- the key of the page mapping to retrieve- Returns:
- the page mapping having this key
- Throws:
SObjectNotFoundException
- when there is no mapping having this keySBonitaReadException
-
resolvePageURL
SPageURL resolvePageURL(SPageMapping pageMapping, java.util.Map<java.lang.String,java.io.Serializable> context, boolean executeAuthorizationRules) throws SExecutionException, SAuthorizationException
- Parameters:
pageMapping
-context
-executeAuthorizationRules
-- Returns:
- Throws:
SExecutionException
SAuthorizationException
-
delete
void delete(SPageMapping SPageMapping) throws SDeletionException
delete this page mapping- Parameters:
SPageMapping
- the page mapping to delete- Throws:
SDeletionException
-
update
void update(SPageMapping pageMapping, java.lang.Long pageId) throws SObjectModificationException, SObjectNotFoundException, SBonitaReadException
update the given page mapping- Parameters:
pageMapping
- the pageMapping to updatepageId
- the id of the page or null- Throws:
SObjectModificationException
SObjectNotFoundException
SBonitaReadException
-
update
void update(SPageMapping pageMapping, java.lang.String url, java.lang.String urlAdapter) throws SObjectModificationException, SObjectNotFoundException, SBonitaReadException
update the given page mapping- Parameters:
pageMapping
- the pageMapping to updateurl
- the URL or nullurlAdapter
- the new URL adapter to use- Throws:
SObjectModificationException
SObjectNotFoundException
SBonitaReadException
-
get
java.util.List<SPageMapping> get(long pageId, int startIndex, int maxResults) throws SBonitaReadException
Gets the paginated mappings of the page.- Parameters:
pageId
- the page identifierstartIndex
- the start indexmaxResults
- the max results- Returns:
- the paginated mappings of the page
- Throws:
SBonitaReadException
-
-