public class PageServiceImpl extends Object implements PageService
| Modifier and Type | Field and Description |
|---|---|
static String |
INDEX_GROOVY |
static String |
INDEX_HTML |
static String |
PAGE_CONTENT_DOES_NOT_CONTAINS_A_INDEX_GROOVY_OR_INDEX_HTML_FILE |
static String |
PAGE_TOKEN_PREFIX |
static String |
RESOURCES_INDEX_HTML |
PAGE, PROPERTIES_CONTENT_TYPE, PROPERTIES_DESCRIPTION, PROPERTIES_DISPLAY_NAME, PROPERTIES_FILE_NAME, PROPERTIES_NAME| Constructor and Description |
|---|
PageServiceImpl(ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
ProfileService profileService) |
| Modifier and Type | Method and Description |
|---|---|
SPage |
addPage(byte[] content,
String contentName,
long userId)
add a page using the zip in parameters, it get all informations from the page.properties file contain inside the zip
|
SPage |
addPage(SPage page,
byte[] content)
add a page using the zip in parameters and the given properties
|
protected void |
checkPageDuplicate(SPage sPage,
EntityUpdateDescriptor entityUpdateDescriptor,
SPageLogBuilder logBuilder,
String logMethodName) |
void |
deletePage(long pageId) |
long |
getNumberOfPages(QueryOptions options) |
SPage |
getPage(long pageId) |
SPage |
getPageByName(String pageName) |
SPage |
getPageByNameAndProcessDefinitionId(String name,
long processDefinitionId)
get a page attached to a process
|
List<SPage> |
getPageByProcessDefinitionId(long processDefinitionId,
int fromIndex,
int numberOfResults)
get a list of page attached to a process
|
byte[] |
getPageContent(long pageId) |
List<PageServiceListener> |
getPageServiceListeners() |
List<String> |
getProvidedPages() |
void |
pause() |
Properties |
readPageZip(byte[] content)
Read the content of a page in a zip
|
void |
resume() |
List<SPage> |
searchPages(QueryOptions options) |
void |
setPageServiceListeners(List<PageServiceListener> pageServiceListeners) |
void |
setProvidedPages(List<String> providedPages) |
void |
start() |
void |
stop() |
SPage |
updatePage(long pageId,
EntityUpdateDescriptor entityUpdateDescriptor) |
void |
updatePageContent(long pageId,
byte[] content,
String contentName) |
protected void |
updatePageNameInProfileEntry(EntityUpdateDescriptor entityUpdateDescriptor,
String oldPageName) |
public static final String PAGE_CONTENT_DOES_NOT_CONTAINS_A_INDEX_GROOVY_OR_INDEX_HTML_FILE
public static final String PAGE_TOKEN_PREFIX
public static final String INDEX_GROOVY
public static final String INDEX_HTML
public static final String RESOURCES_INDEX_HTML
public PageServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, TechnicalLoggerService logger, QueriableLoggerService queriableLoggerService, ProfileService profileService)
public SPage addPage(SPage page, byte[] content) throws org.bonitasoft.engine.commons.exceptions.SObjectCreationException, org.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsException, SInvalidPageZipException, SInvalidPageTokenException
PageServiceaddPage in interface PageServiceorg.bonitasoft.engine.commons.exceptions.SObjectCreationExceptionorg.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsExceptionSInvalidPageZipExceptionSInvalidPageTokenExceptionpublic SPage addPage(byte[] content, String contentName, long userId) throws org.bonitasoft.engine.commons.exceptions.SObjectCreationException, org.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsException, SInvalidPageZipException, SInvalidPageTokenException
PageServiceaddPage in interface PageServiceorg.bonitasoft.engine.commons.exceptions.SObjectCreationExceptionorg.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsExceptionSInvalidPageZipExceptionSInvalidPageTokenExceptionpublic SPage getPageByNameAndProcessDefinitionId(String name, long processDefinitionId) throws SBonitaReadException
PageServicegetPageByNameAndProcessDefinitionId in interface PageServiceSBonitaReadExceptionpublic List<SPage> getPageByProcessDefinitionId(long processDefinitionId, int fromIndex, int numberOfResults) throws SBonitaReadException
PageServicegetPageByProcessDefinitionId in interface PageServiceSBonitaReadExceptionpublic Properties readPageZip(byte[] content) throws SInvalidPageZipMissingIndexException, SInvalidPageZipMissingAPropertyException, SInvalidPageZipInconsistentException, SInvalidPageZipMissingPropertiesException, SInvalidPageTokenException
PageServicereadPageZip in interface PageServicecontent - the page contentSInvalidPageZipMissingIndexException - if the page is missing an index.html or Index.groovySInvalidPageZipMissingAPropertyException - if the page is missing mandatory field in the page.propertiesSInvalidPageZipInconsistentException - if the zip is not a valid zip file or unreadableSInvalidPageZipMissingPropertiesExceptionSInvalidPageTokenExceptionpublic SPage getPage(long pageId) throws SBonitaReadException, org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException
getPage in interface PageServiceSBonitaReadExceptionorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionpublic SPage getPageByName(String pageName) throws SBonitaReadException
getPageByName in interface PageServiceSBonitaReadExceptionpublic long getNumberOfPages(QueryOptions options) throws SBonitaReadException
getNumberOfPages in interface PageServiceSBonitaReadExceptionpublic List<SPage> searchPages(QueryOptions options) throws SBonitaReadException
searchPages in interface PageServiceSBonitaReadExceptionpublic void deletePage(long pageId)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException,
org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException
deletePage in interface PageServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionpublic byte[] getPageContent(long pageId)
throws SBonitaReadException,
org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException
getPageContent in interface PageServiceSBonitaReadExceptionorg.bonitasoft.engine.commons.exceptions.SObjectNotFoundExceptionpublic SPage updatePage(long pageId, EntityUpdateDescriptor entityUpdateDescriptor) throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException, org.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsException, SInvalidPageTokenException
updatePage in interface PageServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionorg.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsExceptionSInvalidPageTokenExceptionprotected void updatePageNameInProfileEntry(EntityUpdateDescriptor entityUpdateDescriptor, String oldPageName) throws SInvalidPageTokenException, SBonitaReadException, SProfileEntryUpdateException
protected void checkPageDuplicate(SPage sPage, EntityUpdateDescriptor entityUpdateDescriptor, SPageLogBuilder logBuilder, String logMethodName) throws SBonitaReadException, org.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsException
SBonitaReadExceptionorg.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsExceptionpublic void updatePageContent(long pageId,
byte[] content,
String contentName)
throws org.bonitasoft.engine.commons.exceptions.SObjectModificationException,
SInvalidPageZipException,
SInvalidPageTokenException,
org.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsException
updatePageContent in interface PageServiceorg.bonitasoft.engine.commons.exceptions.SObjectModificationExceptionSInvalidPageZipExceptionSInvalidPageTokenExceptionorg.bonitasoft.engine.commons.exceptions.SObjectAlreadyExistsExceptionpublic void start()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
start in interface org.bonitasoft.engine.commons.LifecycleServicestart in interface PageServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void stop()
stop in interface org.bonitasoft.engine.commons.LifecycleServicepublic void pause()
pause in interface org.bonitasoft.engine.commons.LifecycleServicepublic void resume()
resume in interface org.bonitasoft.engine.commons.LifecycleServicepublic List<PageServiceListener> getPageServiceListeners()
public void setPageServiceListeners(List<PageServiceListener> pageServiceListeners)
Copyright © 2018 Bonitasoft S.A.. All rights reserved.