Class PathFormat

java.lang.Object
overit.geocall.util.MapFormat
overit.geocall.util.services.PathFormat
All Implemented Interfaces:
Serializable

public class PathFormat extends MapFormat
The class is used to obtain a string starting from a format and a series of parameters like Date, type etc. from which extract the values that will fill the string specifically for a path.
See Also:
  • Field Details

  • Constructor Details

    • PathFormat

      public PathFormat(String format)
      Creates a new PathFormat starting from the string passed as parameter
      Parameters:
      format - The string that defines the format
    • PathFormat

      public PathFormat(String format, Teacher teacher)
      Creates a new PathFormat starting from the string passed as parameter and sets the Teacher for the translations
      Parameters:
      format - The string that defines the format
      teacher - The Teacher that will manage the translations
  • Method Details

    • getBasePath

      public String getBasePath()
      Returns:
      A string containing the log's directory without all the parametric substructure.
    • format

      public String format(String type, String node, String instance, String task, Boolean client, Date date)
      Formats all the passed parameters to produce a path string
      Parameters:
      type - The type
      node - The Node
      instance - The instance
      task - The task
      client - The client
      date - The date
      Returns:
      A formatted string
    • main

      public static void main(String[] args)