public interface ApplicationService
extends com.appiancorp.services.ContextSensitiveService
Modifier and Type | Field and Description |
---|---|
static boolean |
create$UPDATES |
static boolean |
delete$UPDATES |
static boolean |
getApplication$UPDATES |
static boolean |
getApplicationsPaging$UPDATES |
static boolean |
getApplicationsWithRoleSetsPaging$UPDATES |
static boolean |
getApplicationWithRoleSet$UPDATES |
static boolean |
getDefaultApplication$UPDATES |
static boolean |
getRoleMap$UPDATES |
static boolean |
save$UPDATES |
static boolean |
setDefaultApplication$UPDATES |
static boolean |
setRoleMap$UPDATES |
static boolean |
updateAssociatedObjects$UPDATES |
Modifier and Type | Method and Description |
---|---|
void |
addAction(java.lang.Long appId,
ApplicationAction action)
Adds an Application Action with the given user friendly label, process model UUID, and description of the
action.
|
java.lang.Long |
create(Application application)
Creates an application.
|
void |
delete(java.lang.Long id)
Deletes the specified application.
|
void |
delete(java.lang.Long[] id)
Deletes the specified applications.
|
Application |
getApplication(java.lang.Long id)
Retrieves an application given its id.
|
Application |
getApplication(java.lang.String urlIdentifier)
Retrieves an application given its URL identifier.
|
Application |
getApplicationByUuid(java.lang.String uuid)
Retrieves an application given its UUID.
|
ResultPage |
getApplicationsPaging(int startIndex,
int batchSize,
java.lang.Integer sortProperty,
java.lang.Integer sortOrder,
boolean includeDrafts)
Retrieves the applications defined on the system.
|
ResultPage |
getApplicationsWithRoleSetsPaging(int startIndex,
int batchSize,
java.lang.Integer sortProperty,
java.lang.Integer sortOrder,
boolean includeDrafts)
Retrieves the applications defined on the system with its
ContentRoleSet set to a non-null value. |
Application |
getApplicationWithRoleSet(java.lang.Long id)
Retrieves an application given its id with its
ContentRoleSet set to a non-null value. |
java.lang.Long |
getDefaultApplication()
Gets the default system application.
|
ApplicationRoleMap |
getRoleMap(java.lang.Long id)
Retrieves the security role map for the specified application.
|
void |
save(Application application)
Saves an application.
|
Application |
save(Application application,
java.util.Set<Application.Section> section)
Saves only the specified section of the application.
|
void |
setDefaultApplication(java.lang.Long id)
Sets a default system application.
|
void |
setRoleMap(java.lang.Long id,
ApplicationRoleMap rolemap)
Sets the security role map definition for the specified application.
|
void |
updateAction(java.lang.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.
|
Application |
updateAssociatedObjects(java.lang.Long appId,
com.appiancorp.ix.Type<?,?,java.lang.String> type,
java.lang.String[] add,
java.lang.String[] remove)
Deprecated.
|
<H extends com.appiancorp.ix.Haul<I,U>,I,U> |
updateAssociatedObjectsByType(java.lang.Long appId,
com.appiancorp.ix.Type<H,I,U> type,
U[] add,
U[] remove)
Associates or disassociates objects related to this application.
|
static final boolean create$UPDATES
static final boolean save$UPDATES
static final boolean updateAssociatedObjects$UPDATES
static final boolean delete$UPDATES
static final boolean getApplication$UPDATES
static final boolean getApplicationWithRoleSet$UPDATES
static final boolean getApplicationsPaging$UPDATES
static final boolean getApplicationsWithRoleSetsPaging$UPDATES
static final boolean getRoleMap$UPDATES
static final boolean setRoleMap$UPDATES
static final boolean setDefaultApplication$UPDATES
static final boolean getDefaultApplication$UPDATES
java.lang.Long create(Application application) throws InvalidApplicationException, PrivilegeException
application
- The application object to be created.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.void save(Application application) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, UnavailableApplicationException, InvalidNavigationItemException, InvalidActionException
application
- The application to be updated.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.Application save(Application application, java.util.Set<Application.Section> section) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, UnavailableApplicationException, InvalidNavigationItemException, InvalidActionException
application
- The application to be updated.section
- The Application.Section
(s) of the
application to be updated.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.@Deprecated Application updateAssociatedObjects(java.lang.Long appId, com.appiancorp.ix.Type<?,?,java.lang.String> type, java.lang.String[] add, java.lang.String[] remove) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, InvalidOperationException, UnavailableApplicationException
updateAssociatedObjectsByType(Long, Type, Object[], Object[])
insteadappId
- 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).InvalidApplicationException
- If an invalid Application id is provided.PrivilegeException
- If the user does not have permission to perform
this action.ApplicationNotFoundException
InvalidOperationException
UnavailableApplicationException
- If the application couldn't be saved because
it couldn't get the lock to it.<H extends com.appiancorp.ix.Haul<I,U>,I,U> Application updateAssociatedObjectsByType(java.lang.Long appId, com.appiancorp.ix.Type<H,I,U> type, U[] add, U[] remove) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, InvalidOperationException, UnavailableApplicationException
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).InvalidApplicationException
- If an invalid Application id is provided.PrivilegeException
- If the user does not have permission to perform
this action.ApplicationNotFoundException
InvalidOperationException
UnavailableApplicationException
- If the application couldn't be saved because
it couldn't get the lock to it.void addAction(java.lang.Long appId, ApplicationAction action) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, UnavailableApplicationException, InvalidActionException
appId
- The application id to update.action
- The action to add.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.void updateAction(java.lang.Long appId, ApplicationAction updatedAction) throws InvalidApplicationException, PrivilegeException, ApplicationNotFoundException, UnavailableApplicationException, InvalidActionException, ActionNotFoundException
appId
- The application id to update.updatedAction
- The action with an updated user friendly label, description, and process model UUID.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.void delete(java.lang.Long id) throws PrivilegeException, ApplicationNotFoundException
id
- The ID of the application to be deleted.PrivilegeException
- if the user does not have permission to perform
this action.ApplicationNotFoundException
- If there is no application associated with
the specified IDs.void delete(java.lang.Long[] id) throws PrivilegeException, ApplicationNotFoundException
id
- An array IDs corresponding to the applications to be deleted.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.Application getApplication(java.lang.Long id) throws PrivilegeException, ApplicationNotFoundException
id
- The id of the application to be retrieved.PrivilegeException
- If the user does not have permission to perform
this action.ApplicationNotFoundException
- If there is no application associated
with the specified id.Application getApplicationByUuid(java.lang.String uuid) throws PrivilegeException, ApplicationNotFoundException
uuid
- The UUID of the application to be retrieved.PrivilegeException
- If the user does not have permission to perform
this action.ApplicationNotFoundException
- If there is no application associated
with the specified uuid.Application getApplication(java.lang.String urlIdentifier) throws ApplicationNotFoundException, PrivilegeException
urlIdentifier
- The URL identifier of the application to be retrieved.ApplicationNotFoundException
- If there is no application associated
with the specified URL identifier.PrivilegeException
- If the user does not have permission to perform
this action.Application getApplicationWithRoleSet(java.lang.Long id) throws PrivilegeException, ApplicationNotFoundException
ContentRoleSet
set to a non-null value.
The ContentRoleSet
represents 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()
id
- The id of the application to be retrieved.PrivilegeException
- if the user does not have permission to perform this action.ApplicationNotFoundException
- If there is no application associated with the specified
id.ResultPage getApplicationsPaging(int startIndex, int batchSize, java.lang.Integer sortProperty, java.lang.Integer sortOrder, boolean includeDrafts)
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. Use
Constants.COUNT_ALL
to return the
entire collection, but this is STRONGLY discouraged.sortProperty
- The property by which the results will be sorted. This is one
of the COLUMN_XXX
constants in ContentConstants
.sortOrder
- the order in which to sort the results.This is one of
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
includeDrafts
- 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)Application
objects.Application.setPublished.
ResultPage getApplicationsWithRoleSetsPaging(int startIndex, int batchSize, java.lang.Integer sortProperty, java.lang.Integer sortOrder, boolean includeDrafts)
ContentRoleSet
set to a non-null value. The
ContentRoleSet
represents 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()
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. Use
Constants.COUNT_ALL
to return the entire
collection, but this is STRONGLY discouraged.sortProperty
- The property by which the results will be sorted. This is one of the
COLUMN_XXX
constants in ContentConstants
.sortOrder
- sortOrder the order in which to sort the results.This is one of
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
includeDrafts
- 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)Application
objects.Application.setPublished.
ApplicationRoleMap getRoleMap(java.lang.Long id) throws ApplicationNotFoundException, PrivilegeException
id
- The application id.PrivilegeException
- if the user does not have permission to perform
this actionApplicationNotFoundException
- If there is no application associated with
the specified id.void setRoleMap(java.lang.Long id, ApplicationRoleMap rolemap) throws ApplicationNotFoundException, InvalidUserException, PrivilegeException
id
- The application id.rolemap
- The application role map.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.void setDefaultApplication(java.lang.Long id) throws PrivilegeException
id
- The application id.PrivilegeException
- If the user is not an admin.java.lang.Long getDefaultApplication()
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.