Enum ContentItemVisibility
- java.lang.Object
-
- java.lang.Enum<ContentItemVisibility>
-
- org.cyclos.model.contentmanagement.contentitems.ContentItemVisibility
-
- All Implemented Interfaces:
Serializable,Comparable<ContentItemVisibility>,HasMessageKey
public enum ContentItemVisibility extends Enum<ContentItemVisibility> implements HasMessageKey
Controls how a content item is displayed
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageKeygetMessageKey()booleanisVisible(boolean loggedIn)static ContentItemVisibilityvalueOf(String name)Returns the enum constant of this type with the specified name.static ContentItemVisibility[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HIDDEN
public static final ContentItemVisibility HIDDEN
The item is hidden
-
GUESTS
public static final ContentItemVisibility GUESTS
The item is displayed only for guests
-
USERS
public static final ContentItemVisibility USERS
The item is displayed only for logged users
-
ALL
public static final ContentItemVisibility ALL
The item is displayed for both guests and logged users
-
-
Method Detail
-
values
public static ContentItemVisibility[] 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 (ContentItemVisibility c : ContentItemVisibility.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ContentItemVisibility 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
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
isVisible
public boolean isVisible(boolean loggedIn)
-
-