public WebAppDescriptorImpl(String descriptorName, Node node) { super(descriptorName); this.model = node; addDefaultNamespaces(); }
/** * Adds the default namespaces as defined in the specification * @return the current instance of <code>WebAppDescriptor</code> */ public WebAppDescriptor addDefaultNamespaces() { addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); addNamespace("xsi:schemaLocation", "http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"); addNamespace("xmlns", "http://xmlns.jcp.org/xml/ns/javaee"); return this; }
/** * Creates a new <code>absolute-ordering</code> element * @return the new created instance of <code>AbsoluteOrderingType<WebAppDescriptor></code> */ public AbsoluteOrderingType<WebAppDescriptor> createAbsoluteOrdering() { return new AbsoluteOrderingTypeImpl<WebAppDescriptor>(this, "absolute-ordering", model); }
/** * If not already created, a new <code>absolute-ordering</code> element will be created and returned. * Otherwise, the first existing <code>absolute-ordering</code> element will be returned. * @return the instance defined for the element <code>absolute-ordering</code> */ public AbsoluteOrderingType<WebAppDescriptor> getOrCreateAbsoluteOrdering() { List<Node> nodeList = model.get("absolute-ordering"); if (nodeList != null && nodeList.size() > 0) { return new AbsoluteOrderingTypeImpl<WebAppDescriptor>(this, "absolute-ordering", model, nodeList.get(0)); } return createAbsoluteOrdering(); }
/** * If not already created, a new <code>jsp-config</code> element will be created and returned. * Otherwise, the first existing <code>jsp-config</code> element will be returned. * @return the instance defined for the element <code>jsp-config</code> */ public JspConfigType<WebAppDescriptor> getOrCreateJspConfig() { List<Node> nodeList = model.get("jsp-config"); if (nodeList != null && nodeList.size() > 0) { return new JspConfigTypeImpl<WebAppDescriptor>(this, "jsp-config", model, nodeList.get(0)); } return createJspConfig(); }
/** * If not already created, a new <code>ejb-local-ref</code> element will be created and returned. * Otherwise, the first existing <code>ejb-local-ref</code> element will be returned. * @return the instance defined for the element <code>ejb-local-ref</code> */ public EjbLocalRefType<WebAppDescriptor> getOrCreateEjbLocalRef() { List<Node> nodeList = model.get("ejb-local-ref"); if (nodeList != null && nodeList.size() > 0) { return new EjbLocalRefTypeImpl<WebAppDescriptor>(this, "ejb-local-ref", model, nodeList.get(0)); } return createEjbLocalRef(); }
/** * If not already created, a new <code>resource-ref</code> element will be created and returned. * Otherwise, the first existing <code>resource-ref</code> element will be returned. * @return the instance defined for the element <code>resource-ref</code> */ public ResourceRefType<WebAppDescriptor> getOrCreateResourceRef() { List<Node> nodeList = model.get("resource-ref"); if (nodeList != null && nodeList.size() > 0) { return new ResourceRefTypeImpl<WebAppDescriptor>(this, "resource-ref", model, nodeList.get(0)); } return createResourceRef(); }
/** * If not already created, a new <code>mime-mapping</code> element will be created and returned. * Otherwise, the first existing <code>mime-mapping</code> element will be returned. * @return the instance defined for the element <code>mime-mapping</code> */ public MimeMappingType<WebAppDescriptor> getOrCreateMimeMapping() { List<Node> nodeList = model.get("mime-mapping"); if (nodeList != null && nodeList.size() > 0) { return new MimeMappingTypeImpl<WebAppDescriptor>(this, "mime-mapping", model, nodeList.get(0)); } return createMimeMapping(); }
/** * If not already created, a new <code>error-page</code> element will be created and returned. * Otherwise, the first existing <code>error-page</code> element will be returned. * @return the instance defined for the element <code>error-page</code> */ public ErrorPageType<WebAppDescriptor> getOrCreateErrorPage() { List<Node> nodeList = model.get("error-page"); if (nodeList != null && nodeList.size() > 0) { return new ErrorPageTypeImpl<WebAppDescriptor>(this, "error-page", model, nodeList.get(0)); } return createErrorPage(); }
/** * 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>login-config</code> element will be created and returned. * Otherwise, the first existing <code>login-config</code> element will be returned. * @return the instance defined for the element <code>login-config</code> */ public LoginConfigType<WebAppDescriptor> getOrCreateLoginConfig() { List<Node> nodeList = model.get("login-config"); if (nodeList != null && nodeList.size() > 0) { return new LoginConfigTypeImpl<WebAppDescriptor>(this, "login-config", model, nodeList.get(0)); } return createLoginConfig(); }
/** * 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>resource-env-ref</code> element will be created and returned. * Otherwise, the first existing <code>resource-env-ref</code> element will be returned. * @return the instance defined for the element <code>resource-env-ref</code> */ public ResourceEnvRefType<WebAppDescriptor> getOrCreateResourceEnvRef() { List<Node> nodeList = model.get("resource-env-ref"); if (nodeList != null && nodeList.size() > 0) { return new ResourceEnvRefTypeImpl<WebAppDescriptor>(this, "resource-env-ref", model, nodeList.get(0)); } return createResourceEnvRef(); }
/** * If not already created, a new <code>message-destination-ref</code> element will be created and returned. * Otherwise, the first existing <code>message-destination-ref</code> element will be returned. * @return the instance defined for the element <code>message-destination-ref</code> */ public MessageDestinationRefType<WebAppDescriptor> getOrCreateMessageDestinationRef() { List<Node> nodeList = model.get("message-destination-ref"); if (nodeList != null && nodeList.size() > 0) { return new MessageDestinationRefTypeImpl<WebAppDescriptor>(this, "message-destination-ref", model, nodeList.get(0)); } return createMessageDestinationRef(); }
/** * If not already created, a new <code>mail-session</code> element will be created and returned. * Otherwise, the first existing <code>mail-session</code> element will be returned. * @return the instance defined for the element <code>mail-session</code> */ public MailSessionType<WebAppDescriptor> getOrCreateMailSession() { List<Node> nodeList = model.get("mail-session"); if (nodeList != null && nodeList.size() > 0) { return new MailSessionTypeImpl<WebAppDescriptor>(this, "mail-session", model, nodeList.get(0)); } return createMailSession(); }
/** * If not already created, a new <code>service-ref</code> element will be created and returned. * Otherwise, the first existing <code>service-ref</code> element will be returned. * @return the instance defined for the element <code>service-ref</code> */ public ServiceRefType<WebAppDescriptor> getOrCreateServiceRef() { List<Node> nodeList = model.get("service-ref"); if (nodeList != null && nodeList.size() > 0) { return new ServiceRefTypeImpl<WebAppDescriptor>(this, "service-ref", model, nodeList.get(0)); } return createServiceRef(); }
/** * If not already created, a new <code>absolute-ordering</code> element will be created and returned. * Otherwise, the first existing <code>absolute-ordering</code> element will be returned. * @return the instance defined for the element <code>absolute-ordering</code> */ public AbsoluteOrderingType<WebAppDescriptor> getOrCreateAbsoluteOrdering() { List<Node> nodeList = model.get("absolute-ordering"); if (nodeList != null && nodeList.size() > 0) { return new AbsoluteOrderingTypeImpl<WebAppDescriptor>(this, "absolute-ordering", model, nodeList.get(0)); } return createAbsoluteOrdering(); }
public WebAppDescriptorImpl(String descriptorName, Node node) { super(descriptorName); this.model = node; addDefaultNamespaces(); }
/** * Adds the default namespaces as defined in the specification * @return the current instance of <code>WebAppDescriptor</code> */ public WebAppDescriptor addDefaultNamespaces() { addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); addNamespace("xsi:schemaLocation", "http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"); addNamespace("xmlns", "http://xmlns.jcp.org/xml/ns/javaee"); return this; }
/** * Creates a new <code>absolute-ordering</code> element * @return the new created instance of <code>AbsoluteOrderingType<WebAppDescriptor></code> */ public AbsoluteOrderingType<WebAppDescriptor> createAbsoluteOrdering() { return new AbsoluteOrderingTypeImpl<WebAppDescriptor>(this, "absolute-ordering", model); }