Class Persona

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

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

  • Constructor Details

  • Method Details

    • trimToReference

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

      public static FluentSearch.FluentSearchBuilder<?,?> select()
      Start a fluent search that will return all Persona 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) Persona assets will be included.
      Returns:
      a fluent search that includes all Persona assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(AtlanClient client)
      Start a fluent search that will return all Persona 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) Persona assets will be included.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the assets
      Returns:
      a fluent search that includes all Persona assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(boolean includeArchived)
      Start a fluent search that will return all Persona 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) Personas will be included
      Returns:
      a fluent search that includes all Persona assets
    • select

      public static FluentSearch.FluentSearchBuilder<?,?> select(AtlanClient client, boolean includeArchived)
      Start a fluent search that will return all Persona 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) Personas will be included
      Returns:
      a fluent search that includes all Persona assets
    • refByGuid

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

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

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

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

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

      public static Persona get(AtlanClient client, String id) throws AtlanException
      Retrieves a Persona 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 Persona to retrieve, either its GUID or its full qualifiedName
      Returns:
      the requested full Persona, complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Persona does not exist or the provided GUID is not a Persona
    • get

      public static Persona get(AtlanClient client, String id, boolean includeRelationships) throws AtlanException
      Retrieves a Persona 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 Persona 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 Persona, optionally complete with all of its relationships
      Throws:
      AtlanException - on any error during the API invocation, such as the NotFoundException if the Persona does not exist or the provided GUID is not a Persona
    • restore

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

      public static Persona.PersonaBuilder<?,?> creator(String name)
      Builds the minimal object necessary to create a Persona.
      Parameters:
      name - of the Persona
      Returns:
      the minimal request necessary to create the Persona, as a builder
    • updater

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

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

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

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

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

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

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

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

      public static AuthPolicy.AuthPolicyBuilder<?,?> createMetadataPolicy(String name, String personaId, AuthPolicyType policyType, Collection<PersonaMetadataAction> actions, String connectionQualifiedName, Collection<String> resources)
      Builds the minimal object necessary to create a metadata policy for a Persona.
      Parameters:
      name - of the policy
      personaId - unique identifier (GUID) of the persona for which to create this metadata policy
      policyType - type of policy (for example allow vs deny)
      actions - to include in the policy
      connectionQualifiedName - unique name of the connection whose assets this policy will control
      resources - against which to apply the policy, given in the form entity:qualifiedNamePrefix
      Returns:
      the minimal request necessary to create the metadata policy for the Persona, as a builder
    • createDataPolicy

      public static AuthPolicy.AuthPolicyBuilder<?,?> createDataPolicy(String name, String personaId, AuthPolicyType policyType, String connectionQualifiedName, Collection<String> resources)
      Builds the minimal object necessary to create a data policy for a Persona.
      Parameters:
      name - of the policy
      personaId - unique identifier (GUID) of the persona for which to create this data policy
      policyType - type of policy (for example allow vs deny)
      connectionQualifiedName - unique name of the connection whose assets this policy will control
      resources - against which to apply the policy, given in the form entity:qualifiedNamePrefix
      Returns:
      the minimal request necessary to create the data policy for the Persona, as a builder
    • createGlossaryPolicy

      public static AuthPolicy.AuthPolicyBuilder<?,?> createGlossaryPolicy(String name, String personaId, AuthPolicyType policyType, Collection<PersonaGlossaryAction> actions, Collection<String> resources)
      Builds the minimal object necessary to create a glossary policy for a Persona.
      Parameters:
      name - of the policy
      personaId - unique identifier (GUID) of the persona for which to create this glossary policy
      policyType - type of policy (for example allow vs deny)
      actions - to include in the policy
      resources - against which to apply the policy, given in the form entity:qualifiedName of the glossary
      Returns:
      the minimal request necessary to create the glossary policy for the Persona, as a builder
    • createDomainPolicy

      public static AuthPolicy.AuthPolicyBuilder<?,?> createDomainPolicy(String name, String personaId, Collection<PersonaDomainAction> actions, Collection<String> resources)
      Builds the minimal object necessary to create a domain policy for a Persona.
      Parameters:
      name - of the policy
      personaId - unique identifier (GUID) of the persona for which to create this metadata policy
      actions - to include in the policy
      resources - against which to apply the policy, given in the form entity:qualifiedName where the qualifiedName is for a domain or subdomain
      Returns:
      the minimal request necessary to create the metadata policy for the Persona, as a builder
    • removeDescription

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

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

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

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

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

      public static Persona appendAtlanTags(AtlanClient client, String qualifiedName, List<String> atlanTagNames) throws AtlanException
      Add Atlan tags to a Persona, without replacing existing Atlan tags linked to the Persona. Note: this operation must make two API calls — one to retrieve the Persona'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 Persona
      qualifiedName - of the Persona
      atlanTagNames - human-readable names of the Atlan tags to add
      Returns:
      the updated Persona
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      public static Persona appendAtlanTags(String qualifiedName, List<String> atlanTagNames, boolean propagate, boolean removePropagationsOnDelete, boolean restrictLineagePropagation) throws AtlanException
      Add Atlan tags to a Persona, without replacing existing Atlan tags linked to the Persona. Note: this operation must make two API calls — one to retrieve the Persona's existing Atlan tags, and a second to append the new Atlan tags.
      Parameters:
      qualifiedName - of the Persona
      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 Persona
      Throws:
      AtlanException - on any API problems
    • appendAtlanTags

      public static Persona appendAtlanTags(AtlanClient client, String qualifiedName, List<String> atlanTagNames, boolean propagate, boolean removePropagationsOnDelete, boolean restrictLineagePropagation) throws AtlanException
      Add Atlan tags to a Persona, without replacing existing Atlan tags linked to the Persona. Note: this operation must make two API calls — one to retrieve the Persona'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 Persona
      qualifiedName - of the Persona
      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 Persona
      Throws:
      AtlanException - on any API problems
    • removeAtlanTag

      public static void removeAtlanTag(String qualifiedName, String atlanTagName) throws AtlanException
      Remove an Atlan tag from a Persona.
      Parameters:
      qualifiedName - of the Persona
      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 Persona
    • removeAtlanTag

      public static void removeAtlanTag(AtlanClient client, String qualifiedName, String atlanTagName) throws AtlanException
      Remove an Atlan tag from a Persona.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove an Atlan tag from a Persona
      qualifiedName - of the Persona
      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 Persona
    • _internal

      public static Persona.PersonaBuilder<?,?> _internal()
    • toBuilder

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

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

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

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

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

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

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

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

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

      public Boolean getIsAccessControlEnabled()
      TBC
      Specified by:
      getIsAccessControlEnabled in interface IAccessControl
      Specified by:
      getIsAccessControlEnabled in interface IPersona
    • getPersonaGroups

      public SortedSet<String> getPersonaGroups()
      TBC
      Specified by:
      getPersonaGroups in interface IPersona
    • getPersonaUsers

      public SortedSet<String> getPersonaUsers()
      TBC
      Specified by:
      getPersonaUsers in interface IPersona
    • getPolicies

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

      public String getRoleId()
      TBC
      Specified by:
      getRoleId in interface IPersona
    • 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 Personas.
      Specified by:
      getTypeName in interface AuditDetail
      Specified by:
      getTypeName in interface IAccessControl
      Specified by:
      getTypeName in interface IAsset
      Specified by:
      getTypeName in interface IPersona
      Specified by:
      getTypeName in interface IReferenceable
      Overrides:
      getTypeName in class Reference