Class ResourcePattern


  • @Evolving
    public class ResourcePattern
    extends 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 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,
                               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 String name()
        Returns:
        the resource name.
      • patternType

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

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

        public int hashCode()
        Overrides:
        hashCode in class Object