/** * If not already created, a new <code>message-destination</code> element will be created and returned. * Otherwise, the first existing <code>message-destination</code> element will be returned. * @return the instance defined for the element <code>message-destination</code> */ public MessageDestinationType<WebAppDescriptor> getOrCreateMessageDestination() { List<Node> nodeList = model.get("message-destination"); if (nodeList != null && nodeList.size() > 0) { return new MessageDestinationTypeImpl<WebAppDescriptor>(this, "message-destination", model, nodeList.get(0)); } return createMessageDestination(); }
/** * If not already created, a new <code>message-destination</code> element will be created and returned. * Otherwise, the first existing <code>message-destination</code> element will be returned. * @return the instance defined for the element <code>message-destination</code> */ public MessageDestinationType<WebAppDescriptor> getOrCreateMessageDestination() { List<Node> nodeList = model.get("message-destination"); if (nodeList != null && nodeList.size() > 0) { return new MessageDestinationTypeImpl<WebAppDescriptor>(this, "message-destination", model, nodeList.get(0)); } return createMessageDestination(); }