Class Purpose

All Implemented Interfaces:
IAccessControl, IAsset, IPurpose, IReferenceable, AuditDetail, Serializable, Comparable<Reference>

@Generated("com.atlan.generators.ModelGeneratorV2") public class Purpose extends Asset implements IPurpose, IAccessControl, IAsset, IReferenceable
Atlan Type representing a Purpose model
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • trimToReference

      public Purpose trimToReference() throws InvalidRequestException
      Builds the minimal object necessary to create a relationship to a Purpose, from a potentially more-complete Purpose object.
      Overrides:
      trimToReference in class Asset
      Returns:
      the minimal object necessary to relate to the Purpose
      Throws:
      InvalidRequestException - if any of the minimal set of required properties for a Purpose relationship are not found in the initial object
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select()
      Start a fluent search that will return all Purpose assets. Additional conditions can be chained onto the returned search before any asset retrieval is attempted, ensuring all conditions are pushed-down for optimal retrieval. Only active (non-archived) Purpose assets will be included.
      Returns:
      a fluent search that includes all Purpose assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(AtlanClient client)
      Start a fluent search that will return all Purpose assets. Additional conditions can be chained onto the returned search before any asset retrieval is attempted, ensuring all conditions are pushed-down for optimal retrieval. Only active (non-archived) Purpose assets will be included.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the assets
      Returns:
      a fluent search that includes all Purpose assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(boolean includeArchived)
      Start a fluent search that will return all Purpose assets. Additional conditions can be chained onto the returned search before any asset retrieval is attempted, ensuring all conditions are pushed-down for optimal retrieval.
      Parameters:
      includeArchived - when true, archived (soft-deleted) Purposes will be included
      Returns:
      a fluent search that includes all Purpose assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(AtlanClient client, boolean includeArchived)
      Start a fluent search that will return all Purpose assets. Additional conditions can be chained onto the returned search before any asset retrieval is attempted, ensuring all conditions are pushed-down for optimal retrieval.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the assets
      includeArchived - when true, archived (soft-deleted) Purposes will be included
      Returns:
      a fluent search that includes all Purpose assets
    • refByGuid

      public static Purpose refByGuid(String guid)
      Reference to a Purpose by GUID. Use this to create a relationship to this Purpose, where the relationship should be replaced.
      Parameters:
      guid - the GUID of the Purpose to reference
      Returns:
      reference to a Purpose that can be used for defining a relationship to a Purpose
    • refByGuid

      public static Purpose refByGuid(String guid, Reference.SaveSemantic semantic)
      Reference to a Purpose by GUID. Use this to create a relationship to this Purpose, where you want to further control how that relationship should be updated (i.e. replaced, appended, or removed).
      Parameters:
      guid - the GUID of the Purpose to reference
      semantic - how to save this relationship (replace all with this, append it, or remove it)
      Returns:
      reference to a Purpose that can be used for defining a relationship to a Purpose
    • refByQualifiedName

      public static Purpose refByQualifiedName(String qualifiedName)
      Reference to a Purpose by qualifiedName. Use this to create a relationship to this Purpose, where the relationship should be replaced.
      Parameters:
      qualifiedName - the qualifiedName of the Purpose to reference
      Returns:
      reference to a Purpose that can be used for defining a relationship to a Purpose
    • refByQualifiedName

      public static Purpose refByQualifiedName(String qualifiedName, Reference.SaveSemantic semantic)
      Reference to a Purpose by qualifiedName. Use this to create a relationship to this Purpose, where you want to further control how that relationship should be updated (i.e. replaced, appended, or removed).
      Parameters:
      qualifiedName - the qualifiedName of the Purpose to reference
      semantic - how to save this relationship (replace all with this, append it, or remove it)
      Returns:
      reference to a Purpose that can be used for defining a relationship to a Purpose
    • get

      public static Purpose get(String id) throws AtlanException
      Retrieves a Purpose by one of its identifiers, complete with all of its relationships.
      Parameters:
      id - of the Purpose to retrieve, either its GUID or its full qualifiedName
      Returns:
      the requested full Purpose, complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Purpose does not exist or the provided GUID is not a Purpose
    • get

      public static Purpose get(AtlanClient client, String id) throws AtlanException
      Retrieves a Purpose by one of its identifiers, complete with all of its relationships.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the asset
      id - of the Purpose to retrieve, either its GUID or its full qualifiedName
      Returns:
      the requested full Purpose, complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Purpose does not exist or the provided GUID is not a Purpose
    • get

      public static Purpose get(AtlanClient client, String id, boolean includeRelationships) throws AtlanException
      Retrieves a Purpose by one of its identifiers, optionally complete with all of its relationships.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the asset
      id - of the Purpose to retrieve, either its GUID or its full qualifiedName
      includeRelationships - if true, all of the asset's relationships will also be retrieved; if false, no relationships will be retrieved
      Returns:
      the requested full Purpose, optionally complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Purpose does not exist or the provided GUID is not a Purpose
    • restore

      public static boolean restore(String qualifiedName) throws AtlanException
      Restore the archived (soft-deleted) Purpose to active.
      Parameters:
      qualifiedName - for the Purpose
      Returns:
      true if the Purpose is now active, and false otherwise
      Throws:
      AtlanException - on any API problems
    • restore

      public static boolean restore(AtlanClient client, String qualifiedName) throws AtlanException
      Restore the archived (soft-deleted) Purpose to active.
      Parameters:
      client - connectivity to the Atlan tenant on which to restore the asset
      qualifiedName - for the Purpose
      Returns:
      true if the Purpose is now active, and false otherwise
      Throws:
      AtlanException - on any API problems
    • creator

      public static Purpose.PurposeBuilder<?,?> creator(String name, Collection<String> atlanTags) throws InvalidRequestException
      Builds the minimal object necessary to create a Purpose.
      Parameters:
      name - of the Purpose
      atlanTags - Atlan tags on which this purpose should be applied
      Returns:
      the minimal request necessary to create the Purpose, as a builder
      Throws:
      InvalidRequestException - if at least one Atlan tag is not specified
    • updater

      public static Purpose.PurposeBuilder<?,?> updater(String qualifiedName, String name, boolean isEnabled)
      Builds the minimal object necessary to update a Purpose.
      Parameters:
      qualifiedName - of the Purpose
      name - of the Purpose
      isEnabled - whether the Purpose should be activated (true) or deactivated (false)
      Returns:
      the minimal request necessary to update the Purpose, as a builder
    • trimToRequired

      public Purpose.PurposeBuilder<?,?> trimToRequired() throws InvalidRequestException
      Builds the minimal object necessary to apply an update to a Purpose, from a potentially more-complete Purpose object.
      Overrides:
      trimToRequired in class Asset
      Returns:
      the minimal object necessary to update the Purpose, as a builder
      Throws:
      InvalidRequestException - if any of the minimal set of required properties for Purpose are not found in the initial object
    • findByName

      public static List<Purpose> findByName(String name) throws AtlanException
      Find a Purpose by its human-readable name. Only the bare minimum set of attributes and no relationships will be retrieved for the purpose, if found.
      Parameters:
      name - of the Purpose
      Returns:
      all Purposes with that name, if found
      Throws:
      AtlanException - on any API problems
      NotFoundException - if the Purpose does not exist
    • findByName

      public static List<Purpose> findByName(String name, Collection<String> attributes) throws AtlanException
      Find a Purpose by its human-readable name.
      Parameters:
      name - of the Purpose
      attributes - an optional collection of attributes (unchecked) to retrieve for the Purpose
      Returns:
      all Purposes with that name, if found
      Throws:
      AtlanException - on any API problems
      NotFoundException - if the Purpose does not exist
    • findByName

      public static List<Purpose> findByName(String name, List<AtlanField> attributes) throws AtlanException
      Find a Purpose by its human-readable name.
      Parameters:
      name - of the Purpose
      attributes - an optional collection of attributes (checked) to retrieve for the Purpose
      Returns:
      all Purposes with that name, if found
      Throws:
      AtlanException - on any API problems
      NotFoundException - if the Purpose does not exist
    • findByName

      public static List<Purpose> findByName(AtlanClient client, String name) throws AtlanException
      Find a Purpose by its human-readable name. Only the bare minimum set of attributes and no relationships will be retrieved for the purpose, if found.
      Parameters:
      client - connectivity to the Atlan tenant in which to search for the purpose
      name - of the Purpose
      Returns:
      all Purposes with that name, if found
      Throws:
      AtlanException - on any API problems
      NotFoundException - if the Purpose does not exist
    • findByName

      public static List<Purpose> findByName(AtlanClient client, String name, Collection<String> attributes) throws AtlanException
      Find a Purpose by its human-readable name.
      Parameters:
      client - connectivity to the Atlan tenant in which to search for the purpose
      name - of the Purpose
      attributes - an optional collection of attributes (unchecked) to retrieve for the Purpose
      Returns:
      all Purposes with that name, if found
      Throws:
      AtlanException - on any API problems
      NotFoundException - if the Purpose does not exist
    • findByName

      public static List<Purpose> findByName(AtlanClient client, String name, List<AtlanField> attributes) throws AtlanException
      Find a Purpose by its human-readable name.
      Parameters:
      client - connectivity to the Atlan tenant in which to search for the Purpose
      name - of the Purpose
      attributes - an optional list of attributes (checked) to retrieve for the Purpose
      Returns:
      all Purposes with that name, if found
      Throws:
      AtlanException - on any API problems
      NotFoundException - if the Purpose does not exist
    • createMetadataPolicy

      public static AuthPolicy.AuthPolicyBuilder<?,?> createMetadataPolicy(String name, String purposeId, AuthPolicyType policyType, Collection<PurposeMetadataAction> actions, Collection<String> policyGroups, Collection<String> policyUsers, boolean allUsers) throws AtlanException
      Builds the minimal object necessary to create a metadata policy for a Purpose.
      Parameters:
      name - of the policy
      purposeId - unique identifier (GUID) of the purpose for which to create this metadata policy
      policyType - type of policy (for example allow vs deny)
      actions - to include in the policy
      policyGroups - groups to whom this policy applies, given as internal group names (at least one of these or policyUsers must be specified)
      policyUsers - users to whom this policy applies, given as usernames (at least one of these or policyGroups must be specified)
      allUsers - whether to apply this policy to all users (true) or not (false). If true this will override the other users and groups parameters.
      Returns:
      the minimal request necessary to create the metadata policy for the Purpose, as a builder
      Throws:
      AtlanException - on any other error related to the request, such as an inability to find the specified users or groups
    • createMetadataPolicy

      public static AuthPolicy.AuthPolicyBuilder<?,?> createMetadataPolicy(AtlanClient client, String name, String purposeId, AuthPolicyType policyType, Collection<PurposeMetadataAction> actions, Collection<String> policyGroups, Collection<String> policyUsers, boolean allUsers) throws AtlanException
      Builds the minimal object necessary to create a metadata policy for a Purpose.
      Parameters:
      client - connectivity to the Atlan tenant on which the policy is intended to be created
      name - of the policy
      purposeId - unique identifier (GUID) of the purpose for which to create this metadata policy
      policyType - type of policy (for example allow vs deny)
      actions - to include in the policy
      policyGroups - groups to whom this policy applies, given as internal group names (at least one of these or policyUsers must be specified)
      policyUsers - users to whom this policy applies, given as usernames (at least one of these or policyGroups must be specified)
      allUsers - whether to apply this policy to all users (true) or not (false). If true this will override the other users and groups parameters.
      Returns:
      the minimal request necessary to create the metadata policy for the Purpose, as a builder
      Throws:
      AtlanException - on any other error related to the request, such as an inability to find the specified users or groups
    • createDataPolicy

      public static AuthPolicy.AuthPolicyBuilder<?,?> createDataPolicy(String name, String purposeId, AuthPolicyType policyType, Collection<String> policyGroups, Collection<String> policyUsers, boolean allUsers) throws AtlanException
      Builds the minimal object necessary to create a data policy for a Purpose.
      Parameters:
      name - of the policy
      purposeId - unique identifier (GUID) of the purpose for which to create this data policy
      policyType - type of policy (for example allow vs deny)
      policyGroups - groups to whom this policy applies, given as internal group names (at least one of these or policyUsers must be specified)
      policyUsers - users to whom this policy applies, given as usernames (at least one of these or policyGroups must be specified)
      allUsers - whether to apply this policy to all users (true) or not (false). If true this will override the other users and groups parameters.
      Returns:
      the minimal request necessary to create the data policy for the Purpose, as a builder
      Throws:
      AtlanException - on any other error related to the request, such as an inability to find the specified users or groups
    • createDataPolicy

      public static AuthPolicy.AuthPolicyBuilder<?,?> createDataPolicy(AtlanClient client, String name, String purposeId, AuthPolicyType policyType, Collection<String> policyGroups, Collection<String> policyUsers, boolean allUsers) throws AtlanException
      Builds the minimal object necessary to create a data policy for a Purpose.
      Parameters:
      client - connectivity to the Atlan tenant on which the policy is intended to be created
      name - of the policy
      purposeId - unique identifier (GUID) of the purpose for which to create this data policy
      policyType - type of policy (for example allow vs deny)
      policyGroups - groups to whom this policy applies, given as internal group names (at least one of these or policyUsers must be specified)
      policyUsers - users to whom this policy applies, given as usernames (at least one of these or policyGroups must be specified)
      allUsers - whether to apply this policy to all users (true) or not (false). If true this will override the other users and groups parameters.
      Returns:
      the minimal request necessary to create the data policy for the Purpose, as a builder
      Throws:
      AtlanException - on any other error related to the request, such as an inability to find the specified users or groups
    • removeDescription

      public static Purpose removeDescription(String qualifiedName, String name, boolean isEnabled) throws AtlanException
      Remove the system description from a Purpose.
      Parameters:
      qualifiedName - of the Purpose
      name - of the Purpose
      isEnabled - whether the Purpose should be activated (true) or deactivated (false)
      Returns:
      the updated Purpose, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • removeDescription

      public static Purpose removeDescription(AtlanClient client, String qualifiedName, String name, boolean isEnabled) throws AtlanException
      Remove the system description from a Purpose.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove this Purpose's description
      qualifiedName - of the Purpose
      name - of the Purpose
      isEnabled - whether the Purpose should be activated (true) or deactivated (false)
      Returns:
      the updated Purpose, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • removeUserDescription

      public static Purpose removeUserDescription(String qualifiedName, String name, boolean isEnabled) throws AtlanException
      Remove the user's description from a Purpose.
      Parameters:
      qualifiedName - of the Purpose
      name - of the Purpose
      isEnabled - whether the Purpose should be activated (true) or deactivated (false)
      Returns:
      the updated Purpose, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • removeUserDescription

      public static Purpose removeUserDescription(AtlanClient client, String qualifiedName, String name, boolean isEnabled) throws AtlanException
      Remove the user's description from a Purpose.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove this Purpose's description
      qualifiedName - of the Purpose
      name - of the Purpose
      isEnabled - whether the Purpose should be activated (true) or deactivated (false)
      Returns:
      the updated Purpose, or null if the removal failed
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      public static Purpose appendAtlanTags(String qualifiedName, List<String> atlanTagNames) throws AtlanException
      Add Atlan tags to a Purpose, without replacing existing Atlan tags linked to the Purpose. Note: this operation must make two API calls — one to retrieve the Purpose's existing Atlan tags, and a second to append the new Atlan tags.
      Parameters:
      qualifiedName - of the Purpose
      atlanTagNames - human-readable names of the Atlan tags to add
      Returns:
      the updated Purpose
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      public static Purpose appendAtlanTags(AtlanClient client, String qualifiedName, List<String> atlanTagNames) throws AtlanException
      Add Atlan tags to a Purpose, without replacing existing Atlan tags linked to the Purpose. Note: this operation must make two API calls — one to retrieve the Purpose's existing Atlan tags, and a second to append the new Atlan tags.
      Parameters:
      client - connectivity to the Atlan tenant on which to append Atlan tags to the Purpose
      qualifiedName - of the Purpose
      atlanTagNames - human-readable names of the Atlan tags to add
      Returns:
      the updated Purpose
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      public static Purpose appendAtlanTags(String qualifiedName, List<String> atlanTagNames, boolean propagate, boolean removePropagationsOnDelete, boolean restrictLineagePropagation) throws AtlanException
      Add Atlan tags to a Purpose, without replacing existing Atlan tags linked to the Purpose. Note: this operation must make two API calls — one to retrieve the Purpose's existing Atlan tags, and a second to append the new Atlan tags.
      Parameters:
      qualifiedName - of the Purpose
      atlanTagNames - human-readable names of the Atlan tags to add
      propagate - whether to propagate the Atlan tag (true) or not (false)
      removePropagationsOnDelete - whether to remove the propagated Atlan tags when the Atlan tag is removed from this asset (true) or not (false)
      restrictLineagePropagation - whether to avoid propagating through lineage (true) or do propagate through lineage (false)
      Returns:
      the updated Purpose
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      public static Purpose appendAtlanTags(AtlanClient client, String qualifiedName, List<String> atlanTagNames, boolean propagate, boolean removePropagationsOnDelete, boolean restrictLineagePropagation) throws AtlanException
      Add Atlan tags to a Purpose, without replacing existing Atlan tags linked to the Purpose. Note: this operation must make two API calls — one to retrieve the Purpose's existing Atlan tags, and a second to append the new Atlan tags.
      Parameters:
      client - connectivity to the Atlan tenant on which to append Atlan tags to the Purpose
      qualifiedName - of the Purpose
      atlanTagNames - human-readable names of the Atlan tags to add
      propagate - whether to propagate the Atlan tag (true) or not (false)
      removePropagationsOnDelete - whether to remove the propagated Atlan tags when the Atlan tag is removed from this asset (true) or not (false)
      restrictLineagePropagation - whether to avoid propagating through lineage (true) or do propagate through lineage (false)
      Returns:
      the updated Purpose
      Throws:
      AtlanException - on any API problems
    • removeAtlanTag

      public static void removeAtlanTag(String qualifiedName, String atlanTagName) throws AtlanException
      Remove an Atlan tag from a Purpose.
      Parameters:
      qualifiedName - of the Purpose
      atlanTagName - human-readable name of the Atlan tag to remove
      Throws:
      AtlanException - on any API problems, or if the Atlan tag does not exist on the Purpose
    • removeAtlanTag

      public static void removeAtlanTag(AtlanClient client, String qualifiedName, String atlanTagName) throws AtlanException
      Remove an Atlan tag from a Purpose.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove an Atlan tag from a Purpose
      qualifiedName - of the Purpose
      atlanTagName - human-readable name of the Atlan tag to remove
      Throws:
      AtlanException - on any API problems, or if the Atlan tag does not exist on the Purpose
    • _internal

      public static Purpose.PurposeBuilder<?,?> _internal()
    • toBuilder

      public Purpose.PurposeBuilder<?,?> toBuilder()
      Overrides:
      toBuilder in class Reference
    • getChannelLink

      public String getChannelLink()
      TBC
      Specified by:
      getChannelLink in interface IAccessControl
      Specified by:
      getChannelLink in interface IPurpose
    • getDefaultNavigation

      public String getDefaultNavigation()
      TBC
      Specified by:
      getDefaultNavigation in interface IAccessControl
      Specified by:
      getDefaultNavigation in interface IPurpose
    • getDenyAssetFilters

      public SortedSet<AssetFilterGroup> getDenyAssetFilters()
      TBC
      Specified by:
      getDenyAssetFilters in interface IAccessControl
      Specified by:
      getDenyAssetFilters in interface IPurpose
    • getDenyAssetTabs

      public SortedSet<AssetSidebarTab> getDenyAssetTabs()
      TBC
      Specified by:
      getDenyAssetTabs in interface IAccessControl
      Specified by:
      getDenyAssetTabs in interface IPurpose
    • getDenyAssetTypes

      public SortedSet<String> getDenyAssetTypes()
      TBC
      Specified by:
      getDenyAssetTypes in interface IAccessControl
      Specified by:
      getDenyAssetTypes in interface IPurpose
    • getDenyCustomMetadataGuids

      public SortedSet<String> getDenyCustomMetadataGuids()
      TBC
      Specified by:
      getDenyCustomMetadataGuids in interface IAccessControl
      Specified by:
      getDenyCustomMetadataGuids in interface IPurpose
    • getDenyNavigationPages

      public SortedSet<String> getDenyNavigationPages()
      TBC
      Specified by:
      getDenyNavigationPages in interface IAccessControl
      Specified by:
      getDenyNavigationPages in interface IPurpose
    • getDisplayPreferences

      public SortedSet<String> getDisplayPreferences()
      TBC
      Specified by:
      getDisplayPreferences in interface IAccessControl
      Specified by:
      getDisplayPreferences in interface IPurpose
    • getIsAccessControlEnabled

      public Boolean getIsAccessControlEnabled()
      TBC
      Specified by:
      getIsAccessControlEnabled in interface IAccessControl
      Specified by:
      getIsAccessControlEnabled in interface IPurpose
    • getPolicies

      public SortedSet<IAuthPolicy> getPolicies()
      TBC
      Specified by:
      getPolicies in interface IAccessControl
      Specified by:
      getPolicies in interface IPurpose
    • getPurposeAtlanTags

      public SortedSet<String> getPurposeAtlanTags()
      TBC
      Specified by:
      getPurposeAtlanTags in interface IPurpose
    • equals

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

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

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

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

      public String getTypeName()
      Fixed typeName for Purposes.
      Specified by:
      getTypeName in interface AuditDetail
      Specified by:
      getTypeName in interface IAccessControl
      Specified by:
      getTypeName in interface IAsset
      Specified by:
      getTypeName in interface IPurpose
      Specified by:
      getTypeName in interface IReferenceable
      Overrides:
      getTypeName in class Reference