| | |
| | | */ |
| | | public class TaskEntry { |
| | | |
| | | private static Map<String, LocalizableMessage> mapClassToTypeName = |
| | | new HashMap<String, LocalizableMessage>(); |
| | | |
| | | private static Map<String, LocalizableMessage> mapAttrToDisplayName = |
| | | new HashMap<String, LocalizableMessage>(); |
| | | private static Map<String, LocalizableMessage> mapClassToTypeName = new HashMap<>(); |
| | | private static Map<String, LocalizableMessage> mapAttrToDisplayName = new HashMap<>(); |
| | | |
| | | private int hashCode; |
| | | |
| | |
| | | * These attributes associated with the ds-task object |
| | | * class are all handled explicitly below in the constructor. |
| | | */ |
| | | private static Set<String> supAttrNames = new HashSet<String>(); |
| | | private static Set<String> supAttrNames = new HashSet<>(); |
| | | static { |
| | | supAttrNames.add("ds-task-id"); |
| | | supAttrNames.add("ds-task-class-name"); |
| | |
| | | */ |
| | | private Task task; |
| | | |
| | | private Map<LocalizableMessage, List<String>> taskSpecificAttrValues = |
| | | new HashMap<LocalizableMessage, List<String>>(); |
| | | private Map<LocalizableMessage, List<String>> taskSpecificAttrValues = new HashMap<>(); |
| | | |
| | | /** |
| | | * Creates a parameterized instance. |
| | |
| | | for (ByteString av : attr) { |
| | | List<String> valueList = taskSpecificAttrValues.get(attrTypeName); |
| | | if (valueList == null) { |
| | | valueList = new ArrayList<String>(); |
| | | valueList = new ArrayList<>(); |
| | | taskSpecificAttrValues.put(attrTypeName, valueList); |
| | | } |
| | | valueList.add(av.toString()); |
| | |
| | | * @return array of log messages |
| | | */ |
| | | public List<LocalizableMessage> getLogMessages() { |
| | | List<LocalizableMessage> formattedLogs = new ArrayList<LocalizableMessage>(); |
| | | List<LocalizableMessage> formattedLogs = new ArrayList<>(); |
| | | for (String aLog : logs) { |
| | | formattedLogs.add(LocalizableMessage.raw(aLog)); |
| | | } |
| | |
| | | } |
| | | |
| | | private List<String> getMultiStringValue(Entry entry, String attrName) { |
| | | List<String> valuesList = new ArrayList<String>(); |
| | | List<String> valuesList = new ArrayList<>(); |
| | | List<Attribute> attrList = entry.getAttribute(attrName); |
| | | if (attrList != null) { |
| | | for (Attribute attr : attrList) { |