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