Enum SiteContextType
- java.lang.Object
-
- java.lang.Enum<SiteContextType>
-
- org.ametys.web.frontoffice.search.instance.model.SiteContextType
-
- All Implemented Interfaces:
Serializable
,Comparable<SiteContextType>
public enum SiteContextType extends Enum<SiteContextType>
A site context type
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL
The site of the context can be any site.AMONG
The site of the context can be one among the ones returned bySiteContext.getSites()
.CURRENT
The site of the context is the current one.OTHERS
The site of the context can be any site but the current one.
-
Field Summary
Fields Modifier and Type Field Description private String
_clientSideName
-
Constructor Summary
Constructors Modifier Constructor Description private
SiteContextType(String clientSideName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
clientSideName()
Gets the client side name of the type of site contextstatic SiteContextType
fromClientSideName(String clientSideName)
Gets aSiteContextType
from its client-side namestatic SiteContextType
valueOf(String name)
Returns the enum constant of this type with the specified name.static SiteContextType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CURRENT
public static final SiteContextType CURRENT
The site of the context is the current one.
-
AMONG
public static final SiteContextType AMONG
The site of the context can be one among the ones returned bySiteContext.getSites()
.
-
ALL
public static final SiteContextType ALL
The site of the context can be any site.
-
OTHERS
public static final SiteContextType OTHERS
The site of the context can be any site but the current one.
-
-
Field Detail
-
_clientSideName
private String _clientSideName
-
-
Constructor Detail
-
SiteContextType
private SiteContextType(String clientSideName)
-
-
Method Detail
-
values
public static SiteContextType[] 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 (SiteContextType c : SiteContextType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SiteContextType 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 nameNullPointerException
- if the argument is null
-
clientSideName
public String clientSideName()
Gets the client side name of the type of site context- Returns:
- the client side name of the type of site context
-
fromClientSideName
public static SiteContextType fromClientSideName(String clientSideName)
Gets aSiteContextType
from its client-side name- Parameters:
clientSideName
- the client-side name- Returns:
- the
SiteContextType
-
-