Package org.bonitasoft.engine.page
Interface PageService
- All Known Implementing Classes:
PageServiceImpl
public interface PageService
- Author:
- Baptiste Mesta, Laurent Leseigneur
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionadd a page using the zip in parameters, it get all informations from the page.properties file contain inside the zipadd a page using the zip in parameters and the given propertiesbuildPage(byte[] content, String contentName, long userId, boolean provided, boolean removable, boolean editable) voiddeletePage(long pageId) longgetNumberOfPages(QueryOptions options) getPage(long pageId) getPageByName(String pageName) getPageByNameAndProcessDefinitionId(String name, long processDefinitionId) get a page attached to a processgetPageByProcessDefinitionId(long processDefinitionId, int fromIndex, int numberOfResults) get a list of page attached to a processbyte[]getPageContent(long pageId) insertPage(SPage page, byte[] content) readPageZip(byte[] content) Read the content of a page in a zipsearchPages(QueryOptions options) updatePage(long pageId, EntityUpdateDescriptor updateDescriptor) voidupdatePageContent(long pageId, byte[] content, String contentName) voidupdatePageContent(long pageId, byte[] content, String contentName, SPageUpdateBuilder pageUpdateBuilder)
-
Field Details
-
PROPERTIES_FILE_NAME
- See Also:
-
PROPERTIES_DISPLAY_NAME
- See Also:
-
PROPERTIES_DESCRIPTION
- See Also:
-
PROPERTIES_CONTENT_TYPE
- See Also:
-
PROPERTIES_NAME
- See Also:
-
PAGE
- See Also:
-
-
Method Details
-
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
-
insertPage
SPage insertPage(SPage page, byte[] content) throws SObjectAlreadyExistsException, SObjectCreationException -
checkIfPageAlreadyExists
- Throws:
SBonitaReadException
-
getPage
-
getPageByName
- Throws:
SBonitaReadException
-
buildPage
SPage buildPage(byte[] content, String contentName, long userId, boolean provided, boolean removable, boolean editable) throws SInvalidPageZipException, SInvalidPageTokenException -
readPageZip
Properties readPageZip(byte[] content) throws SInvalidPageZipMissingIndexException, SInvalidPageZipMissingAPropertyException, SInvalidPageZipInconsistentException, SInvalidPageZipMissingPropertiesException, SInvalidPageTokenException Read 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
- Throws:
SBonitaReadException
-
deletePage
-
getPageContent
-
searchPages
- Throws:
SBonitaReadException
-
updatePage
SPage updatePage(long pageId, EntityUpdateDescriptor updateDescriptor) throws SObjectModificationException, SObjectAlreadyExistsException, SInvalidPageTokenException -
updatePageContent
- Throws:
SBonitaException
-
addPage
SPage addPage(byte[] content, 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(String name, long processDefinitionId) throws SBonitaReadException get a page attached to a process- Parameters:
name-processDefinitionId-- Returns:
- Throws:
SBonitaReadException
-
getPageByProcessDefinitionId
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
-
updatePageContent
void updatePageContent(long pageId, byte[] content, String contentName, SPageUpdateBuilder pageUpdateBuilder) throws SObjectAlreadyExistsException, SObjectModificationException, SInvalidPageZipException, SInvalidPageTokenException
-