Enum Class RequestType

java.lang.Object
java.lang.Enum<RequestType>
io.goobi.viewer.model.statistics.usage.RequestType
All Implemented Interfaces:
Serializable, Comparable<RequestType>, Constable

public enum RequestType extends Enum<RequestType>
Author:
florian A list of types of requets to count independently for usage statistics. When recording a request in UsageStatisticsRecorder you need to pass an appropriate type. Statistics for each type are recorded independently
  • Enum Constant Details

    • RECORD_VIEW

      public static final RequestType RECORD_VIEW
      Call of a viewer html page belonging to a record
    • FILE_DOWNLOAD

      public static final RequestType FILE_DOWNLOAD
      Download of a file (pdf, epub) belonging to a record
    • MEDIA_RESOURCE

      public static final RequestType MEDIA_RESOURCE
      REST-call to an image or other media resource of a record
  • Method Details

    • values

      public static RequestType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RequestType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getLabel

      public String getLabel()
      Get a message key serving as label to this type
      Returns:
      a message key
    • getTotalCountIndex

      public int getTotalCountIndex()
      Index of the total request count within the array of values of the SOLR-field recording requests for a record
      Returns:
      the totalCountIndex
    • getUniqueCountIndex

      public int getUniqueCountIndex()
      Index of the count of requests by a unique http session within the array of values of the SOLR-field recording requests for a record
      Returns:
      the uniqueCountIndex
    • getSessionCountIndex

      public int getSessionCountIndex()
      Index of the count for this type in RequestType within SessionUsageStatistics
      Returns:
      the ordinal of the instance
    • getTypeForSessionCountIndex

      public static RequestType getTypeForSessionCountIndex(int index)
      Get the RequestType for the given index of the count array in RequestType within SessionUsageStatistics
      Parameters:
      index -
      Returns:
      the type
    • getTypeForTotalCountIndex

      public static RequestType getTypeForTotalCountIndex(int index)
      Get the RequestType for the given index of the count array for total count in the SOLR field for the counts of a record identifier
      Parameters:
      index -
      Returns:
      the type
    • getTypeForUniqueCountIndex

      public static RequestType getTypeForUniqueCountIndex(int index)
      Get the RequestType for the given index of the count array for unique count in the SOLR field for the counts of a record identifier
      Parameters:
      index -
      Returns:
      the type
    • getUsedValues

      public static RequestType[] getUsedValues()
      Get the values for which request are recorded
      Returns:
      An array