public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof ITouchpointData)) return false; final ITouchpointData other = (ITouchpointData) obj; if (instructions == null) { if (other.getInstructions() != null) return false; } else if (!instructions.equals(other.getInstructions())) return false; return true; }
public static boolean isZipped(Collection<ITouchpointData> data) { if (data == null || data.size() == 0) return false; for (ITouchpointData td : data) { if (td.getInstruction("zipped") != null) //$NON-NLS-1$ return true; } return false; }
return initial; Map<String, ITouchpointInstruction> resultInstructions = new HashMap<String, ITouchpointInstruction>(initial.getInstructions()); for (String key : incomingInstructions.keySet()) { ITouchpointInstruction instruction = incomingInstructions.get(key);
public static boolean isZipped(Collection<ITouchpointData> data) { if (data == null || data.size() == 0) return false; for (ITouchpointData td : data) { if (td.getInstruction("zipped") != null) //$NON-NLS-1$ return true; } return false; }
protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) { if (touchpointData != null && touchpointData.size() > 0) { start(TOUCHPOINT_DATA_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size()); for (ITouchpointData nextData : touchpointData) { Map<String, ITouchpointInstruction> instructions = nextData.getInstructions(); if (instructions.size() > 0) { start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size()); for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) { start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey()); ITouchpointInstruction instruction = entry.getValue(); if (instruction.getImportAttribute() != null) attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute()); cdata(instruction.getBody(), true); end(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); } end(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); } } end(TOUCHPOINT_DATA_ELEMENT); } }
private final static List<ITouchpointInstruction> getInstructions(IInstallableUnit unit, String key) { Collection<ITouchpointData> data = unit.getTouchpointData(); int dataSize = data.size(); if (dataSize == 0) return Collections.<ITouchpointInstruction> emptyList(); ArrayList<ITouchpointInstruction> matches = new ArrayList<ITouchpointInstruction>(dataSize); for (ITouchpointData td : data) { ITouchpointInstruction instructions = td.getInstruction(key); if (instructions != null) matches.add(instructions); } return matches; } }
protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) { if (touchpointData != null && touchpointData.size() > 0) { start(TOUCHPOINT_DATA_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size()); for (ITouchpointData nextData : touchpointData) { Map<String, ITouchpointInstruction> instructions = nextData.getInstructions(); if (instructions.size() > 0) { start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size()); for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) { start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey()); ITouchpointInstruction instruction = entry.getValue(); if (instruction.getImportAttribute() != null) attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute()); cdata(instruction.getBody(), true); end(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); } end(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); } } end(TOUCHPOINT_DATA_ELEMENT); } }
private final static List<ITouchpointInstruction> getInstructions(IInstallableUnit unit, String key) { Collection<ITouchpointData> data = unit.getTouchpointData(); int dataSize = data.size(); if (dataSize == 0) return Collections.emptyList(); ArrayList<ITouchpointInstruction> matches = new ArrayList<>(dataSize); for (ITouchpointData td : data) { ITouchpointInstruction instructions = td.getInstruction(key); if (instructions != null) matches.add(instructions); } return matches; } }
protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) { if (touchpointData != null && touchpointData.size() > 0) { start(TOUCHPOINT_DATA_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size()); for (ITouchpointData nextData : touchpointData) { Map<String, ITouchpointInstruction> instructions = nextData.getInstructions(); if (instructions.size() > 0) { start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size()); for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) { start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey()); ITouchpointInstruction instruction = entry.getValue(); if (instruction.getImportAttribute() != null) attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute()); cdata(instruction.getBody(), true); end(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT); } end(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT); } } end(TOUCHPOINT_DATA_ELEMENT); } }
for (Entry<String, ITouchpointInstruction> tpe : tp.getInstructions().entrySet()) { Activator.println(" "+tpe.getKey()+"="+tpe.getValue());