public interface ApplicationAPI
Application).Application| Modifier and Type | Method and Description |
|---|---|
Application |
createApplication(ApplicationCreator applicationCreator)
Creates a new
Application based on the supplied ApplicationCreator |
ApplicationMenu |
createApplicationMenu(ApplicationMenuCreator applicationMenuCreator)
Creates a
ApplicationMenu based on the supplied ApplicationMenuCreator. |
ApplicationPage |
createApplicationPage(long applicationId,
long pageId,
String token)
Creates an
ApplicationPage |
void |
deleteApplication(long applicationId)
Deletes an
Application by its identifier. |
void |
deleteApplicationMenu(long applicationMenuId)
Deletes an
ApplicationMenu by its identifier. |
void |
deleteApplicationPage(long applicationPageId)
Deletes an
ApplicationPage by its identifier. |
byte[] |
exportApplications(long... applicationIds)
Exports the
Applications which identifier is in applicationIds |
List<String> |
getAllPagesForProfile(long profileId)
Return all pages names that can be accessed by the profile through applications.
|
Application |
getApplication(long applicationId)
Retrieves an
Application from its identifier. |
ApplicationPage |
getApplicationHomePage(long applicationId)
Retrieves the
ApplicationPage defined as the Application home page |
ApplicationMenu |
getApplicationMenu(long applicationMenuId)
Retrieves the
ApplicationMenu from its identifier |
ApplicationPage |
getApplicationPage(long applicationPageId)
Retrieves the
ApplicationPage from its identifier |
ApplicationPage |
getApplicationPage(String applicationToken,
String applicationPageToken)
|
List<ImportStatus> |
importApplications(byte[] xmlContent,
ApplicationImportPolicy policy)
Imports
Applications based on a XML file content. |
SearchResult<ApplicationMenu> |
searchApplicationMenus(SearchOptions searchOptions)
Searches for
ApplicationMenus with specific search criteria. |
SearchResult<ApplicationPage> |
searchApplicationPages(SearchOptions searchOptions)
Searches for
ApplicationPages with specific search criteria. |
SearchResult<Application> |
searchApplications(SearchOptions searchOptions)
Searches for
Applications with specific search criteria. |
void |
setApplicationHomePage(long applicationId,
long applicationPageId)
Defines which
ApplicationPage will represent the Application home page |
Application |
updateApplication(long applicationId,
ApplicationUpdater updater)
Updates an
Application based on the information supplied by the ApplicationUpdater |
ApplicationMenu |
updateApplicationMenu(long applicationMenuId,
ApplicationMenuUpdater updater)
Updates an
ApplicationMenu based on the information supplied by the
ApplicationMenuUpdater. |
Application createApplication(ApplicationCreator applicationCreator) throws AlreadyExistsException, CreationException
Application based on the supplied ApplicationCreatorapplicationCreator - creator describing characteristics of application to be createdApplicationAlreadyExistsException - if an application already exists with the same nameCreationException - if an error occurs during the creationApplication,
ApplicationCreatorApplication getApplication(long applicationId) throws ApplicationNotFoundException
Application from its identifier.applicationId - the application identifierApplication from its identifier.ApplicationNotFoundException - if no application is found for the given identifierApplicationvoid deleteApplication(long applicationId)
throws DeletionException
Application by its identifier. All related ApplicationPages and
ApplicationMenus will be automatically deleted.applicationId - the Application identifierDeletionException - if an error occurs during the deletionApplication,
ApplicationPage,
ApplicationMenuApplication updateApplication(long applicationId, ApplicationUpdater updater) throws ApplicationNotFoundException, UpdateException, AlreadyExistsException
Application based on the information supplied by the ApplicationUpdaterapplicationId - a long representing the application identifierupdater - an ApplicationUpdater describing the fields to be updated.Application as it is after the update.ApplicationNotFoundException - if no Application is found for the given idAlreadyExistsException - if another Application already exists with the new name valueUpdateException - if an error occurs during the updateApplication,
ApplicationUpdaterSearchResult<Application> searchApplications(SearchOptions searchOptions) throws SearchException
Applications with specific search criteria. Use ApplicationSearchDescriptor to
know the available filters.searchOptions - the search criteria. See SearchOptions for details.SearchResult containing the number and the list of applications matching the search criteria.SearchException - if an error occurs during searchApplication,
ApplicationSearchDescriptor,
SearchOptions,
SearchResultApplicationPage createApplicationPage(long applicationId, long pageId, String token) throws AlreadyExistsException, CreationException, ApplicationNotFoundException
ApplicationPageapplicationId - the identifier of the Application to which the
Page will be associatedpageId - the identifier of Page to be associated to the Applicationtoken - the token that this Page will take in this ApplicationPage. The token must be unique for a given application and
should contain only alpha numeric characters and the following special characters '-', '.', '_' or '~'. In addition, the following words are reserved key words and cannot be used
as token: 'api', 'content', 'theme'.ApplicationPageAlreadyExistsException - if the token is already used by another ApplicationPage on this ApplicationCreationException - if an error occurs during the creationApplicationNotFoundException - if the referenced application does not exist.ApplicationPage,
Application,
PageApplicationPage getApplicationPage(String applicationToken, String applicationPageToken) throws ApplicationPageNotFoundException
applicationToken - the Application nameapplicationPageToken - the ApplicationPage tokenApplicationPage for the given Application token and ApplicationPage tokenApplicationPageNotFoundException - if no ApplicationPage is found for the given Application token and
ApplicationPage tokenApplicationPageApplicationPage getApplicationPage(long applicationPageId) throws ApplicationPageNotFoundException
ApplicationPage from its identifierapplicationPageId - the ApplicationPage identifierApplicationPage from its identifierApplicationPageNotFoundException - if no ApplicationPage is found for the given identifierApplicationPagevoid deleteApplicationPage(long applicationPageId)
throws DeletionException
ApplicationPage by its identifier. All related ApplicationMenu will be
automatically deleted.applicationPageId - the ApplicationPage identifierDeletionException - if an error occurs during the deletionApplicationPage,
ApplicationMenuSearchResult<ApplicationPage> searchApplicationPages(SearchOptions searchOptions) throws SearchException
ApplicationPages with specific search criteria.searchOptions - the search criteria. See SearchOptions for details. Use
ApplicationPageSearchDescriptor to know the available
filters.SearchResult containing the number and the list of org.bonitasoft.engine.business.application.ApplicationPageSearchDescriptors
matching the search criteria.SearchException - if an error occurs during the search executionApplicationPage,
ApplicationPageSearchDescriptor,
SearchOptions,
SearchResultvoid setApplicationHomePage(long applicationId,
long applicationPageId)
throws UpdateException,
ApplicationNotFoundException
ApplicationPage will represent the Application home pageapplicationId - the Application identifierapplicationPageId - the identifier of the ApplicationPage to be used as home pageUpdateException - if an error occurs during the updateApplicationNotFoundException - if no Application is found with the given idApplication,
ApplicationPageApplicationPage getApplicationHomePage(long applicationId) throws ApplicationPageNotFoundException
ApplicationPage defined as the Application home pageapplicationId - the Application identifierApplicationPage defined as Application home pageApplicationPageNotFoundException - if no home page is found for the given applicationApplication,
ApplicationPageApplicationMenu createApplicationMenu(ApplicationMenuCreator applicationMenuCreator) throws CreationException
ApplicationMenu based on the supplied ApplicationMenuCreator. The new created ApplicationMenu will be ordered at the
last position of its level with an auto generated index.applicationMenuCreator - creator describing the characteristics of the ApplicationMenu to be createdApplicationMenuCreationException - if an error occurs during the creationApplicationMenu,
ApplicationMenuCreatorApplicationMenu updateApplicationMenu(long applicationMenuId, ApplicationMenuUpdater updater) throws ApplicationMenuNotFoundException, UpdateException
ApplicationMenu based on the information supplied by the
ApplicationMenuUpdater.
When the ApplicationMenu index is updated all other ApplicationMenus in the same level will have indexes automatically updated in order
to keep indexes coherency. For instance, when an ApplicationMenu is moved from index 4 to index 2, the ApplicationMenu previously at
index 2 will be moved to index 3 and the ApplicationMenu previously at index 3 will be moved to index 4.
applicationMenuId - the ApplicationMenu identifierupdater - the ApplicationMenuUpdater describing the fields to be updated.ApplicationMenu up to dateApplicationMenuNotFoundException - if no ApplicationMenu is found for the given identifierUpdateException - if an exception occurs during the updateApplicationMenu,
ApplicationMenuUpdaterApplicationMenu getApplicationMenu(long applicationMenuId) throws ApplicationMenuNotFoundException
ApplicationMenu from its identifierapplicationMenuId - the ApplicationMenu menu identifierApplicationMenu from its identifierApplicationMenuNotFoundException - if no ApplicationMenu is found for the given identifierApplicationMenuvoid deleteApplicationMenu(long applicationMenuId)
throws DeletionException
ApplicationMenu by its identifier. All children ApplicationMenu will be automatically deleted.
When an ApplicationMenu is deleted all others ApplicationMenus having index greater than the index of deleted ApplicationMenu in
the same level will be automatically updated in order to keep indexes coherency.
applicationMenuId - the ApplicationMenu identifierDeletionException - if an error occurs during the deletionApplicationMenuSearchResult<ApplicationMenu> searchApplicationMenus(SearchOptions searchOptions) throws SearchException
ApplicationMenus with specific search criteria.searchOptions - the search criteria. See SearchOptions for details. Use
ApplicationMenuSearchDescriptor to know the available
filtersSearchResult containing the number and the list of ApplicationMenus matching the search criteria.SearchException - if an error occurs during searchApplicationMenu,
SearchOptions,
ApplicationMenuSearchDescriptor,
SearchResultList<String> getAllPagesForProfile(long profileId)
profileId - the id of the profilebyte[] exportApplications(long... applicationIds)
throws ExportException
Applications which identifier is in applicationIdsapplicationIds - the identifiers of Applications to be exportedApplicationsExportException - if an exception occurs during the export.ApplicationList<ImportStatus> importApplications(byte[] xmlContent, ApplicationImportPolicy policy) throws ImportException, AlreadyExistsException
Applications based on a XML file content.
Before importing Applications ensure that all Profiles referenced by Applications and all
Pages referenced by ApplicationPages are available.
Profile does not exist the Application will be imported, but no Profile will be associated to it. An
ImportError will be added to the ImportStatus related to this Application.
Page does not exist the related ApplicationPage and ApplicationMenus
pointing to this ApplicationPage will not be created. An ImportError will be added to the ImportStatus related to the
Application containing this ApplicationPage.xmlContent - a byte array representing the content of XML file containing the applications to be imported.policy - the ApplicationImportPolicy used to execute the importList of ImportStatus representing the ImportStatus for each imported
ApplicationImportException - if an error occurs during the importAlreadyExistsException - if one of applications being imported already exists and the policy
ApplicationImportPolicy.FAIL_ON_DUPLICATES is usedApplication,
ApplicationImportPolicy,
ImportStatus,
ImportError,
ApplicationPage,
ApplicationMenu,
Profile,
PageCopyright © 2018 Bonitasoft S.A.. All rights reserved.