Class ResourcePattern


  • @Evolving
    public class ResourcePattern
    extends java.lang.Object
    Represents a pattern that is used by ACLs to match zero or more Resources. The API for this class is still evolving and we may break compatibility in minor releases, if necessary.
    • Field Detail

      • WILDCARD_RESOURCE

        public static final java.lang.String WILDCARD_RESOURCE
        A special literal resource name that corresponds to 'all resources of a certain type'.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResourcePattern

        public ResourcePattern​(ResourceType resourceType,
                               java.lang.String name,
                               PatternType patternType)
        Create a pattern using the supplied parameters.
        Parameters:
        resourceType - non-null, specific, resource type
        name - non-null resource name, which can be the WILDCARD_RESOURCE.
        patternType - non-null, specific, resource pattern type, which controls how the pattern will match resource names.
    • Method Detail

      • resourceType

        public ResourceType resourceType()
        Returns:
        the specific resource type this pattern matches
      • name

        public java.lang.String name()
        Returns:
        the resource name.
      • patternType

        public PatternType patternType()
        Returns:
        the resource pattern type.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isUnknown

        public boolean isUnknown()
        Returns:
        true if this Resource has any UNKNOWN components.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object