Enum BareDirectoryRequestAction

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<BareDirectoryRequestAction>

    public enum BareDirectoryRequestAction
    extends java.lang.Enum<BareDirectoryRequestAction>
    An action to take for a request to a directory where the path does not have a trailing slash.

    For example, a request to /directory could be seen to be invalid, or it could redirect to /directory/

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      REDIRECT_WITH_TRAILING_SLASH
      The request to /{dirname} should have an HTTP redirect to /{dirname}/
      TREAT_AS_NOT_FOUND
      Treat a request to a directory without a trailing space as a request to a not found resource
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BareDirectoryRequestAction valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static BareDirectoryRequestAction[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • REDIRECT_WITH_TRAILING_SLASH

        public static final BareDirectoryRequestAction REDIRECT_WITH_TRAILING_SLASH
        The request to /{dirname} should have an HTTP redirect to /{dirname}/
      • TREAT_AS_NOT_FOUND

        public static final BareDirectoryRequestAction TREAT_AS_NOT_FOUND
        Treat a request to a directory without a trailing space as a request to a not found resource
    • Method Detail

      • values

        public static BareDirectoryRequestAction[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BareDirectoryRequestAction c : BareDirectoryRequestAction.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BareDirectoryRequestAction valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null