use of com.sun.enterprise.deployment.runtime.common.MessageSecurityDescriptor in project Payara by payara.
the class MessageSecurityBindingNode method writeDescriptor.
/**
* write the descriptor class to a DOM tree and return it
*
* @param parent node for the DOM tree
* @param node name for
* @param the descriptor to write
* @return the DOM tree top node
*/
public Node writeDescriptor(Node parent, String nodeName, MessageSecurityBindingDescriptor messageSecurityBindingDesc) {
Element messageSecurityBindingNode = (Element) super.writeDescriptor(parent, nodeName, messageSecurityBindingDesc);
// message-security
ArrayList messageSecDescs = messageSecurityBindingDesc.getMessageSecurityDescriptors();
if (!messageSecDescs.isEmpty()) {
MessageSecurityNode messageSecurityNode = new MessageSecurityNode();
for (Iterator messageSecIterator = messageSecDescs.iterator(); messageSecIterator.hasNext(); ) {
MessageSecurityDescriptor messageSecDesc = (MessageSecurityDescriptor) messageSecIterator.next();
messageSecurityNode.writeDescriptor(messageSecurityBindingNode, WebServicesTagNames.MESSAGE_SECURITY, messageSecDesc);
}
}
// auth-layer
if (messageSecurityBindingDesc.getAttributeValue(messageSecurityBindingDesc.AUTH_LAYER) != null) {
setAttribute(messageSecurityBindingNode, WebServicesTagNames.AUTH_LAYER, messageSecurityBindingDesc.getAttributeValue(messageSecurityBindingDesc.AUTH_LAYER));
}
// provider-id
if (messageSecurityBindingDesc.getAttributeValue(messageSecurityBindingDesc.PROVIDER_ID) != null) {
setAttribute(messageSecurityBindingNode, WebServicesTagNames.PROVIDER_ID, messageSecurityBindingDesc.getAttributeValue(messageSecurityBindingDesc.PROVIDER_ID));
}
return messageSecurityBindingNode;
}
Aggregations