Package org.opencms.gwt.shared.alias
Enum 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe request will be forwarded internally to the given resource.Pass the new path along to the next resource handler.A 'moved permanently' status with a link to the aliased resource will be sent to the browser.A 'moved temporarily' status with a link to the aliased resource will be sent to the browser. -
Method Summary
Modifier and TypeMethodDescriptionstatic CmsAliasMode
fromInt
(int id) Gets the enum constant for a given integer id.boolean
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
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.
-
Enum Constant Details
-
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 Details
-
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
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 nameNullPointerException
- if the argument is null
-
fromInt
Gets the enum constant for a given integer id.- Parameters:
id
- the integer id- Returns:
- the enum constant matching that id
-
isRedirect
Checks whether this is a mode that requires a redirect.- Returns:
- true if this mode requires a redirect
-
toInt
Converts an enum constant to the id used for storing alias modes in the database.- Returns:
- the enum constant id
-