org.opencms.gwt.shared.alias
Enum CmsAliasMode

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

public enum CmsAliasMode
extends java.lang.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 Summary
page
          The request will be forwarded internally to the given resource.
passthrough
          Pass the new path along to the next resource handler.
permanentRedirect
          A 'moved permanently' status with a link to the aliased resource will be sent to the browser.
redirect
          A 'moved temporarily' status with a link to the aliased resource will be sent to the browser.
 
Method Summary
static CmsAliasMode fromInt(int id)
          Gets the enum constant for a given integer id.
 boolean isRedirect()
          Checks whether this is a mode that requires a redirect.
 int toInt()
          Converts an enum constant to the id used for storing alias modes in the database.
static CmsAliasMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CmsAliasMode[] 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

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 Detail

values

public static CmsAliasMode[] 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 (CmsAliasMode c : CmsAliasMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CmsAliasMode 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

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