Interface GroupTypeService

All Superinterfaces:
ContextSensitiveSingletonService, Service

public interface GroupTypeService extends ContextSensitiveSingletonService
Provides the main functionality needed to create, update, delete, and get groups types. GroupType GroupType can be customized to have different Attributes Attribute. The attribute types that are supported are listed below. There are five primitive types and two Appian types - User User and Group Group
See Also:
  • Field Details

    • TYPE_BOOLEAN

      static final Integer TYPE_BOOLEAN
      Type for attributes that are booleans
    • TYPE_STRING

      static final Integer TYPE_STRING
      Type for attributes that are strings
    • TYPE_INTEGER

      static final Integer TYPE_INTEGER
      Type for attributes that are integers
    • TYPE_FLOAT

      static final Integer TYPE_FLOAT
      Type for attributes that are decimals
    • TYPE_DATE

      static final Integer TYPE_DATE
      Type for attributes that are dates
    • TYPE_USER

      static final Integer TYPE_USER
      Type for attributes that are Appian Users User
    • TYPE_GROUP

      static final Integer TYPE_GROUP
      Type for attributes that are Appian Groups Group
    • ACTION_GROUPTYPE_DELETE_GROUPTYPE

      static final Integer ACTION_GROUPTYPE_DELETE_GROUPTYPE
      The action of deleting a group type
    • ACTION_GROUPTYPE_MODIFY_GROUPTYPE_SECURITY_SETTINGS

      static final Integer ACTION_GROUPTYPE_MODIFY_GROUPTYPE_SECURITY_SETTINGS
      The action of modifying a group type's security settings
    • ACTION_GROUPTYPE_EDIT_GROUPTYPE_ATTRIBUTES

      static final Integer ACTION_GROUPTYPE_EDIT_GROUPTYPE_ATTRIBUTES
      The action of editing a group type
    • ACTION_GROUPTYPE_VIEW_GROUPTYPE_ATTRIBUTES

      static final Integer ACTION_GROUPTYPE_VIEW_GROUPTYPE_ATTRIBUTES
      The action of viewing a group type's attributes
    • ACTION_GROUPTYPE_DELETE_GROUPTYPE_DYNAMIC_ATTRIBUTES

      static final Integer ACTION_GROUPTYPE_DELETE_GROUPTYPE_DYNAMIC_ATTRIBUTES
      The action of delete a group type's dynamic attributes
    • ACTION_GROUPTYPE_EDIT_GROUPTYPE_DYNAMIC_ATTRIBUTES

      static final Integer ACTION_GROUPTYPE_EDIT_GROUPTYPE_DYNAMIC_ATTRIBUTES
      The action of edit a group type's dynamic attributes
    • ACTION_GROUPTYPE_ADD_GROUPTYPE_DYNAMIC_ATTRIBUTES

      static final Integer ACTION_GROUPTYPE_ADD_GROUPTYPE_DYNAMIC_ATTRIBUTES
      The action of add to a group type's dynamic attributes
    • ACTION_GROUPTYPE_USE_GROUPTYPE

      static final Integer ACTION_GROUPTYPE_USE_GROUPTYPE
      The action of using a group type (creating groups of that type)
    • ACTION_GROUPTYPE_VIEW_GROUPTYPE_EXISTENCE

      static final Integer ACTION_GROUPTYPE_VIEW_GROUPTYPE_EXISTENCE
      The action of viewing a group type
    • addAttribute$UPDATES

      static final boolean addAttribute$UPDATES
      See Also:
    • createGroupType$UPDATES

      static final boolean createGroupType$UPDATES
      See Also:
    • deleteAttribute$UPDATES

      static final boolean deleteAttribute$UPDATES
      See Also:
    • deleteGroupType$UPDATES

      static final boolean deleteGroupType$UPDATES
      See Also:
    • deleteGroupTypes$UPDATES

      static final boolean deleteGroupTypes$UPDATES
      See Also:
    • getGroupTypeAttributes$UPDATES

      static final boolean getGroupTypeAttributes$UPDATES
      See Also:
    • getGroupType$UPDATES

      static final boolean getGroupType$UPDATES
      See Also:
    • getGroupTypeId$UPDATES

      static final boolean getGroupTypeId$UPDATES
      See Also:
    • getGroupTypeIds$UPDATES

      static final boolean getGroupTypeIds$UPDATES
      See Also:
    • getAllGroupTypes$UPDATES

      static final boolean getAllGroupTypes$UPDATES
      See Also:
    • getGroupTypes$UPDATES

      static final boolean getGroupTypes$UPDATES
      See Also:
    • getGroupTypeName$UPDATES

      static final boolean getGroupTypeName$UPDATES
      See Also:
    • getGroupTypeNames$UPDATES

      static final boolean getGroupTypeNames$UPDATES
      See Also:
    • updateGroupType$UPDATES

      static final boolean updateGroupType$UPDATES
      See Also:
    • getOperatorsForDataType$UPDATES

      static final boolean getOperatorsForDataType$UPDATES
      See Also:
    • doesGroupTypeExist$UPDATES

      static final boolean doesGroupTypeExist$UPDATES
      See Also:
    • getGroupTypeActions$UPDATES

      static final boolean getGroupTypeActions$UPDATES
      See Also:
    • isAttributeUnique$UPDATES

      static final boolean isAttributeUnique$UPDATES
      See Also:
    • getAllGroupTypeAttributes$UPDATES

      static final boolean getAllGroupTypeAttributes$UPDATES
      See Also:
    • getAllGroupTypeAttributesForGroupRules$UPDATES

      static final boolean getAllGroupTypeAttributesForGroupRules$UPDATES
      See Also:
    • getApplicationName$UPDATES

      static final boolean getApplicationName$UPDATES
      See Also:
    • getWorkspace$UPDATES

      static final boolean getWorkspace$UPDATES
      See Also:
  • Method Details

    • addAttribute

      Adds a new attribute to a group type.

      Attribute names must be unique for a particular group type. In order to minimize possible breaks with the user interface, it is HIGHLY recommended that the Attribute name be validated for illegal characters (only allow alphanumeric symbols and underscores).

      Parameters:
      attribute_ - the Attribute to be added. The following fields must be populated in the Attribute object: name and type
      groupTypeId_ - the ID of the group type to which to add the attribute
      Throws:
      InvalidGroupTypeException - if the no group type with the given ID exists
      DuplicateNameException - if there already exists an attribute for the given group type with the given name
      UunsupportedAttributeTypeException - if the type of the attribute is invalid
      InvalidAttributeValueException - if the value of the attribute is incompatible with its type. This may occur if the type of the value field does not match the value of the type field, or if an invalid number or too large a number is given for attribute type Attribute.TYPE_FLOAT or Attribute.TYPE_INTEGER
      ServiceException - if any system-level error occurs
      UnsupportedAttributeTypeException
    • createGroupType

      Creates a new group type.

      The name of group type must be unique among all group types. In order to minimize possible breaks with the user interface, it is HIGHLY recommended that the GroupType name be validated for illegal characters (only allow alphanumeric symbols and underscores).

      Parameters:
      groupType_ - the group type to be created. GroupType fields required for creation are: groupTypeName and creator.
      Returns:
      the ID of the created group type
      Throws:
      DuplicateNameException - if a group type already exists with the given name
      InvalidNameException - if the group type name is null.
      InvalidUserException - if an invalid user is passed as creator of the group type.
      InvalidAttributeValueException - if the value of a group type attribute is incompatible with its type. This may occur if the type of the value field does not match the value of the type field, or if an invalid number or too large a number is given for attribute type Attribute.TYPE_FLOAT or Attribute.TYPE_INTEGER
      DuplicateUuidException - if the UUID passed in already exists in the system.
      ServiceException - if any system-level error occurs
    • deleteAttribute

      void deleteAttribute(Long groupTypeId_, String attributeName_) throws InvalidGroupTypeException, InvalidAttributeException, SystemAttributeException
      Deletes a single attribute from a given group type The attribute will also be deleted from groups that reference this group type.
      Parameters:
      groupTypeId_ - the group type ID
      attributeName_ - the attribute name
      Throws:
      InvalidGroupTypeException - if the group type ID does not refer to a valid group type
      InvalidAttributeException - if the group type does not have an attribute with the given name
      SystemAttributeException - if the attribute is a system level attribute
      ServiceException - if any system-level error occurs
    • deleteGroupType

      Deletes a single group type. Deleting a group type is possible only if there are no existing groups of the given type. To check for any groups of a given group type, use GroupService.getGroupsOfType(Long).
      Parameters:
      groupTypeId_ - the ID of group type to delete
      Throws:
      InvalidGroupTypeException - if the group type ID does not refer to a valid group type
      GroupsExtantException - if there exist groups of the given group type or if there exist group rules that reference the given group type
      SystemGroupTypeException - if the group type being deleted is a system group type
      ServiceException - if any system-level error occurs
    • deleteGroupTypes

      void deleteGroupTypes(Long[] groupTypeIds_) throws InvalidGroupTypeException, GroupsExtantException, SystemGroupTypeException
      Deletes a list of group types. Deleting a group type is possible only if there are no existing groups of the given type. To check for any groups of a given group type, use GroupService.getGroupsOfType(Long).
      Parameters:
      groupTypeIds_ - the list of IDs of group types to delete
      Throws:
      InvalidGroupTypeException - if any group type ID does not refer to a valid group type
      GroupsExtantException - if there exist groups of any of the given group types or if there exist group rules that reference any of the given group types
      SystemGroupTypeException - if the group type being deleted is a system group type
      ServiceException - if any system-level error occurs
    • getGroupTypeAttributes

      Attribute[] getGroupTypeAttributes(Long groupTypeId_) throws InvalidGroupTypeException
      Gets the list of fixed attributes for a given group type. Fixed attributes are name, description, creator, timestampModified, timestampCreated.
      Parameters:
      groupTypeId_ - the ID of the group type for which to retrieve attributes
      Returns:
      the Attribute list; null if the group type has no attributes
      Throws:
      InvalidGroupTypeException - if the group type ID does not refer to a valid group type
      ServiceException - if any system-level error occurs
    • getGroupType

      GroupType getGroupType(Long groupTypeId_) throws InvalidGroupTypeException
      Gets a group type by ID.
      Parameters:
      groupTypeId_ - the Id of the group type
      Returns:
      the group type
      Throws:
      InvalidGroupTypeException - if the group type ID does not refer to a valid group type
      ServiceException - if any system-level error occurs
    • getGroupTypeId

      Long getGroupTypeId(String groupTypeName_)
      Gets the ID for a given group type, by group type name.
      Parameters:
      groupTypeName_ - the name of group type
      Returns:
      the ID of the requested group type; -1 if no group type with the given name exists
      Throws:
      ServiceException - if any system-level error occurs
    • getGroupTypeIds

      Long[] getGroupTypeIds(String[] groupTypeNames_)
      Gets a list of group type ids for a given set of group type names.
      Parameters:
      groupTypeNames_ - the list of group type names
      Returns:
      the list of group type IDs; -1 will be returned for a group type name if no group type with that name exists
      Throws:
      ServiceException - if any system-level error occurs
    • getAllGroupTypes

      GroupType[] getAllGroupTypes()
      Gets a list of all group types
      Returns:
      the list of all group types
      Throws:
      ServiceException - if any system-level error occurs
    • getGroupTypes

      GroupType[] getGroupTypes(Long[] groupTypeIds_) throws InvalidGroupTypeException
      Gets a list of group types by ID
      Parameters:
      groupTypeIds_ - a list of group type IDs
      Returns:
      the list of group types corresponding to the given IDs
      Throws:
      InvalidGroupTypeException - if any group type ID does not refer to a valid group type
      ServiceException - if any system-level error occurs
    • getGroupTypeName

      String getGroupTypeName(Long groupTypeId_) throws InvalidGroupTypeException
      Gets the name of the group type that corresponds to a given group type ID.
      Parameters:
      groupTypeId_ - the group type id
      Returns:
      the name of the group type
      Throws:
      InvalidGroupTypeException - if the group type ID does not refer to a valid group type
      ServiceException - if any system-level error occurs
    • getGroupTypeNames

      String[] getGroupTypeNames(Long[] groupTypeIds_) throws InvalidGroupTypeException
      Gets the names of the group types that correspond to a given list of group type IDs.
      Parameters:
      groupTypeIds_ - the group type ids
      Returns:
      the names of the group types
      Throws:
      InvalidGroupTypeException - if any group type ID does not refer to a valid group type
      ServiceException - if any system-level error occurs
    • updateGroupType

      void updateGroupType(GroupType groupType_) throws InvalidGroupTypeException, DuplicateNameException
      Updates a group type's name and description. Name of group type must be unique. NOTE: To modify a group type's attributes, use addAttribute(java.lang.Long, com.appiancorp.suiteapi.personalization.Attribute) and deleteAttribute(java.lang.Long, java.lang.String)

      In order to minimize possible breaks with the user interface, it is HIGHLY recommended that the group type name be validated for illegal characters (only allow alphanumeric symbols and underscores).

      Parameters:
      groupType_ - The group type to be updated
      Throws:
      InvalidGroupTypeException - if the group type ID does not refer to a valid group type
      DuplicateNameException - if a group type with the given name already exists
      ServiceException - if any system-level error occurs
    • getOperatorsForDataType

      Operator[] getOperatorsForDataType(int dataType_) throws UnsupportedAttributeTypeException
      Gets a list of possible operators for a given data type. Use this function when updating an attribute or when you need to obtain a list of operators to conduct a user or group search.
      Parameters:
      dataType_ - one of the TYPE_XXX constants
      Returns:
      an array of valid operators for the data type
      Throws:
      UnsupportedAttributeTypeException - if the data type is invalid
      ServiceException - if any system-level error occurs
    • doesGroupTypeExist

      boolean doesGroupTypeExist(Long groupTypeId_)
      Determines whether a given group type exists
      Parameters:
      groupTypeId_ - the ID of group type
      Returns:
      true if the group type exists, false otherwise.
      Throws:
      ServiceException - if any system-level error occurs
    • doesGroupTypeExist

      boolean doesGroupTypeExist(String groupTypeName_)
      Checks to see if a given group type exists
      Parameters:
      groupTypeName_ - the name of group type
      Returns:
      true if group type exists, false otherwise
      Throws:
      ServiceException - if any system-level error occurs
    • getGroupTypeActions

      Boolean[] getGroupTypeActions(Long groupTypeId_, Integer[] actionIds_) throws InvalidGroupTypeException
      Gets Boolean array for the actions passed in, that indicates whether the actions can be performed on the given group type by the current user. For each item in the returned array, Boolean.TRUE indicates that the current user can perform the action.
      Parameters:
      groupTypeId_ - the group type ID.
      actionIds_ - IDs of actions to check. Each ID must be one of the ACTION_GROUPTYPE_XXX constants
      Returns:
      Boolean array indicating which of the actions the current user can perform
      Throws:
      InvalidGroupTypeException - if the group type ID does not refer to a valid group type
      ServiceException - if any system-level error occurs
    • isAttributeUnique

      boolean isAttributeUnique(String attributeName_, Long groupTypeId_) throws InvalidGroupTypeException
      Determines whether a given attribute name is unique for a particular group type
      Parameters:
      attributeName_ - the name of attribute
      groupTypeId_ - the ID of the group type
      Returns:
      true if the group type does not already have an attribute with the given name; false otherwise
      Throws:
      InvalidGroupTypeException - if the group type ID does not refer to a valid group type
      ServiceException - if any system-level error occurs
    • getAllGroupTypeAttributes

      Attribute[] getAllGroupTypeAttributes(Long groupTypeId_) throws InvalidGroupTypeException
      Gets the list of group type attributes for a particular group type, both fixed and dynamic attributes. Fixed attributes are name, description, creator, timestampModified, timestampCreated. Dynamic attributes are those that specific to the group type. For example, a user can add an attribute of TYPE_USER after the group type is created, and that will be returned in this call, but not in
      Throws:
      InvalidGroupTypeException
    • getAllGroupTypeAttributesForGroupRules

      @Deprecated Attribute[] getAllGroupTypeAttributesForGroupRules(Long groupTypeId_) throws InvalidGroupTypeException
      Deprecated.
      Gets the list of group type attributes for a particular group type, both fixed and dynamic attributes. Excludes dynamic attributes that are invalid for use in rules. Fixed attributes are name, description, creator, timestampModified, timestampCreated. Dynamic attributes are those that specific to the group type. For example, a user can add an attribute of TYPE_USER after the group type is created, and that will be returned in this call, but not in
      Throws:
      InvalidGroupTypeException
    • getApplicationName

      String getApplicationName()
      Gets the name of the application on which this service is running.
      Returns:
      the name of the application
      Throws:
      ServiceException - if any system-level error occurs
    • getWorkspace

      String[] getWorkspace()
      Gets the current memory profile for the workspace.
      Returns:
      array of Strings of length 4 describing memory usage:
      • [0]Used - Memory Used by the Server so far for storage
      • [1]Allocated - Memory allocated for use. Often if a large data item was allocated by a server and subsequently freed, this value will be large compared to "Used". If nearly all memory allocated is in use, this value will be close to (but always higher than) "Used"
      • [2]Mapped - is the space used by memory-mapped files
      • [3]Available - is the total available memory for the Server process
      Note: All usage statistics are in Bytes.
      Throws:
      ServiceException - if any system-level error occurs