public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof ITouchpointInstruction)) return false; ITouchpointInstruction other = (ITouchpointInstruction) obj; if (body == null) { if (other.getBody() != null) return false; } else if (!body.equals(other.getBody())) return false; if (importAttribute == null) { if (other.getImportAttribute() != null) return false; } else if (!importAttribute.equals(other.getImportAttribute())) return false; return true; }
public List<ProvisioningAction> parseActions(ITouchpointInstruction instruction, ITouchpointType touchpointType) { List<ProvisioningAction> actions = new ArrayList<>(); Map<String, ActionEntry> importMap = parseImportAttribute(instruction.getImportAttribute()); StringTokenizer tokenizer = new StringTokenizer(instruction.getBody(), ";"); //$NON-NLS-1$ while (tokenizer.hasMoreTokens()) { actions.add(parseAction(tokenizer.nextToken(), importMap, touchpointType)); } return actions; }
public List<ProvisioningAction> parseActions(ITouchpointInstruction instruction, ITouchpointType touchpointType) { List<ProvisioningAction> actions = new ArrayList<ProvisioningAction>(); Map<String, ActionEntry> importMap = parseImportAttribute(instruction.getImportAttribute()); StringTokenizer tokenizer = new StringTokenizer(instruction.getBody(), ";"); //$NON-NLS-1$ while (tokenizer.hasMoreTokens()) { actions.add(parseAction(tokenizer.nextToken(), importMap, touchpointType)); } return actions; }
String body = existingInstruction.getBody(); if (body == null || body.length() == 0) body = instruction.getBody(); else if (instruction.getBody() != null) { if (!body.endsWith(";")) //$NON-NLS-1$ body += ';'; body += instruction.getBody(); String importAttribute = existingInstruction.getImportAttribute(); if (importAttribute == null || importAttribute.length() == 0) importAttribute = instruction.getImportAttribute(); else if (instruction.getImportAttribute() != null) { if (!importAttribute.endsWith(",")) //$NON-NLS-1$ importAttribute += ','; importAttribute += instruction.getBody();
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); } }
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); } }
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); } }