blob: dbbf6a1a22524d2db3302e9095eda21030fad19f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
package org.onap.sdc.dcae.rule.editor.translators;
import org.onap.sdc.dcae.composition.restmodels.ruleeditor.DateFormatterAction;
public class DateFormatterTranslator extends ActionTranslator<DateFormatterAction> {
private static DateFormatterTranslator dateFormatterTranslator = new DateFormatterTranslator();
public static DateFormatterTranslator getInstance() {
return dateFormatterTranslator;
}
private DateFormatterTranslator(){}
private class DateFormatterTranslation extends ProcessorTranslation {
private String fromFormat;
private String fromTz;
private String toField;
private String toFormat;
private String toTz;
private String value;
private DateFormatterTranslation(DateFormatterAction action){
clazz = "DateFormatter";
fromFormat = action.fromFormat();
fromTz = action.fromTz();
toField = action.getTarget();
toFormat = action.toFormat();
toTz = action.toTz();
value = action.fromValue();
}
}
public Object translateToHpJson(DateFormatterAction action){
return new DateFormatterTranslation(action);
}
}
|