Interface Policy

All Superinterfaces:
Auditable
All Known Implementing Classes:
PolicyDTO

@Evolving public interface Policy extends Auditable
The interface of the policy. The policy is a set of rules that can be associated with a metadata object. The policy can be used for data governance and so on.
  • Field Details

    • BUILT_IN_TYPE_PREFIX

      static final String BUILT_IN_TYPE_PREFIX
      The prefix for built-in policy types. All built-in policy types should start with this prefix.
      See Also:
  • Method Details

    • name

      String name()
      Get the name of the policy.
      Returns:
      The name of the policy.
    • policyType

      String policyType()
      Get the type of the policy.
      Returns:
      The type of the policy.
    • comment

      String comment()
      Get the comment of the policy.
      Returns:
      The comment of the policy.
    • enabled

      boolean enabled()
      Whether the policy is enabled or not.
      Returns:
      True if the policy is enabled, false otherwise.
    • content

      PolicyContent content()
      Get the content of the policy.
      Returns:
      The content of the policy.
    • inherited

      Optional<Boolean> inherited()
      Check if the policy is inherited from a parent object or not.

      Note: The return value is optional, Only when the policy is associated with a metadata object, and called from the metadata object, the return value will be present. Otherwise, it will be empty.

      Returns:
      True if the policy is inherited, false if it is owned by the object itself. Empty if the policy is not associated with any object.
    • associatedObjects

      default Policy.AssociatedObjects associatedObjects()
      Returns:
      The associated objects of the policy.