Package overit.geocall.util.services
Class PathFormat
java.lang.Object
overit.geocall.util.MapFormat
overit.geocall.util.services.PathFormat
- All Implemented Interfaces:
Serializable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.util.MapFormat
MapFormat.Token -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SimpleDateFormatprotected SimpleDateFormatprotected SimpleDateFormatprotected SimpleDateFormatprotected SimpleDateFormatprotected SimpleDateFormatFields inherited from class overit.geocall.util.MapFormat
_format, _teacherDuty, _tokens -
Constructor Summary
ConstructorsConstructorDescriptionPathFormat(String format) Creates a new PathFormat starting from the string passed as parameterPathFormat(String format, Teacher teacher) Creates a new PathFormat starting from the string passed as parameter and sets theTeacherfor the translations -
Method Summary
Methods inherited from class overit.geocall.util.MapFormat
calcTokens, format, format, setFieldPos, setFieldPos
-
Field Details
-
sdfYear
-
sdfMonth
-
sdfDay
-
sdfHour
-
sdfMin
-
sdfSec
-
-
Constructor Details
-
PathFormat
Creates a new PathFormat starting from the string passed as parameter- Parameters:
format- The string that defines the format
-
PathFormat
Creates a new PathFormat starting from the string passed as parameter and sets theTeacherfor the translations- Parameters:
format- The string that defines the formatteacher- TheTeacherthat will manage the translations
-
-
Method Details
-
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 typenode- The Nodeinstance- The instancetask- The taskclient- The clientdate- The date- Returns:
- A formatted string
-
main
-