Package org.bonitasoft.engine.page
Interface PageService
-
- All Superinterfaces:
LifecycleService,TenantLifecycleService
- All Known Implementing Classes:
PageServiceImpl
public interface PageService extends TenantLifecycleService
- Author:
- Baptiste Mesta, Laurent Leseigneur
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPAGEstatic java.lang.StringPROPERTIES_CONTENT_TYPEstatic java.lang.StringPROPERTIES_DESCRIPTIONstatic java.lang.StringPROPERTIES_DISPLAY_NAMEstatic java.lang.StringPROPERTIES_FILE_NAMEstatic java.lang.StringPROPERTIES_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SPageaddPage(byte[] content, java.lang.String contentName, long userId)add a page using the zip in parameters, it get all informations from the page.properties file contain inside the zipSPageaddPage(SPage page, byte[] content)add a page using the zip in parameters and the given propertiesvoiddeletePage(long pageId)longgetNumberOfPages(QueryOptions options)SPagegetPage(long pageId)SPagegetPageByName(java.lang.String pageName)SPagegetPageByNameAndProcessDefinitionId(java.lang.String name, long processDefinitionId)get a page attached to a processjava.util.List<SPage>getPageByProcessDefinitionId(long processDefinitionId, int fromIndex, int numberOfResults)get a list of page attached to a processbyte[]getPageContent(long pageId)booleaninitialized()java.util.PropertiesreadPageZip(byte[] content)Read the content of a page in a zipjava.util.List<SPage>searchPages(QueryOptions options)SPageupdatePage(long pageId, EntityUpdateDescriptor updateDescriptor)voidupdatePageContent(long pageId, byte[] content, java.lang.String contentName)voidupdatePageContent(long pageId, byte[] content, java.lang.String contentName, SPageUpdateBuilder pageUpdateBuilder)-
Methods inherited from interface org.bonitasoft.engine.commons.LifecycleService
pause, resume, start, stop
-
Methods inherited from interface org.bonitasoft.engine.commons.TenantLifecycleService
init
-
-
-
-
Field Detail
-
PROPERTIES_FILE_NAME
static final java.lang.String PROPERTIES_FILE_NAME
- See Also:
- Constant Field Values
-
PROPERTIES_DISPLAY_NAME
static final java.lang.String PROPERTIES_DISPLAY_NAME
- See Also:
- Constant Field Values
-
PROPERTIES_DESCRIPTION
static final java.lang.String PROPERTIES_DESCRIPTION
- See Also:
- Constant Field Values
-
PROPERTIES_CONTENT_TYPE
static final java.lang.String PROPERTIES_CONTENT_TYPE
- See Also:
- Constant Field Values
-
PROPERTIES_NAME
static final java.lang.String PROPERTIES_NAME
- See Also:
- Constant Field Values
-
PAGE
static final java.lang.String PAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addPage
SPage addPage(SPage page, byte[] content) throws SObjectCreationException, SObjectAlreadyExistsException, SInvalidPageZipException, SInvalidPageTokenException
add a page using the zip in parameters and the given properties- Parameters:
page-content-- Returns:
- Throws:
SObjectCreationExceptionSObjectAlreadyExistsExceptionSInvalidPageZipExceptionSInvalidPageTokenException
-
getPage
SPage getPage(long pageId) throws SBonitaReadException, SObjectNotFoundException
-
getPageByName
SPage getPageByName(java.lang.String pageName) throws SBonitaReadException
- Throws:
SBonitaReadException
-
readPageZip
java.util.Properties readPageZip(byte[] content) throws SInvalidPageZipMissingIndexException, SInvalidPageZipMissingAPropertyException, SInvalidPageZipInconsistentException, SInvalidPageZipMissingPropertiesException, SInvalidPageTokenExceptionRead the content of a page in a zip- Parameters:
content- the page content- Returns:
- the properties of the page stored in the page.properties
- Throws:
SInvalidPageZipMissingIndexException- 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 unreadableSInvalidPageZipMissingPropertiesExceptionSInvalidPageTokenException
-
getNumberOfPages
long getNumberOfPages(QueryOptions options) throws SBonitaReadException
- Throws:
SBonitaReadException
-
deletePage
void deletePage(long pageId) throws SObjectModificationException, SObjectNotFoundException
-
getPageContent
byte[] getPageContent(long pageId) throws SBonitaReadException, SObjectNotFoundException
-
searchPages
java.util.List<SPage> searchPages(QueryOptions options) throws SBonitaReadException
- Throws:
SBonitaReadException
-
updatePage
SPage updatePage(long pageId, EntityUpdateDescriptor updateDescriptor) throws SObjectModificationException, SObjectAlreadyExistsException, SInvalidPageTokenException
-
updatePageContent
void updatePageContent(long pageId, byte[] content, java.lang.String contentName) throws SBonitaException- Throws:
SBonitaException
-
addPage
SPage addPage(byte[] content, java.lang.String contentName, long userId) throws SObjectCreationException, SObjectAlreadyExistsException, SInvalidPageZipException, SInvalidPageTokenException
add a page using the zip in parameters, it get all informations from the page.properties file contain inside the zip- Parameters:
content-userId-- Returns:
- Throws:
SObjectCreationExceptionSObjectAlreadyExistsExceptionSInvalidPageZipExceptionSInvalidPageTokenException
-
getPageByNameAndProcessDefinitionId
SPage getPageByNameAndProcessDefinitionId(java.lang.String name, long processDefinitionId) throws SBonitaReadException
get a page attached to a process- Parameters:
name-processDefinitionId-- Returns:
- Throws:
SBonitaReadException
-
getPageByProcessDefinitionId
java.util.List<SPage> getPageByProcessDefinitionId(long processDefinitionId, int fromIndex, int numberOfResults) throws SBonitaReadException
get a list of page attached to a process- Parameters:
processDefinitionId-fromIndex-numberOfResults-- Returns:
- Throws:
SBonitaReadException
-
initialized
boolean initialized()
- Returns:
- true if the service has been started again since it was last paused/stopped
-
updatePageContent
void updatePageContent(long pageId, byte[] content, java.lang.String contentName, SPageUpdateBuilder pageUpdateBuilder) throws SObjectAlreadyExistsException, SObjectModificationException, SInvalidPageZipException, SInvalidPageTokenException
-
-