Enum CmsAliasMode

java.lang.Object
java.lang.Enum<CmsAliasMode>
org.opencms.gwt.shared.alias.CmsAliasMode
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable, Serializable, Comparable<CmsAliasMode>, java.lang.constant.Constable

public enum CmsAliasMode extends Enum<CmsAliasMode> implements com.google.gwt.user.client.rpc.IsSerializable
The values of this enum describe what should happen when a request to an aliased resource comes in.

  • Enum Constant Details

    • page

      public static final CmsAliasMode page
      The request will be forwarded internally to the given resource.
    • passthrough

      public static final CmsAliasMode passthrough
      Pass the new path along to the next resource handler.
    • permanentRedirect

      public static final CmsAliasMode permanentRedirect
      A 'moved permanently' status with a link to the aliased resource will be sent to the browser.
    • redirect

      public static final CmsAliasMode redirect
      A 'moved temporarily' status with a link to the aliased resource will be sent to the browser.
  • Method Details

    • values

      public static CmsAliasMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static CmsAliasMode valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromInt

      public static CmsAliasMode fromInt(int id)
      Gets the enum constant for a given integer id.

      Parameters:
      id - the integer id
      Returns:
      the enum constant matching that id
    • isRedirect

      public boolean isRedirect()
      Checks whether this is a mode that requires a redirect.

      Returns:
      true if this mode requires a redirect
    • toInt

      public int toInt()
      Converts an enum constant to the id used for storing alias modes in the database.

      Returns:
      the enum constant id