com.microsoft.azure.servicebus.management.UnknownPropertiesHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-servicebus Show documentation
Show all versions of azure-servicebus Show documentation
Java library for Azure Service Bus
package com.microsoft.azure.servicebus.management;
import java.util.ArrayList;
import java.util.List;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
/*
* In future, servicebus may add new properties to entity description.
* This class helps to hold such properties and send them back 'as is' in UpdateEntity call.
* Order of xml elements is important. Maintain properties in the same order they were
* received and send them back in the same order in UpdateEntity call.
*/
class UnknownPropertiesHolder {
private List unknownProperties;
synchronized void addUnknownProperty(Element property) {
if (this.unknownProperties == null)
{
this.unknownProperties = new ArrayList();
}
this.unknownProperties.add(property);
}
List getUnknownProperties() {
return this.unknownProperties;
}
synchronized void appendUnknownPropertiesToDescriptionElement(Element descriptionElement) {
if (this.unknownProperties != null) {
for (Element unknownElement : this.unknownProperties) {
Node importedElement = descriptionElement.getOwnerDocument().importNode(unknownElement, true);
descriptionElement.appendChild(importedElement);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy