public void setObjectProperty(String objectName, String key, Object value) { if (objectProperties == null) { objectProperties = new HashSet<DeploymentProperty>(); } DeploymentProperty deploymentProperty = new DeploymentProperty(this, objectName, key); deploymentProperty.setValue(value); objectProperties.add(deploymentProperty); }
public boolean hasObjectProperties(String objectName) { if (objectProperties != null) { for (DeploymentProperty deploymentProperty : objectProperties) { if (deploymentProperty.getObjectName().equals(objectName) && KEY_PROCESS_DEFINITION_ID.equals(deploymentProperty.getKey())) { return true; } } } return false; }
public Object getObjectProperty(String objectName, String key) { if (objectProperties != null) { for (DeploymentProperty deploymentProperty : objectProperties) { if (deploymentProperty.getObjectName().equals(objectName) && deploymentProperty.getKey().equals(key)) { return deploymentProperty.getValue(); } } } return null; }
public Set<String> getProcessDefinitionIds() { Set<String> processDefinitionIds = new HashSet<String>(); if (objectProperties != null) { for (DeploymentProperty deploymentProperty : objectProperties) { if (KEY_PROCESS_DEFINITION_ID.equals(deploymentProperty.getKey())) { String processDefinitionId = deploymentProperty.getStringValue(); processDefinitionIds.add(processDefinitionId); } } } return processDefinitionIds; }
public Object removeObjectProperty(String objectName, String key) { if (objectProperties != null) { for (DeploymentProperty deploymentProperty : objectProperties) { if (deploymentProperty.getObjectName().equals(objectName) && deploymentProperty.getKey().equals(key)) { Object value = deploymentProperty.getValue(); objectProperties.remove(deploymentProperty); return value; } } } return null; }