public class PageMappingServiceImpl extends Object implements PageMappingService
| Modifier and Type | Field and Description |
|---|---|
static String |
PAGE_MAPPING |
| Constructor and Description |
|---|
PageMappingServiceImpl(Recorder recorder,
org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService,
SessionService sessionService,
ReadSessionAccessor sessionAccessor) |
| Modifier and Type | Method and Description |
|---|---|
SPageMapping |
create(String key,
Long pageId,
List<String> authorizationRules) |
SPageMapping |
create(String key,
String url,
String urlAdapter,
List<String> authorizationRules) |
void |
delete(SPageMapping sPageMapping)
delete this page mapping
|
List<SPageMapping> |
get(long pageId,
int startIndex,
int maxResults)
Gets the paginated mappings of the page.
|
SPageMapping |
get(String key) |
protected boolean |
isAllowedToAccess(SPageMapping pageMapping,
Map<String,Serializable> context,
List<String> pageAuthorizationRules) |
SPageURL |
resolvePageURL(SPageMapping pageMapping,
Map<String,Serializable> context,
boolean executeAuthorizationRules) |
void |
setAuthorizationRules(List<AuthorizationRule> authorizationRules) |
void |
setURLAdapters(List<URLAdapter> urlAdapters) |
void |
update(SPageMapping pageMapping,
Long pageId)
update the given page mapping
|
void |
update(SPageMapping pageMapping,
String url,
String urlAdapter)
update the given page mapping
|
public static final String PAGE_MAPPING
public PageMappingServiceImpl(Recorder recorder, org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService, SessionService sessionService, ReadSessionAccessor sessionAccessor)
public void setURLAdapters(List<URLAdapter> urlAdapters)
public void setAuthorizationRules(List<AuthorizationRule> authorizationRules)
public SPageMapping create(String key, Long pageId, List<String> authorizationRules) throws org.bonitasoft.engine.commons.exceptions.SObjectCreationException
create in interface PageMappingServicekey - the key used to retrieve the mappingpageId - the id of the custom pageauthorizationRules - the names of the authorization rules to executeorg.bonitasoft.engine.commons.exceptions.SObjectCreationException - when there is an issue while creating this objectpublic SPageMapping create(String key, String url, String urlAdapter, List<String> authorizationRules) throws org.bonitasoft.engine.commons.exceptions.SObjectCreationException
create in interface PageMappingServicekey - 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 executeorg.bonitasoft.engine.commons.exceptions.SObjectCreationException - when there is an issue while creating this objectpublic SPageMapping get(String key) throws org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException, org.bonitasoft.engine.persistence.SBonitaReadException
get in interface PageMappingServicekey - the key of the page mapping to retrieveorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundException - when there is no mapping having this keyorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic SPageURL resolvePageURL(SPageMapping pageMapping, Map<String,Serializable> context, boolean executeAuthorizationRules) throws org.bonitasoft.engine.commons.exceptions.SExecutionException, SAuthorizationException
resolvePageURL in interface PageMappingServiceorg.bonitasoft.engine.commons.exceptions.SExecutionExceptionSAuthorizationExceptionprotected boolean isAllowedToAccess(SPageMapping pageMapping, Map<String,Serializable> context, List<String> pageAuthorizationRules) throws org.bonitasoft.engine.commons.exceptions.SExecutionException
org.bonitasoft.engine.commons.exceptions.SExecutionExceptionpublic void delete(SPageMapping sPageMapping) throws org.bonitasoft.engine.commons.exceptions.SDeletionException
PageMappingServicedelete in interface PageMappingServicesPageMapping - the page mapping to deleteorg.bonitasoft.engine.commons.exceptions.SDeletionExceptionpublic void update(SPageMapping pageMapping, Long pageId) throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException, org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException, org.bonitasoft.engine.persistence.SBonitaReadException
PageMappingServiceupdate in interface PageMappingServicepageMapping - the pageMapping to updatepageId - the id of the page or nullorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic void update(SPageMapping pageMapping, String url, String urlAdapter) throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException, org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException, org.bonitasoft.engine.persistence.SBonitaReadException
PageMappingServiceupdate in interface PageMappingServicepageMapping - the pageMapping to updateurl - the URL or nullurlAdapter - the new URL adapter to useorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SPageMapping> get(long pageId, int startIndex, int maxResults) throws org.bonitasoft.engine.persistence.SBonitaReadException
PageMappingServiceget in interface PageMappingServicepageId - the page identifierstartIndex - the start indexmaxResults - the max resultsorg.bonitasoft.engine.persistence.SBonitaReadExceptionCopyright © 2018 Bonitasoft S.A.. All rights reserved.