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 PageMappingService
key
- 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 PageMappingService
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 executeSObjectCreationException
- when there is an issue while creating this objectpublic SPageMapping get(java.lang.String key) throws SObjectNotFoundException, SBonitaReadException
get
in interface PageMappingService
key
- the key of the page mapping to retrieveSObjectNotFoundException
- when there is no mapping having this keySBonitaReadException
public SPageURL resolvePageURL(SPageMapping pageMapping, java.util.Map<java.lang.String,java.io.Serializable> context, boolean executeAuthorizationRules) throws SExecutionException, SAuthorizationException
resolvePageURL
in interface PageMappingService
SExecutionException
SAuthorizationException
protected boolean isAllowedToAccess(SPageMapping pageMapping, java.util.Map<java.lang.String,java.io.Serializable> context, java.util.List<java.lang.String> pageAuthorizationRules) throws SExecutionException
SExecutionException
public void delete(SPageMapping sPageMapping) throws SDeletionException
PageMappingService
delete
in interface PageMappingService
sPageMapping
- the page mapping to deleteSDeletionException
public void update(SPageMapping pageMapping, java.lang.Long pageId) throws SObjectModificationException, SObjectNotFoundException, SBonitaReadException
PageMappingService
update
in interface PageMappingService
pageMapping
- the pageMapping to updatepageId
- the id of the page or nullSObjectModificationException
SObjectNotFoundException
SBonitaReadException
public void update(SPageMapping pageMapping, java.lang.String url, java.lang.String urlAdapter) throws SObjectModificationException, SObjectNotFoundException, SBonitaReadException
PageMappingService
update
in interface PageMappingService
pageMapping
- the pageMapping to updateurl
- the URL or nullurlAdapter
- the new URL adapter to useSObjectModificationException
SObjectNotFoundException
SBonitaReadException
public java.util.List<SPageMapping> get(long pageId, int startIndex, int maxResults) throws SBonitaReadException
PageMappingService
get
in interface PageMappingService
pageId
- the page identifierstartIndex
- the start indexmaxResults
- the max resultsSBonitaReadException