Class AtlanGroup

java.lang.Object
com.atlan.model.core.AtlanObject
com.atlan.model.admin.AtlanGroup
All Implemented Interfaces:
Serializable

public class AtlanGroup extends AtlanObject
See Also:
  • Constructor Details

  • Method Details

    • isDefault

      public boolean isDefault()
      Whether this group is a default (auto-assigned to new users) (true), or not (false).
    • creator

      public static AtlanGroup.AtlanGroupBuilder<?,?> creator(String alias)
      Builds the minimal object necessary to create a group.
      Parameters:
      alias - name of the group, as it should appear in the UI
      Returns:
      the minimal request necessary to update the group, as a builder
    • updater

      public static AtlanGroup.AtlanGroupBuilder<?,?> updater(String id, String path)
      Builds the minimal object necessary to update a group.
      Parameters:
      id - unique identifier (GUID) of the group
      path - unique path of the group
      Returns:
      the minimal request necessary to update the group, as a builder
    • generateName

      public static String generateName(String alias)
      Generate an internal name for this group from its UI-shown alias.
      Parameters:
      alias - name of the group as it appears in the UI
      Returns:
      internal name for the group
    • create

      public String create() throws AtlanException
      Send this group to Atlan to create the group in Atlan.
      Returns:
      the unique identifier (GUID) of the group that was created, or null if no group was created
      Throws:
      AtlanException - on any error during API invocation
    • create

      public String create(AtlanClient client) throws AtlanException
      Send this group to Atlan to create the group in Atlan.
      Parameters:
      client - connectivity to the Atlan tenant on which to create the group
      Returns:
      the unique identifier (GUID) of the group that was created, or null if no group was created
      Throws:
      AtlanException - on any error during API invocation
    • update

      public void update() throws AtlanException
      Send this group to Atlan to update the group in Atlan.
      Throws:
      AtlanException - on any error during API invocation
    • update

      public void update(AtlanClient client) throws AtlanException
      Send this group to Atlan to update the group in Atlan.
      Parameters:
      client - connectivity to the Atlan tenant on which to update the group
      Throws:
      AtlanException - on any error during API invocation
    • delete

      public static void delete(String id) throws AtlanException
      Delete a group from Atlan.
      Parameters:
      id - unique identifier (GUID) of the group to delete
      Throws:
      AtlanException - on any error during API invocation
    • delete

      public static void delete(AtlanClient client, String id) throws AtlanException
      Delete a group from Atlan.
      Parameters:
      client - connectivity to the Atlan tenant from which to delete the group
      id - unique identifier (GUID) of the group to delete
      Throws:
      AtlanException - on any error during API invocation
    • list

      public static List<AtlanGroup> list() throws AtlanException
      Retrieves all groups currently defined in Atlan.
      Returns:
      the list of groups currently defined in Atlan
      Throws:
      AtlanException - on any error during API invocation
    • list

      public static List<AtlanGroup> list(AtlanClient client) throws AtlanException
      Retrieves all groups currently defined in Atlan.
      Parameters:
      client - connectivity to the Atlan tenant from which to list the groups
      Returns:
      the list of groups currently defined in Atlan
      Throws:
      AtlanException - on any error during API invocation
    • get

      public static List<AtlanGroup> get(String alias) throws AtlanException
      Retrieves all groups with a name that contains the provided string. (This could include a complete group name, in which case there should be at most a single item in the returned list, or could be a partial group name to retrieve all groups with that naming convention.)
      Parameters:
      alias - name (as it appears in the UI) on which to filter the groups
      Returns:
      all groups whose name (in the UI) contains the provided string
      Throws:
      AtlanException - on any error during API invocation
    • get

      public static List<AtlanGroup> get(AtlanClient client, String alias) throws AtlanException
      Retrieves all groups with a name that contains the provided string. (This could include a complete group name, in which case there should be at most a single item in the returned list, or could be a partial group name to retrieve all groups with that naming convention.)
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the group
      alias - name (as it appears in the UI) on which to filter the groups
      Returns:
      all groups whose name (in the UI) contains the provided string
      Throws:
      AtlanException - on any error during API invocation
    • removeUsers

      public void removeUsers(List<String> userIds) throws AtlanException
      Remove one or more users from this group.
      Parameters:
      userIds - unique identifiers (GUIDs) of the users to remove from the group
      Throws:
      AtlanException - on any API communication issue
    • removeUsers

      public void removeUsers(AtlanClient client, List<String> userIds) throws AtlanException
      Remove one or more users from this group.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove the users from the group
      userIds - unique identifiers (GUIDs) of the users to remove from the group
      Throws:
      AtlanException - on any API communication issue
    • fetchUsers

      public UserResponse fetchUsers() throws AtlanException
      Fetch the users that belong to this group.
      Returns:
      details of the users that belong to this group
      Throws:
      AtlanException - on any API communication issue
    • fetchUsers

      public UserResponse fetchUsers(AtlanClient client) throws AtlanException
      Fetch the users that belong to this group.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the users belonging to the group
      Returns:
      details of the users that belong to this group
      Throws:
      AtlanException - on any API communication issue
    • builder

      public static AtlanGroup.AtlanGroupBuilder<?,?> builder()
    • toBuilder

      public AtlanGroup.AtlanGroupBuilder<?,?> toBuilder()
    • getAlias

      public String getAlias()
      Name of the group as it appears in the UI.
    • getAttributes

      public AtlanGroup.GroupAttributes getAttributes()
      Detailed attributes of the group.
    • getDecentralizedRoles

      public String getDecentralizedRoles()
      TBC
    • getId

      public String getId()
      Unique identifier for the group (GUID).
    • getName

      public String getName()
      Unique (internal) name for the group.
    • getPath

      public String getPath()
      TBC
    • getPersonas

      public SortedSet<AtlanGroup.Persona> getPersonas()
      Personas the group is associated with (limited details).
    • getPurposes

      public SortedSet<AtlanGroup.Purpose> getPurposes()
      Purposes the group is associated with (limited details).
    • getRoles

      public SortedSet<String> getRoles()
      TBC
    • getUserCount

      public Long getUserCount()
      Number of users in the group.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AtlanObject
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class AtlanObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AtlanObject
    • toString

      public String toString()
      Description copied from class: AtlanObject
      Overrides:
      toString in class AtlanObject