Interface ApplicationService
- All Superinterfaces:
ContextSensitiveSingletonService,Service
Application service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from interface com.appiancorp.services.ContextSensitiveSingletonService
CONFIGURE_METHOD_NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAction(Long appId, ApplicationAction action) Adds an Application Action with the given user friendly label, process model UUID, and description of the action.create(Application application) Creates an application.voidDeletes the specified application.voidDeletes the specified applications.getApplication(Long id) Retrieves an application given its id.getApplication(String urlIdentifier) Retrieves an application given its URL identifier.getApplicationByUuid(String uuid) Retrieves an application given its UUID.getApplicationsPaging(int startIndex, int batchSize, Integer sortProperty, Integer sortOrder, boolean includeDrafts) Retrieves the applications defined on the system.getApplicationsWithRoleSetsPaging(int startIndex, int batchSize, Integer sortProperty, Integer sortOrder, boolean includeDrafts) Retrieves the applications defined on the system with itsContentRoleSetset to a non-null value.Retrieves an application given its id with itsContentRoleSetset to a non-null value.Gets the default system application.getRoleMap(Long id) Retrieves the security role map for the specified application.voidsave(Application application) Saves an application.save(Application application, Set<Application.Section> section) Saves only the specified section of the application.voidSets a default system application.voidsetRoleMap(Long id, ApplicationRoleMap rolemap) Sets the security role map definition for the specified application.voidupdateAction(Long appId, ApplicationAction updatedAction) Updates an existing Application Action with the given action that contains the new user friendly label, description of the action, and process model UUID.updateAssociatedObjects(Long appId, com.appiancorp.ix.Type<?, ?, String> type, String[] add, String[] remove) Deprecated.<H extends com.appiancorp.ix.Haul<I,U>, I, U>
ApplicationupdateAssociatedObjectsByType(Long appId, com.appiancorp.ix.Type<H, I, U> type, U[] add, U[] remove) Associates or disassociates objects related to this application.Methods inherited from interface com.appiancorp.services.ContextSensitiveSingletonService
configureContextSensitiveSingletonService
-
Field Details
-
create$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
save$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
updateAssociatedObjects$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
delete$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getApplication$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getApplicationWithRoleSet$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getApplicationsPaging$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getApplicationsWithRoleSetsPaging$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getRoleMap$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
setRoleMap$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
setDefaultApplication$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getDefaultApplication$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Method Details
-
create
@Write(K_CONTENT) Long create(Application application) throws InvalidApplicationException, PrivilegeException Creates an application.- Parameters:
application- The application object to be created.- Returns:
- The id of the created application.
- Throws:
InvalidApplicationException- if the application is in an inconsistent state or if its identifier matches that of any of the existing applicationsPrivilegeException- if the user does not have permission to perform this action.
-
save
@Write(K_CONTENT) void save(Application application) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, UnavailableApplicationException, InvalidNavigationItemException, InvalidActionException Saves an application.- Parameters:
application- The application to be updated.- Throws:
InvalidApplicationException- If an invalid Application is provided.PrivilegeException- If the user does not have permission to perform this action.ApplicationNotFoundException- If the ID field of the Application object does not match an object in the DatabaseUnavailableApplicationException- If the application couldn't be saved because it couldn't get the lock to it.InvalidNavigationItemException- If the navigation item points to a page that is not already associated with the application.InvalidActionException- If there is an action pointing to a process model that is not already associated with the application.
-
save
@Write(K_CONTENT) Application save(Application application, Set<Application.Section> section) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, UnavailableApplicationException, InvalidNavigationItemException, InvalidActionException Saves only the specified section of the application. For example, if saving "metadata", this method won't modify the state of the bean related for associated objects nor navigation items.- Parameters:
application- The application to be updated.section- TheApplication.Section(s) of the application to be updated.- Returns:
- application The updated object bean. Notice that this object might be different from the one provided as parameter because this method only updates a given section of the bean. Example, if updating navigation objects, after saving the object, the application metadata might be different if other user updated that section.
- Throws:
InvalidApplicationException- If an invalid Application is provided.PrivilegeException- If the user does not have permission to perform this action.ApplicationNotFoundException- If the ID field of the Application object does not match an object in the DatabaseUnavailableApplicationException- If the application couldn't be saved because it couldn't get the lock to it.InvalidNavigationItemException- If there is a navigation item pointing to a page that is not already associated with the application.InvalidActionException- If there is an action pointing to a process model that is not already associated with the application.
-
updateAssociatedObjects
@Deprecated @Write(K_CONTENT) Application updateAssociatedObjects(Long appId, com.appiancorp.ix.Type<?, ?, throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, InvalidOperationException, UnavailableApplicationExceptionString> type, String[] add, String[] remove) Deprecated.Associates or disassociates objects related to this application.- Parameters:
appId- The application id to update.type- The type of the objects to associate/disassociateadd- The objects to associate with this application (can be null).remove- The objects to dissasociate from this application (can be null).- Returns:
- application The updated object bean. Notice that this object might be different from the one provided as parameter because this method only updates a given section of the bean. Example, if updating navigation objects, after saving the object, the application metadata might be different if other user updated that section.
- Throws:
InvalidApplicationException- If an invalid Application id is provided.PrivilegeException- If the user does not have permission to perform this action.ApplicationNotFoundExceptionInvalidOperationExceptionUnavailableApplicationException- If the application couldn't be saved because it couldn't get the lock to it.
-
updateAssociatedObjectsByType
@Write(K_CONTENT) <H extends com.appiancorp.ix.Haul<I,U>, Application updateAssociatedObjectsByTypeI, U> (Long appId, com.appiancorp.ix.Type<H, I, throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, InvalidOperationException, UnavailableApplicationExceptionU> type, U[] add, U[] remove) Associates or disassociates objects related to this application.- Parameters:
appId- The application id to update.type- The type of the objects to associate/disassociateadd- The objects to associate with this application (can be null).remove- The objects to dissasociate from this application (can be null).- Returns:
- application The updated object bean. Notice that this object might be different from the one provided as parameter because this method only updates a given section of the bean. Example, if updating navigation objects, after saving the object, the application metadata might be different if other user updated that section.
- Throws:
InvalidApplicationException- If an invalid Application id is provided.PrivilegeException- If the user does not have permission to perform this action.ApplicationNotFoundExceptionInvalidOperationExceptionUnavailableApplicationException- If the application couldn't be saved because it couldn't get the lock to it.
-
addAction
void addAction(Long appId, ApplicationAction action) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, UnavailableApplicationException, InvalidActionException Adds an Application Action with the given user friendly label, process model UUID, and description of the action.- Parameters:
appId- The application id to update.action- The action to add.- Throws:
InvalidApplicationException- If an invalid Application id is provided.PrivilegeException- If the user does not have permission to perform this action.ApplicationNotFoundException- If there is no application associated with the specified ID.UnavailableApplicationException- If the lock to the application cannot be obtained.InvalidActionException- If the action points to a process model that is not already associated with the application.
-
updateAction
void updateAction(Long appId, ApplicationAction updatedAction) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, UnavailableApplicationException, InvalidActionException, ActionNotFoundException Updates an existing Application Action with the given action that contains the new user friendly label, description of the action, and process model UUID.- Parameters:
appId- The application id to update.updatedAction- The action with an updated user friendly label, description, and process model UUID.- Throws:
InvalidApplicationException- If an invalid Application id is provided.PrivilegeException- If the user does not have permission to perform this action.ApplicationNotFoundException- If there is no application associated with the specified ID.UnavailableApplicationException- If the lock to the application cannot be obtained.InvalidActionException- If the action points to a process model that is not already associated with the application.ActionNotFoundException- If the action to update does not exist.
-
delete
@Write({K_CONTENT,OBJECT_STORE}) void delete(Long id) throws PrivilegeException, ApplicationNotFoundException Deletes the specified application.- Parameters:
id- The ID of the application to be deleted.- Throws:
PrivilegeException- if the user does not have permission to perform this action.ApplicationNotFoundException- If there is no application associated with the specified IDs.
-
delete
@Write({K_CONTENT,OBJECT_STORE}) void delete(Long[] id) throws PrivilegeException, ApplicationNotFoundException Deletes the specified applications.- Parameters:
id- An array IDs corresponding to the applications to be deleted.- Throws:
PrivilegeException- if the user does not have permission to perform this action.ApplicationNotFoundException- If there is no application associated with any of the specified IDs.
-
getApplication
@Read(K_CONTENT) Application getApplication(Long id) throws PrivilegeException, ApplicationNotFoundException Retrieves an application given its id.- Parameters:
id- The id of the application to be retrieved.- Returns:
- The application bean whose id matches the given id.
- Throws:
PrivilegeException- If the user does not have permission to perform this action.ApplicationNotFoundException- If there is no application associated with the specified id.
-
getApplicationByUuid
Application getApplicationByUuid(String uuid) throws PrivilegeException, ApplicationNotFoundException Retrieves an application given its UUID.- Parameters:
uuid- The UUID of the application to be retrieved.- Returns:
- The application bean whose uuid matches the given uuid.
- Throws:
PrivilegeException- If the user does not have permission to perform this action.ApplicationNotFoundException- If there is no application associated with the specified uuid.
-
getApplication
@Read(K_CONTENT) Application getApplication(String urlIdentifier) throws ApplicationNotFoundException, PrivilegeException Retrieves an application given its URL identifier.- Parameters:
urlIdentifier- The URL identifier of the application to be retrieved.- Returns:
- The application bean whose id matches the given URL identifier.
- Throws:
ApplicationNotFoundException- If there is no application associated with the specified URL identifier.PrivilegeException- If the user does not have permission to perform this action.
-
getApplicationWithRoleSet
@Read(K_CONTENT) Application getApplicationWithRoleSet(Long id) throws PrivilegeException, ApplicationNotFoundException Retrieves an application given its id with itsContentRoleSetset to a non-null value. TheContentRoleSetrepresents the access permissions the current user has to this object. Use this method when you know in advance that you are going to use the user's access levels to the Application object. Usage example:app.getRoleSet().getCanAdministrate()- Parameters:
id- The id of the application to be retrieved.- Returns:
- The application bean whose id matches the given id.
- Throws:
PrivilegeException- if the user does not have permission to perform this action.ApplicationNotFoundException- If there is no application associated with the specified id.
-
getApplicationsPaging
@Read(K_CONTENT) ResultPage getApplicationsPaging(int startIndex, int batchSize, Integer sortProperty, Integer sortOrder, boolean includeDrafts) Retrieves the applications defined on the system.- Parameters:
startIndex- the index of the collection of total results at which to start. Negative numbers are treated as zeros.batchSize- the number of results to return. UseConstants.COUNT_ALLto return the entire collection, but this is STRONGLY discouraged.sortProperty- The property by which the results will be sorted. This is one of theCOLUMN_XXXconstants inContentConstants.sortOrder- the order in which to sort the results.This is one ofConstants.SORT_ORDER_ASCENDINGorConstants.SORT_ORDER_DESCENDINGincludeDrafts- whether or not to include "DRAFT" applications with the results, otherwise, only "PUBLISHED" applications will be in the list. An application is in "published" mode when setting Application.setPublished(true)- Returns:
- a ResultPage containing the list of
Applicationobjects.
-
getApplicationsWithRoleSetsPaging
@Read(K_CONTENT) ResultPage getApplicationsWithRoleSetsPaging(int startIndex, int batchSize, Integer sortProperty, Integer sortOrder, boolean includeDrafts) Retrieves the applications defined on the system with itsContentRoleSetset to a non-null value. TheContentRoleSetrepresents the access permissions the current user has to this object. Use this method when you know in advance that you are going to* use the user's access levels to the Application object. Usage example:app.getRoleSet().getCanAdministrate()- Parameters:
startIndex- the index of the collection of total results at which to start. Negative numbers are treated as zeros.batchSize- batchSize the number of results to return. UseConstants.COUNT_ALLto return the entire collection, but this is STRONGLY discouraged.sortProperty- The property by which the results will be sorted. This is one of theCOLUMN_XXXconstants inContentConstants.sortOrder- sortOrder the order in which to sort the results.This is one ofConstants.SORT_ORDER_ASCENDINGorConstants.SORT_ORDER_DESCENDINGincludeDrafts- whether or not to include "DRAFT" applications with the results, otherwise, only "PUBLISHED" applications will be in the list. An application is in "published" mode when setting Application.setPublished(true)- Returns:
- a ResultPage containing the list of
Applicationobjects.
-
getRoleMap
@Read(K_CONTENT) ApplicationRoleMap getRoleMap(Long id) throws ApplicationNotFoundException, PrivilegeException Retrieves the security role map for the specified application.- Parameters:
id- The application id.- Returns:
- ApplicationRoleMap
- Throws:
PrivilegeException- if the user does not have permission to perform this actionApplicationNotFoundException- If there is no application associated with the specified id.
-
setRoleMap
@Write(K_CONTENT) void setRoleMap(Long id, ApplicationRoleMap rolemap) throws ApplicationNotFoundException, InvalidUserException, PrivilegeException Sets the security role map definition for the specified application.- Parameters:
id- The application id.rolemap- The application role map.- Throws:
InvalidUserException- if an invalid user or group is referencedPrivilegeException- if the user does not have permission to perform this actionApplicationNotFoundException- If there is no application associated with the specified id.
-
setDefaultApplication
Sets a default system application. This would be the first application that users see by default in the applications environment. Requires system administrator privileges and also assumes that the application exists.- Parameters:
id- The application id.- Throws:
PrivilegeException- If the user is not an admin.
-
getDefaultApplication
Gets the default system application. If no default system application has been set, this will return null.- Returns:
- The id of the default application.
-
updateAssociatedObjectsByType(Long, Type, Object[], Object[])instead