Class Resources

java.lang.Object
org.apache.cassandra.auth.Resources

public final class Resources extends Object
  • Constructor Details

    • Resources

      public Resources()
  • Method Details

    • chain

      public static List<? extends IResource> chain(IResource resource)
      Construct a chain of resource parents starting with the resource and ending with the root.
      Parameters:
      resource - The starting point.
      Returns:
      list of resource in the chain form start to the root.
    • chain

      public static List<? extends IResource> chain(IResource resource, Predicate<IResource> filter)
      Construct a chain of resource parents starting with the resource and ending with the root. Only resources which satisfy the supplied predicate will be included.
      Parameters:
      resource - The starting point.
      filter - can be used to omit specific resources from the chain
      Returns:
      list of resource in the chain form start to the root.
    • fromName

      public static IResource fromName(String name)
      Creates an IResource instance from its external name. Resource implementation class is inferred by matching against the known IResource impls' root level resources.
      Parameters:
      name - external name to create IResource from
      Returns:
      an IResource instance created from the name