Package org.silverpeas.core.web.calendar
Enum CalendarViewType
- java.lang.Object
-
- java.lang.Enum<CalendarViewType>
-
- org.silverpeas.core.web.calendar.CalendarViewType
-
- All Implemented Interfaces:
Serializable
,Comparable<CalendarViewType>
public enum CalendarViewType extends Enum<CalendarViewType>
It defines the type of view mode of a calendar.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DAILY
The calendar view is daily.MONTHLY
The calendar view is monthly.NEXT_EVENTS
The calendar view is on the next events.WEEKLY
The calendar view is weekly.YEARLY
The calendar view is yearly.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CalendarViewType
from(String name)
String
getName()
Gets the name of this enum.PeriodType
getPeriodeType()
boolean
isDailyView()
Is this view type is a daily one.boolean
isMonthlyView()
Is this view type is a monthly one.boolean
isNextEventsView()
Is this view type is a on the next events.boolean
isWeeklyView()
Is this view type is a weekly one.boolean
isYearlyView()
Is this view type is a yearly one.String
toString()
Converts this view type in a string representation.static CalendarViewType
valueOf(String name)
Returns the enum constant of this type with the specified name.static CalendarViewType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
YEARLY
public static final CalendarViewType YEARLY
The calendar view is yearly.
-
MONTHLY
public static final CalendarViewType MONTHLY
The calendar view is monthly.
-
WEEKLY
public static final CalendarViewType WEEKLY
The calendar view is weekly.
-
DAILY
public static final CalendarViewType DAILY
The calendar view is daily.
-
NEXT_EVENTS
public static final CalendarViewType NEXT_EVENTS
The calendar view is on the next events.
-
-
Method Detail
-
values
public static CalendarViewType[] 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 (CalendarViewType c : CalendarViewType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CalendarViewType 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
-
from
public static CalendarViewType from(String name)
-
toString
public String toString()
Converts this view type in a string representation. The value of the string depends on the calendar view rendering engine. It should be a value that matches the view mode supported by the underlying calendar renderer.- Overrides:
toString
in classEnum<CalendarViewType>
- Returns:
-
isYearlyView
public boolean isYearlyView()
Is this view type is a yearly one.- Returns:
- true if this view type is for a yearly one, false otherwise.
-
isMonthlyView
public boolean isMonthlyView()
Is this view type is a monthly one.- Returns:
- true if this view type is for a monthly one, false otherwise.
-
isWeeklyView
public boolean isWeeklyView()
Is this view type is a weekly one.- Returns:
- true if this view type is for a weekly one, false otherwise.
-
isDailyView
public boolean isDailyView()
Is this view type is a daily one.- Returns:
- true if this view type is for a daily one, false otherwise.
-
isNextEventsView
public boolean isNextEventsView()
Is this view type is a on the next events.- Returns:
- true if this view type is on the next events one, false otherwise.
-
getName
public String getName()
Gets the name of this enum.- Returns:
- the enum name.
- See Also:
Enum.name()
-
getPeriodeType
public PeriodType getPeriodeType()
-
-