public WebFragmentDescriptorImpl(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>WebFragmentDescriptor</code> */ public WebFragmentDescriptor addDefaultNamespaces() { addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); addNamespace("xsi:schemaLocation", "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd"); addNamespace("xmlns", "http://java.sun.com/xml/ns/javaee"); return this; }
/** * If not already created, a new <code>data-source</code> element will be created and returned. * Otherwise, the first existing <code>data-source</code> element will be returned. * @return the instance defined for the element <code>data-source</code> */ public DataSourceType<WebFragmentDescriptor> getOrCreateDataSource() { List<Node> nodeList = model.get("data-source"); if (nodeList != null && nodeList.size() > 0) { return new DataSourceTypeImpl<WebFragmentDescriptor>(this, "data-source", model, nodeList.get(0)); } return createDataSource(); }
/** * If not already created, a new <code>filter-mapping</code> element will be created and returned. * Otherwise, the first existing <code>filter-mapping</code> element will be returned. * @return the instance defined for the element <code>filter-mapping</code> */ public FilterMappingType<WebFragmentDescriptor> getOrCreateFilterMapping() { List<Node> nodeList = model.get("filter-mapping"); if (nodeList != null && nodeList.size() > 0) { return new FilterMappingTypeImpl<WebFragmentDescriptor>(this, "filter-mapping", model, nodeList.get(0)); } return createFilterMapping(); }
/** * If not already created, a new <code>ejb-ref</code> element will be created and returned. * Otherwise, the first existing <code>ejb-ref</code> element will be returned. * @return the instance defined for the element <code>ejb-ref</code> */ public EjbRefType<WebFragmentDescriptor> getOrCreateEjbRef() { List<Node> nodeList = model.get("ejb-ref"); if (nodeList != null && nodeList.size() > 0) { return new EjbRefTypeImpl<WebFragmentDescriptor>(this, "ejb-ref", model, nodeList.get(0)); } return createEjbRef(); }
/** * If not already created, a new <code>context-param</code> element will be created and returned. * Otherwise, the first existing <code>context-param</code> element will be returned. * @return the instance defined for the element <code>context-param</code> */ public ParamValueType<WebFragmentDescriptor> getOrCreateContextParam() { List<Node> nodeList = model.get("context-param"); if (nodeList != null && nodeList.size() > 0) { return new ParamValueTypeImpl<WebFragmentDescriptor>(this, "context-param", model, nodeList.get(0)); } return createContextParam(); }
/** * If not already created, a new <code>filter</code> element will be created and returned. * Otherwise, the first existing <code>filter</code> element will be returned. * @return the instance defined for the element <code>filter</code> */ public FilterType<WebFragmentDescriptor> getOrCreateFilter() { List<Node> nodeList = model.get("filter"); if (nodeList != null && nodeList.size() > 0) { return new FilterTypeImpl<WebFragmentDescriptor>(this, "filter", model, nodeList.get(0)); } return createFilter(); }
/** * 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<WebFragmentDescriptor> getOrCreateErrorPage() { List<Node> nodeList = model.get("error-page"); if (nodeList != null && nodeList.size() > 0) { return new ErrorPageTypeImpl<WebFragmentDescriptor>(this, "error-page", model, nodeList.get(0)); } return createErrorPage(); }
/** * If not already created, a new <code>env-entry</code> element will be created and returned. * Otherwise, the first existing <code>env-entry</code> element will be returned. * @return the instance defined for the element <code>env-entry</code> */ public EnvEntryType<WebFragmentDescriptor> getOrCreateEnvEntry() { List<Node> nodeList = model.get("env-entry"); if (nodeList != null && nodeList.size() > 0) { return new EnvEntryTypeImpl<WebFragmentDescriptor>(this, "env-entry", model, nodeList.get(0)); } return createEnvEntry(); }
/** * 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<WebFragmentDescriptor> getOrCreateEjbLocalRef() { List<Node> nodeList = model.get("ejb-local-ref"); if (nodeList != null && nodeList.size() > 0) { return new EjbLocalRefTypeImpl<WebFragmentDescriptor>(this, "ejb-local-ref", model, nodeList.get(0)); } return createEjbLocalRef(); }
/** * If not already created, a new <code>data-source</code> element will be created and returned. * Otherwise, the first existing <code>data-source</code> element will be returned. * @return the instance defined for the element <code>data-source</code> */ public DataSourceType<WebFragmentDescriptor> getOrCreateDataSource() { List<Node> nodeList = model.get("data-source"); if (nodeList != null && nodeList.size() > 0) { return new DataSourceTypeImpl<WebFragmentDescriptor>(this, "data-source", model, nodeList.get(0)); } return createDataSource(); }
/** * If not already created, a new <code>filter-mapping</code> element will be created and returned. * Otherwise, the first existing <code>filter-mapping</code> element will be returned. * @return the instance defined for the element <code>filter-mapping</code> */ public FilterMappingType<WebFragmentDescriptor> getOrCreateFilterMapping() { List<Node> nodeList = model.get("filter-mapping"); if (nodeList != null && nodeList.size() > 0) { return new FilterMappingTypeImpl<WebFragmentDescriptor>(this, "filter-mapping", model, nodeList.get(0)); } return createFilterMapping(); }
/** * If not already created, a new <code>ejb-ref</code> element will be created and returned. * Otherwise, the first existing <code>ejb-ref</code> element will be returned. * @return the instance defined for the element <code>ejb-ref</code> */ public EjbRefType<WebFragmentDescriptor> getOrCreateEjbRef() { List<Node> nodeList = model.get("ejb-ref"); if (nodeList != null && nodeList.size() > 0) { return new EjbRefTypeImpl<WebFragmentDescriptor>(this, "ejb-ref", model, nodeList.get(0)); } return createEjbRef(); }
/** * If not already created, a new <code>context-param</code> element will be created and returned. * Otherwise, the first existing <code>context-param</code> element will be returned. * @return the instance defined for the element <code>context-param</code> */ public ParamValueType<WebFragmentDescriptor> getOrCreateContextParam() { List<Node> nodeList = model.get("context-param"); if (nodeList != null && nodeList.size() > 0) { return new ParamValueTypeImpl<WebFragmentDescriptor>(this, "context-param", model, nodeList.get(0)); } return createContextParam(); }
/** * If not already created, a new <code>filter</code> element will be created and returned. * Otherwise, the first existing <code>filter</code> element will be returned. * @return the instance defined for the element <code>filter</code> */ public FilterType<WebFragmentDescriptor> getOrCreateFilter() { List<Node> nodeList = model.get("filter"); if (nodeList != null && nodeList.size() > 0) { return new FilterTypeImpl<WebFragmentDescriptor>(this, "filter", model, nodeList.get(0)); } return createFilter(); }
/** * 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<WebFragmentDescriptor> getOrCreateErrorPage() { List<Node> nodeList = model.get("error-page"); if (nodeList != null && nodeList.size() > 0) { return new ErrorPageTypeImpl<WebFragmentDescriptor>(this, "error-page", model, nodeList.get(0)); } return createErrorPage(); }
/** * If not already created, a new <code>env-entry</code> element will be created and returned. * Otherwise, the first existing <code>env-entry</code> element will be returned. * @return the instance defined for the element <code>env-entry</code> */ public EnvEntryType<WebFragmentDescriptor> getOrCreateEnvEntry() { List<Node> nodeList = model.get("env-entry"); if (nodeList != null && nodeList.size() > 0) { return new EnvEntryTypeImpl<WebFragmentDescriptor>(this, "env-entry", model, nodeList.get(0)); } return createEnvEntry(); }
/** * 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<WebFragmentDescriptor> getOrCreateEjbLocalRef() { List<Node> nodeList = model.get("ejb-local-ref"); if (nodeList != null && nodeList.size() > 0) { return new EjbLocalRefTypeImpl<WebFragmentDescriptor>(this, "ejb-local-ref", model, nodeList.get(0)); } return createEjbLocalRef(); }
/** * Adds the default namespaces as defined in the specification * @return the current instance of <code>WebFragmentDescriptor</code> */ public WebFragmentDescriptor addDefaultNamespaces() { addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); addNamespace("xsi:schemaLocation", "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd"); addNamespace("xmlns", "http://java.sun.com/xml/ns/javaee"); return this; }
public WebFragmentDescriptorImpl(String descriptorName, Node node) { super(descriptorName); this.model = node; addDefaultNamespaces(); }