Class Utility
java.lang.Object
org.gcube.accounting.aggregator.utility.Utility
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CalendargetAggregationStartCalendar(int year, int month, int day) static Stringstatic CalendargetEndCalendarFromStartCalendar(AggregationType aggregationType, Calendar aggregationStartCalendar, int offset) static DategetEndDateFromStartDate(AggregationType aggregationType, Date aggregationStartDate, int offset) static StringgetHumanReadableDuration(long duration) static FilegetMalformatedFile(File aggregateRecordsBackupFile) static DategetPersistTimeDate(String persistTimeString) static Stringstatic Calendarstatic DateFormatgetUTCDateFormat(String pattern) static booleanisTimeElapsed(Calendar now, Date date) static voidstatic DatesanitizeDate(AggregationType aggregationType, Date date)
-
Field Details
-
UTC_TIMEZONE
-
-
Constructor Details
-
Utility
public Utility()
-
-
Method Details
-
getCurrentContext
- Throws:
Exception
-
getHumanReadableDuration
-
printLine
- Throws:
Exception
-
getUTCDateFormat
-
getUTCCalendarInstance
-
getPersistTimeDate
- Throws:
ParseException
-
isTimeElapsed
- Throws:
ParseException
-
getAggregationStartCalendar
-
sanitizeDate
-
getEndCalendarFromStartCalendar
public static Calendar getEndCalendarFromStartCalendar(AggregationType aggregationType, Calendar aggregationStartCalendar, int offset) -
getEndDateFromStartDate
public static Date getEndDateFromStartDate(AggregationType aggregationType, Date aggregationStartDate, int offset) -
getUsername
-
getMalformatedFile
-