Package org.bonitasoft.engine.page.impl
Class PageMappingServiceImpl
java.lang.Object
org.bonitasoft.engine.page.impl.PageMappingServiceImpl
- All Implemented Interfaces:
PageMappingService
- Author:
- Baptiste Mesta
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPageMappingServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, SessionService sessionService, ReadSessionAccessor sessionAccessor) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(SPageMapping sPageMapping) delete this page mappingget(long pageId, int startIndex, int maxResults) Gets the paginated mappings of the page.protected booleanisAllowedToAccess(SPageMapping pageMapping, Map<String, Serializable> context, List<String> pageAuthorizationRules) resolvePageURL(SPageMapping pageMapping, Map<String, Serializable> context, boolean executeAuthorizationRules) voidsetAuthorizationRules(List<AuthorizationRule> authorizationRules) voidsetURLAdapters(List<URLAdapter> urlAdapters) voidupdate(SPageMapping pageMapping, Long pageId) update the given page mappingvoidupdate(SPageMapping pageMapping, String url, String urlAdapter) update the given page mapping
-
Field Details
-
PAGE_MAPPING
- See Also:
-
-
Constructor Details
-
PageMappingServiceImpl
public PageMappingServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, SessionService sessionService, ReadSessionAccessor sessionAccessor)
-
-
Method Details
-
setURLAdapters
-
setAuthorizationRules
-
create
public SPageMapping create(String key, Long pageId, List<String> authorizationRules) throws SObjectCreationException - Specified by:
createin interfacePageMappingService- 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
-
create
public SPageMapping create(String key, String url, String urlAdapter, List<String> authorizationRules) throws SObjectCreationException - Specified by:
createin interfacePageMappingService- 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
-
get
- Specified by:
getin interfacePageMappingService- 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
public SPageURL resolvePageURL(SPageMapping pageMapping, Map<String, Serializable> context, boolean executeAuthorizationRules) throws SExecutionException, SAuthorizationException- Specified by:
resolvePageURLin interfacePageMappingService- Returns:
- Throws:
SExecutionExceptionSAuthorizationException
-
isAllowedToAccess
protected boolean isAllowedToAccess(SPageMapping pageMapping, Map<String, Serializable> context, List<String> pageAuthorizationRules) throws SExecutionException- Throws:
SExecutionException
-
delete
Description copied from interface:PageMappingServicedelete this page mapping- Specified by:
deletein interfacePageMappingService- Parameters:
sPageMapping- the page mapping to delete- Throws:
SDeletionException
-
update
public void update(SPageMapping pageMapping, Long pageId) throws SObjectModificationException, SObjectNotFoundException, SBonitaReadException Description copied from interface:PageMappingServiceupdate the given page mapping- Specified by:
updatein interfacePageMappingService- Parameters:
pageMapping- the pageMapping to updatepageId- the id of the page or null- Throws:
SObjectModificationExceptionSObjectNotFoundExceptionSBonitaReadException
-
update
public void update(SPageMapping pageMapping, String url, String urlAdapter) throws SObjectModificationException, SObjectNotFoundException, SBonitaReadException Description copied from interface:PageMappingServiceupdate the given page mapping- Specified by:
updatein interfacePageMappingService- Parameters:
pageMapping- the pageMapping to updateurl- the URL or nullurlAdapter- the new URL adapter to use- Throws:
SObjectModificationExceptionSObjectNotFoundExceptionSBonitaReadException
-
get
public List<SPageMapping> get(long pageId, int startIndex, int maxResults) throws SBonitaReadException Description copied from interface:PageMappingServiceGets the paginated mappings of the page.- Specified by:
getin interfacePageMappingService- Parameters:
pageId- the page identifierstartIndex- the start indexmaxResults- the max results- Returns:
- the paginated mappings of the page
- Throws:
SBonitaReadException
-