Class Application

All Implemented Interfaces:
LocalId, ContentConstants, AppianTypeHolder, Serializable

public class Application extends Content
Represents an Application object, which consists of metadata, a navigation definition, and references to associated objects. While the Application bean extends from Content, none of the methods inherited from Content into Application are supported other than the ones defined explicitly in this class. Example, if "Content" would expose a method called "doSomething", the use of "doSomething" in an Application bean is not supported and must not be used.
See Also:
  • Constructor Details

    • Application

      public Application()
  • Method Details

    • getUrlIdentifier

      @Transient public String getUrlIdentifier()
      Returns the URL identifier for this Application. The identifier is used to directly navigate to the application via a dedicated URL.
      See Also:
    • setUrlIdentifier

      public void setUrlIdentifier(String urlIdentifier) throws InvalidApplicationException
      Sets the URL identifier for this Application. This will be used to provide an intuitive URL for direct access to the application. Example, the URL identifier can be "expenses" to be accessed in: "www.appianbpm.com/app/expenses" A valid URL identifier can only contain a-Z, 0-9, dashes and underscores. Its maximum length is 256 characters.
      Parameters:
      urlIdentifier - The URL identifier for this Application.
      Throws:
      InvalidApplicationException - If the urlIdentifier is invalid.
    • getCompanyName

      @Transient public String getCompanyName()
      Gets the company name of the publisher of this application.
      Returns:
      The company name.
    • setCompanyName

      public void setCompanyName(String companyName)
      Sets the company name for this application.
      Parameters:
      companyName - The new company name.
    • getCompanyUrl

      @Transient public String getCompanyUrl()
      Gets the company web site URL of the application publisher as a String.
      Returns:
      The company URL as a String.
    • setCompanyUrl

      public void setCompanyUrl(String url)
      Sets a the given URL as the company URL for the application publisher.
      Parameters:
      url - The new company URL.
    • getLastModifiedBy

      @Transient public String getLastModifiedBy()
      Gets the name of the user who last modified this Application
      Returns:
      The username of whoever last modified this Application
    • setLastModifiedBy

      public void setLastModifiedBy(String lastModifiedBy)
      Sets the name of the user who last modified this Application
      Parameters:
      lastModifiedBy - username that last modified this Application
    • setPublished

      public void setPublished(boolean isPublished)
      Sets the published state of the application. Published applications are available for viewing and selection from the End-User Environment.
      Parameters:
      isPublished - True to set the application to "published" in the end user environment.
    • isDefault

      public boolean isDefault()
      Tells if this application is marked as the default application.
      Returns:
      true if the application is the default application for the site
    • setDefault

      public void setDefault(boolean isDefault)
      Marks this application as the default application. This is an internal and non persisted application property. To set the default home application use ApplicationService.setDefaultApplication(Long).
      Parameters:
      isDefault - If this application is marked as the default one.
    • isPublished

      @Transient public boolean isPublished()
      Gets the published state of the application. Published applications are available for viewing and selection from the End-User Environment.
    • setPublic

      public void setPublic(boolean isPublic)
      A public application gives "viewer" privileges to all users of the system. This has precedence over the ApplicationRoleMap, that is, if the user "john.smith" is in the "deny" list of the application role map, but this application is "public" using this flag. Then "john.smith" will have "viewer" privileges.
      Parameters:
      isPublic - If the application is to be public.
    • setSystem

      public void setSystem(boolean isSystem)
      Sets whether or not this application is a system application. Once the flag is set and the application saved, the flag can't be set back again to false.
      Parameters:
      isSystem - whether or not this application should be treated as a system app
    • isSystem

      @Transient public boolean isSystem()
      Whether or not this application is a system application.
    • getPublic

      public boolean getPublic()
      A public application gives "viewer" privileges to all users of the system.
      Returns:
      If the application is public.
    • setIconRelativePath

      public void setIconRelativePath(String iconRelPath)
      Sets this application's icon path, if stored within the App server structure
      Parameters:
      iconRelPath - the path where this application's icon is located
    • getIconRelativePath

      @Transient public String getIconRelativePath()
      Gets this application's icon path if it is stored within the application server structure
      Returns:
      the application icon path
    • getPrefix

      @Transient public String getPrefix()
      Gets the prefix of the application as a String. The application prefix is added by default to certain objects created within the application.
      Returns:
      The application prefix as a String.
    • setPrefix

      public void setPrefix(String prefix) throws InvalidApplicationException
      Sets the prefix of the application. The application prefix is added by default to certain objects created within the application. It is suggested that the application prefix be unique for the Appian environment. An application prefix must meet the following requirements: < 5 characters in length No special characters Cannot all be numbers
      Parameters:
      prefix - The new application prefix.
      Throws:
      InvalidApplicationException
    • addNavigationItem

      public void addNavigationItem(String displayName, String pageUuid, String urlIdentifier) throws InvalidNavigationItemException
      Adds a new navigation item to the Application's navigation definition to the end of the list.
      Parameters:
      displayName - the label that will be shown to the user when rendering the navigation link
      pageUuid - the UUID of the target page of the new navigation item
      urlIdentifier - A short string that will be used to provide direct, intuitive URL access to the page, e.g. "www.appianbpm.com/app/expenses/create"
      Throws:
      InvalidNavigationItemException - If the parameters for the navigation item are invalid.
    • addNavigationItem

      public void addNavigationItem(String displayName, String pageUuid, String urlIdentifier, int index) throws InvalidNavigationItemException
      Adds a new navigation item to the Application's navigation definition at the specified index.
      Parameters:
      displayName - the label that will be shown to the user when rendering the navigation link
      pageUuid - the UUID of the target page of the new navigation item. It is expected that this page is part of the application.
      urlIdentifier - A short string that will be used to provide direct, intuitive URL access to the page, e.g. "www.appianbpm.com/app/expenses/create"
      index - The index where the item should be positioned (where 0 is the first element).
      Throws:
      InvalidNavigationItemException - If the parameters for the navigation item are invalid.
    • getNavigationItems

      @Transient public ApplicationNavigationItem[] getNavigationItems()
      Returns the list of navigation items defined for the Application.
      Returns:
      the list of navigation items, represented as an array of ApplicationNavigationItems
    • removeNavigationItem

      public ApplicationNavigationItem removeNavigationItem(int index) throws InvalidNavigationItemException
      Removes the navigation item at the specified index.
      Parameters:
      index - the index of the navigation item.
      Throws:
      InvalidNavigationItemException - if the index is invalid.
    • addAction

      public void addAction(String displayLabel, String processModelUuid, String description) throws InvalidActionException
      Adds a new application action to the end of the Application's actions list.
      Parameters:
      displayLabel - The user friendly label to use when displaying this action.
      processModelUuid - The UUID of the process model that executes as part of this action. It is expected that this process model is part of the application.
      description - The description of the action.
      Throws:
      InvalidActionException - If any of the parameters for the action is invalid.
    • addAction

      public void addAction(String displayLabel, String processModelUuid, String description, int index) throws InvalidActionException
      Adds a new application action to the Application's actions list at the specified position.
      Parameters:
      displayLabel - The user friendly label to use when displaying this action.
      processModelUuid - The UUID of the process model that executes as part of this action. It is expected that this process model is part of the application.
      description - The description of the action.
      index - The index where the item should be positioned (where 0 is the first element).
      Throws:
      InvalidActionException - If any of the parameters for the action is invalid.
    • getActions

      @Transient public ApplicationAction[] getActions()
      Returns the list of actions defined for the Application.
      Returns:
      the list of actions, represented as an array of ApplicationActions.
    • removeAction

      public ApplicationAction removeAction(int index) throws InvalidActionException
      Removes the ApplicationAction at the specified index.
      Parameters:
      index - The index of the action to remove in the application's list of actions.
      Throws:
      InvalidActionException - If the index is invalid.
    • addObjects

      @Deprecated public void addObjects(com.appiancorp.ix.Type<?,?,String> type, String[] uuids) throws InvalidApplicationException
      Associates objects of the specified type with the Application.
      Parameters:
      type - Object type.
      uuids - Array of UUIDs corresponding to the objects to be added. May be null but may not be empty or contain null.
      Throws:
      InvalidApplicationException - If trying to add a null item.
    • addObjectsByType

      @Deprecated public <H extends com.appiancorp.ix.Haul<I, U>, I, U> void addObjectsByType(com.appiancorp.ix.Type<H,I,U> type, U[] uuids) throws InvalidApplicationException
      Associates objects of the specified type with the Application.
      Parameters:
      type - Object type.
      uuids - Array of UUIDs corresponding to the objects to be added. May be null but may not be empty or contain null.
      Throws:
      InvalidApplicationException - If trying to add a null item.
    • addObjectsByType

      public <H extends com.appiancorp.ix.Haul<I, U>, I, U> void addObjectsByType(Long appianTypeLong, U[] uuids) throws InvalidApplicationException
      Associates objects of the specified type with the Application.
      Parameters:
      appianTypeLong - Object type. The only supported content type is AppianTypeLong.CONTENT_ITEM. Any other content type passed in (e.g. AppianTypeLong.FOLDER) will be treated as AppianTypeLong.CONTENT_ITEM.
      uuids - Array of UUIDs corresponding to the objects to be added. May be null but may not be empty or contain null.
      Throws:
      InvalidApplicationException - If trying to add a null item.
    • getApplicationObjects

      @Deprecated public Set<String> getApplicationObjects(com.appiancorp.ix.Type<?,?,String> type)
      Deprecated.
      Gets an unmodifiable set of all of the UUIDs of a specified Type that have been associated with this Application. Any attempts to modify the return set will return an UnsupportedOperationException. See Collections.unmodifiableSet(Set)
      Parameters:
      type - The object Type.
      Returns:
      An unmodifiable set with all the application UUIDs.
    • getObjectsByType

      @Deprecated public <H extends com.appiancorp.ix.Haul<I, U>, I, U> Set<U> getObjectsByType(com.appiancorp.ix.Type<H,I,U> type)
      Deprecated.
      Gets an unmodifiable set of all of the UUIDs of a specified Type that have been associated with this Application. Any attempts to modify the return set will return an UnsupportedOperationException. See Collections.unmodifiableSet(Set)
      Parameters:
      type - Object type.
      Returns:
      An unmodifiable set with all the application UUIDs.
    • getObjectsByType

      public <H extends com.appiancorp.ix.Haul<I, U>, I, U> Set<U> getObjectsByType(Long appianTypeLong)
      Gets an unmodifiable set of all of the UUIDs of a specified Type that have been associated with this Application. Any attempts to modify the return set will return an UnsupportedOperationException. See Collections.unmodifiableSet(Set)
      Parameters:
      appianTypeLong - Object type. The only supported content type is AppianTypeLong.CONTENT_ITEM. Any other content type passed in (e.g. AppianTypeLong.FOLDER) will be treated as AppianTypeLong.CONTENT_ITEM.
      Returns:
      An unmodifiable set with all the application UUIDs.
    • removeObjects

      @Deprecated public void removeObjects(com.appiancorp.ix.Type<?,?,String> type, String[] uuids) throws InvalidApplicationException, InvalidOperationException
      Deprecated.
      Dissociate specified objects from the Application.
      Parameters:
      type - Objects' type.
      uuids - Array of UUIDs corresponding to the objects to be removed. May be null may not be empty or contain null.
      Throws:
      InvalidApplicationException - If trying to remove a null item.
      InvalidOperationException
    • removeObjectsByType

      @Deprecated public <H extends com.appiancorp.ix.Haul<I, U>, I, U> void removeObjectsByType(com.appiancorp.ix.Type<H,I,U> type, U[] uuids) throws InvalidApplicationException, InvalidOperationException
      Deprecated.
      Dissociate specified objects from the Application.
      Parameters:
      type - Objects' type.
      uuids - Array of UUIDs corresponding to the objects to be removed. May be null may not be empty or contain null.
      Throws:
      InvalidApplicationException - If trying to remove a null item.
      InvalidOperationException - If trying to remove an object associated an existing application item, such as an action or navigation item.
    • removeObjectsByType

      public <H extends com.appiancorp.ix.Haul<I, U>, I, U> void removeObjectsByType(Long appianTypeLong, U[] uuids) throws InvalidApplicationException, InvalidOperationException
      Dissociate specified objects from the Application.
      Parameters:
      appianTypeLong - Object type. The only supported content type is AppianTypeLong.CONTENT_ITEM. Any other content type passed in (e.g. AppianTypeLong.FOLDER) will be treated as AppianTypeLong.CONTENT_ITEM.
      uuids - Array of UUIDs corresponding to the objects to be removed. May be null may not be empty or contain null.
      Throws:
      InvalidApplicationException - If trying to remove a null item.
      InvalidOperationException - If trying to remove an object associated with an existing application item, such as an action or navigation item.
    • getAssociatedApplications

      @Transient public Application.AssociatedApplications getAssociatedApplications()
      Returns the associated applications. See Application.AssociatedApplications
    • setAssociatedApplications

      public Application.AssociatedApplications setAssociatedApplications(Application.AssociatedApplications AssociatedApplications)
      Sets the associated applications See Application.AssociatedApplications
      Parameters:
      AssociatedApplications - The associated applications to set
      Returns:
      The Application.AssociatedApplications
    • getAssociatedObjects

      @Transient public Application.AssociatedObjects getAssociatedObjects()
    • setAssociatedObjects

      public Application.AssociatedObjects setAssociatedObjects(Application.AssociatedObjects associatedObjects)
    • getApplicationNavigation

      @Transient public Application.ApplicationNavigation getApplicationNavigation()
    • setApplicationNavigation

      public Application.ApplicationNavigation setApplicationNavigation(Application.ApplicationNavigation applicationNavigation)
    • getApplicationActions

      @Transient public Application.ApplicationActions getApplicationActions()
    • setApplicationActions

      public Application.ApplicationActions setApplicationActions(Application.ApplicationActions applicationActions)
      Sets the {link ApplicationActions} containing the collection of actions.
      Returns: