Class RequestableKeyValidator

java.lang.Object
com.atlassian.plugin.webresource.graph.RequestableKeyValidator

public class RequestableKeyValidator extends Object
Determines whether a loosely-typed input conforms to the rules of a specific Requestable sub-type.
Since:
5.1.0
  • Constructor Details

    • RequestableKeyValidator

      public RequestableKeyValidator(@Nonnull Set<String> rootPageKeys)
  • Method Details

    • isWebResourceContext

      public static boolean isWebResourceContext(@Nonnull String requestableDependencyKey)
      Verifies whether a resource key represents a resource context or not.
      Parameters:
      requestableDependencyKey - The requestable resource key.
      Returns:

      true: The web resource key is a web resource context.

      false: The web resource key is not a web resource context.

    • isWebResource

      public boolean isWebResource(@Nonnull String requestableDependencyKey)
      Verifies whether a resource key represents a web resource or not.
      Parameters:
      requestableDependencyKey - The requestable resource key.
      Returns:

      true: The web resource key is a web resource context.

      false: The web resource key is not a web resource context.