documentation
parent
38cb5c914b
commit
cc4b20078d
|
|
@ -11,10 +11,21 @@ import java.util.TimeZone;
|
|||
import com.bmc.arsys.api.Timestamp;
|
||||
import com.nttdata.calender.errorhandling.ErrorTypes.ValidationError;
|
||||
|
||||
/**
|
||||
* Util class for converting dates into remedy compatible format.
|
||||
*/
|
||||
public class DateConverter {
|
||||
|
||||
final String DATEFORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
|
||||
|
||||
/**
|
||||
* Converts the timestamp as a String into into a LocalDate.
|
||||
* The timestamp pattern has to be: "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
|
||||
*
|
||||
* @param timestamp
|
||||
* @return
|
||||
* @throws ValidationError
|
||||
*/
|
||||
public LocalDate convertDateTime(String timestamp) throws ValidationError {
|
||||
try {
|
||||
LocalDate date = LocalDate.parse(timestamp, DateTimeFormatter.ofPattern(DATEFORMAT));
|
||||
|
|
@ -24,6 +35,14 @@ public class DateConverter {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the timestamp as a String into into a Timestamp type.
|
||||
* The timestamp pattern has to be: "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
|
||||
*
|
||||
* @param timestamp
|
||||
* @return
|
||||
* @throws ValidationError
|
||||
*/
|
||||
public Timestamp convertTimestamp(String timestamp) throws ValidationError {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(DATEFORMAT);
|
||||
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ import com.nttdata.calender.api.Query;
|
|||
import com.nttdata.calender.api.RemedyJavaAPI;
|
||||
import com.nttdata.calender.errorhandling.ErrorTypes.ValidationError;
|
||||
|
||||
/**
|
||||
* This class is a wrapper for the ArrayList of {@link FilterElement}. This
|
||||
* class constructs a query from the filter.
|
||||
*/
|
||||
public class Filter {
|
||||
private ArrayList<FilterElement> filterElement;
|
||||
private Query queryChange;
|
||||
|
|
|
|||
|
|
@ -5,18 +5,13 @@ import java.time.DayOfWeek;
|
|||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.IsoFields;
|
||||
import java.time.temporal.TemporalAdjuster;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.bmc.arsys.api.ARException;
|
||||
import com.bmc.thirdparty.org.springframework.cglib.core.Local;
|
||||
import com.nttdata.calender.DateConverter;
|
||||
import com.nttdata.calender.api.Query;
|
||||
import com.nttdata.calender.api.RemedyJavaAPI;
|
||||
import com.nttdata.calender.changes.ChangeItem;
|
||||
import com.nttdata.calender.errorhandling.ErrorTypes.ValidationError;
|
||||
|
||||
public class PlanTimes {
|
||||
|
|
|
|||
Loading…
Reference in New Issue