public class PageMappingServiceImpl extends java.lang.Object implements PageMappingService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PAGE_MAPPING |
| Constructor and Description |
|---|
PageMappingServiceImpl(Recorder recorder,
ReadPersistenceService persistenceService,
SessionService sessionService,
ReadSessionAccessor sessionAccessor) |
| Modifier and Type | Method and 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 mapping
|
java.util.List<SPageMapping> |
get(long pageId,
int startIndex,
int maxResults)
Gets the paginated mappings of the page.
|
SPageMapping |
get(java.lang.String key) |
protected boolean |
isAllowedToAccess(SPageMapping pageMapping,
java.util.Map<java.lang.String,java.io.Serializable> context,
java.util.List<java.lang.String> pageAuthorizationRules) |
SPageURL |
resolvePageURL(SPageMapping pageMapping,
java.util.Map<java.lang.String,java.io.Serializable> context,
boolean executeAuthorizationRules) |
void |
setAuthorizationRules(java.util.List<AuthorizationRule> authorizationRules) |
void |
setURLAdapters(java.util.List<URLAdapter> urlAdapters) |
void |
update(SPageMapping pageMapping,
java.lang.Long pageId)
update the given page mapping
|
void |
update(SPageMapping pageMapping,
java.lang.String url,
java.lang.String urlAdapter)
update the given page mapping
|
public static final java.lang.String PAGE_MAPPING
public PageMappingServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, SessionService sessionService, ReadSessionAccessor sessionAccessor)
public void setURLAdapters(java.util.List<URLAdapter> urlAdapters)
public void setAuthorizationRules(java.util.List<AuthorizationRule> authorizationRules)
public SPageMapping create(java.lang.String key, java.lang.Long pageId, java.util.List<java.lang.String> authorizationRules) throws 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 executeSObjectCreationException - when there is an issue while creating this objectpublic SPageMapping create(java.lang.String key, java.lang.String url, java.lang.String urlAdapter, java.util.List<java.lang.String> authorizationRules) throws 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 executeSObjectCreationException - when there is an issue while creating this objectpublic SPageMapping get(java.lang.String key) throws SObjectNotFoundException, SBonitaReadException
get in interface PageMappingServicekey - the key of the page mapping to retrieveSObjectNotFoundException - when there is no mapping having this keySBonitaReadExceptionpublic SPageURL resolvePageURL(SPageMapping pageMapping, java.util.Map<java.lang.String,java.io.Serializable> context, boolean executeAuthorizationRules) throws SExecutionException, SAuthorizationException
resolvePageURL in interface PageMappingServiceSExecutionExceptionSAuthorizationExceptionprotected boolean isAllowedToAccess(SPageMapping pageMapping, java.util.Map<java.lang.String,java.io.Serializable> context, java.util.List<java.lang.String> pageAuthorizationRules) throws SExecutionException
SExecutionExceptionpublic void delete(SPageMapping sPageMapping) throws SDeletionException
PageMappingServicedelete in interface PageMappingServicesPageMapping - the page mapping to deleteSDeletionExceptionpublic void update(SPageMapping pageMapping, java.lang.Long pageId) throws SObjectModificationException, SObjectNotFoundException, SBonitaReadException
PageMappingServiceupdate in interface PageMappingServicepageMapping - the pageMapping to updatepageId - the id of the page or nullSObjectModificationExceptionSObjectNotFoundExceptionSBonitaReadExceptionpublic void update(SPageMapping pageMapping, java.lang.String url, java.lang.String urlAdapter) throws SObjectModificationException, SObjectNotFoundException, SBonitaReadException
PageMappingServiceupdate in interface PageMappingServicepageMapping - the pageMapping to updateurl - the URL or nullurlAdapter - the new URL adapter to useSObjectModificationExceptionSObjectNotFoundExceptionSBonitaReadExceptionpublic java.util.List<SPageMapping> get(long pageId, int startIndex, int maxResults) throws SBonitaReadException
PageMappingServiceget in interface PageMappingServicepageId - the page identifierstartIndex - the start indexmaxResults - the max resultsSBonitaReadException