Enum AnalyticsPeriodType
- java.lang.Object
-
- java.lang.Enum<AnalyticsPeriodType>
-
- org.exoplatform.analytics.model.filter.AnalyticsPeriodType
-
- All Implemented Interfaces:
Serializable,Comparable<AnalyticsPeriodType>
public enum AnalyticsPeriodType extends Enum<AnalyticsPeriodType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description THIS_MONTHTHIS_QUARTERTHIS_SEMESTERTHIS_WEEKTHIS_YEARTODAY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyticsPeriodgetCurrentPeriod(LocalDate date, ZoneId timeZone)longgetOffset(long timestamp)AnalyticsPeriodgetPreviousPeriod(LocalDate date, ZoneId timeZone)StringgetTypeName()static AnalyticsPeriodTypeperiodTypeByName(String typeName)static AnalyticsPeriodTypevalueOf(String name)Returns the enum constant of this type with the specified name.static AnalyticsPeriodType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TODAY
public static final AnalyticsPeriodType TODAY
-
THIS_WEEK
public static final AnalyticsPeriodType THIS_WEEK
-
THIS_MONTH
public static final AnalyticsPeriodType THIS_MONTH
-
THIS_QUARTER
public static final AnalyticsPeriodType THIS_QUARTER
-
THIS_SEMESTER
public static final AnalyticsPeriodType THIS_SEMESTER
-
THIS_YEAR
public static final AnalyticsPeriodType THIS_YEAR
-
-
Method Detail
-
values
public static AnalyticsPeriodType[] 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 (AnalyticsPeriodType c : AnalyticsPeriodType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AnalyticsPeriodType 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
-
getCurrentPeriod
public AnalyticsPeriod getCurrentPeriod(LocalDate date, ZoneId timeZone)
-
getOffset
public long getOffset(long timestamp)
-
getPreviousPeriod
public AnalyticsPeriod getPreviousPeriod(LocalDate date, ZoneId timeZone)
-
getTypeName
public String getTypeName()
-
periodTypeByName
public static AnalyticsPeriodType periodTypeByName(String typeName)
-
-