Enum Class LogFile

java.lang.Object
java.lang.Enum<LogFile>
io.goobi.viewer.model.log.LogFile
All Implemented Interfaces:
Serializable, Comparable<LogFile>, Constable

public enum LogFile extends Enum<LogFile>
Enum of allowed log files. The actual path is read from config_viewer.xml. Clients only ever send the symbolic name — never a file path. This prevents path traversal attacks structurally.
  • Enum Constant Details

    • VIEWER

      public static final LogFile VIEWER
    • OAI

      public static final LogFile OAI
    • ICS

      public static final LogFile ICS
    • INDEXER

      public static final LogFile INDEXER
  • Method Details

    • values

      public static LogFile[] 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 LogFile 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
    • getName

      public String getName()
    • getPath

      public Optional<Path> getPath()
      Returns the configured absolute path for this log file. Returns empty if no path is configured in config_viewer.xml.
    • fromName

      public static Optional<LogFile> fromName(String name)
      Maps a client-supplied name to the corresponding enum constant. Returns empty for any unknown or null name — never throws.