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