Class EssGroupImpl

java.lang.Object
com.appliedolap.essbase.AbstractEssObject
com.appliedolap.essbase.impl.EssGroupImpl
All Implemented Interfaces:
EssGroup, EssObject

public class EssGroupImpl extends AbstractEssObject implements EssGroup
  • Constructor Details

    • EssGroupImpl

      public EssGroupImpl(ApiContext api, EssServer server, com.appliedolap.essbase.client.model.GroupBean groupBean)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: EssObject
      Gets the name of this object. This will generally be the "nice" and "unique" name of this object, such as the application name, cube, member, variable, or whatever.
      Specified by:
      getName in interface EssGroup
      Specified by:
      getName in interface EssObject
      Returns:
      the simple name of this object
    • getType

      public EssObject.Type getType()
      Description copied from interface: EssObject
      Gets the type of this object.
      Specified by:
      getType in interface EssGroup
      Specified by:
      getType in interface EssObject
      Returns:
      the object type
    • getServer

      public EssServer getServer()
      Specified by:
      getServer in interface EssGroup
    • getDescription

      public String getDescription()
      The description, fetching the group in full if the listing did not carry one.

      GET /groups omits the description - with expand=all too - while GET /groups/{id} returns it. So a group that came from a listing reports null for a description it actually has, and anything that read that and wrote it back would erase it. That is not hypothetical: editing the role means sending the description alongside it.

      One extra call, once per group, and only when somebody asks for the field the listing left out.

      Specified by:
      getDescription in interface EssGroup
    • getRole

      public String getRole()
      Description copied from interface: EssGroup
      The service-level role this group grants its members - User, Power User or Service Administrator.
      Specified by:
      getRole in interface EssGroup
      Returns:
      the role name as the server reports it
    • setDescription

      public void setDescription(String description)
      Description copied from interface: EssGroup
      Changes the description, leaving the role alone.
      Specified by:
      setDescription in interface EssGroup
      Parameters:
      description - the new description
    • setRole

      public void setRole(String role)
      Description copied from interface: EssGroup
      Changes the role this group grants.
      Specified by:
      setRole in interface EssGroup
      Parameters:
      role - the role name, as EssGroup.getRole() reports it
    • delete

      public void delete()
      Description copied from interface: EssGroup
      Removes this group. Its members are not removed - they simply stop being in it.
      Specified by:
      delete in interface EssGroup
    • getUsers

      public List<EssUser> getUsers()
      Description copied from interface: EssGroup
      Gets the user members that are in this group.
      Specified by:
      getUsers in interface EssGroup
      Returns:
      the user members that are in this group.
    • addUsers

      public void addUsers(String... usernames)
      Description copied from interface: EssGroup
      Adds users to this group.

      A user cannot add or remove themselves: Essbase refuses with "not allowed to perform self provisioning/de-provisioning" even for a service administrator. That is a server rule, not a permission that can be granted.

      Specified by:
      addUsers in interface EssGroup
      Parameters:
      usernames - the user IDs to add
    • removeUsers

      public void removeUsers(String... usernames)
      Removal is a DELETE carrying a body - the array of user IDs - which is unusual enough to be worth naming: every query parameter form of this answers HTTP 500 "Request failed."
      Specified by:
      removeUsers in interface EssGroup
      Parameters:
      usernames - the user IDs to remove
    • getGroups

      public List<EssGroup> getGroups()
      Specified by:
      getGroups in interface EssGroup
    • addGroups

      public void addGroups(String... groupNames)
      Description copied from interface: EssGroup
      Adds groups as members of this group. Groups nest.
      Specified by:
      addGroups in interface EssGroup
      Parameters:
      groupNames - the group names to add
    • removeGroups

      public void removeGroups(String... groupNames)
      Description copied from interface: EssGroup
      Removes member groups from this group. They are not deleted, only unassigned.
      Specified by:
      removeGroups in interface EssGroup
      Parameters:
      groupNames - the group names to remove