/** * Adds the default namespaces as defined in the specification * @return the current instance of <code>ValidationConfigurationDescriptor</code> */ public ValidationConfigurationDescriptor addDefaultNamespaces() { addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); addNamespace("xsi:schemaLocation", "http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.1.xsd"); addNamespace("xmlns", "http://jboss.org/xml/ns/javax/validation/configuration"); return this; }
/** * Creates a new <code>property</code> element * @return the new created instance of <code>PropertyType<ValidationConfigurationDescriptor></code> */ public PropertyType<ValidationConfigurationDescriptor> createProperty() { return new PropertyTypeImpl<ValidationConfigurationDescriptor>(this, "property", model); }
public ValidationConfigurationDescriptorImpl(String descriptorName, Node node) { super(descriptorName); this.model = node; addDefaultNamespaces(); }
/** * If not already created, a new <code>property</code> element will be created and returned. * Otherwise, the first existing <code>property</code> element will be returned. * @return the instance defined for the element <code>property</code> */ public PropertyType<ValidationConfigurationDescriptor> getOrCreateProperty() { List<Node> nodeList = model.get("property"); if (nodeList != null && nodeList.size() > 0) { return new PropertyTypeImpl<ValidationConfigurationDescriptor>(this, "property", model, nodeList.get(0)); } return createProperty(); }
/** * If not already created, a new <code>default-validated-executable-types</code> element with the given value will be created. * Otherwise, the existing <code>default-validated-executable-types</code> element will be returned. * @return a new or existing instance of <code>DefaultValidatedExecutableTypesType<ExecutableValidationType<T>></code> */ public DefaultValidatedExecutableTypesType<ExecutableValidationType<T>> getOrCreateDefaultValidatedExecutableTypes() { Node node = childNode.getOrCreate("default-validated-executable-types"); DefaultValidatedExecutableTypesType<ExecutableValidationType<T>> defaultValidatedExecutableTypes = new DefaultValidatedExecutableTypesTypeImpl<ExecutableValidationType<T>>(this, "default-validated-executable-types", childNode, node); return defaultValidatedExecutableTypes; }
/** * If not already created, a new <code>executable-validation</code> element with the given value will be created. * Otherwise, the existing <code>executable-validation</code> element will be returned. * @return a new or existing instance of <code>ExecutableValidationType<ValidationConfigurationDescriptor></code> */ public ExecutableValidationType<ValidationConfigurationDescriptor> getOrCreateExecutableValidation() { Node node = model.getOrCreate("executable-validation"); ExecutableValidationType<ValidationConfigurationDescriptor> executableValidation = new ExecutableValidationTypeImpl<ValidationConfigurationDescriptor>(this, "executable-validation", model, node); return executableValidation; }
/** * If not already created, a new <code>property</code> element will be created and returned. * Otherwise, the first existing <code>property</code> element will be returned. * @return the instance defined for the element <code>property</code> */ public PropertyType<ValidationConfigurationDescriptor> getOrCreateProperty() { List<Node> nodeList = model.get("property"); if (nodeList != null && nodeList.size() > 0) { return new PropertyTypeImpl<ValidationConfigurationDescriptor>(this, "property", model, nodeList.get(0)); } return createProperty(); }
/** * Creates a new <code>property</code> element * @return the new created instance of <code>PropertyType<ValidationConfigurationDescriptor></code> */ public PropertyType<ValidationConfigurationDescriptor> createProperty() { return new PropertyTypeImpl<ValidationConfigurationDescriptor>(this, "property", model); }
/** * Adds the default namespaces as defined in the specification * @return the current instance of <code>ValidationConfigurationDescriptor</code> */ public ValidationConfigurationDescriptor addDefaultNamespaces() { addNamespace("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); addNamespace("xsi:schemaLocation", "http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.1.xsd"); addNamespace("xmlns", "http://jboss.org/xml/ns/javax/validation/configuration"); return this; }
public ValidationConfigurationDescriptorImpl(String descriptorName, Node node) { super(descriptorName); this.model = node; addDefaultNamespaces(); }
/** * If not already created, a new <code>default-validated-executable-types</code> element with the given value will be created. * Otherwise, the existing <code>default-validated-executable-types</code> element will be returned. * @return a new or existing instance of <code>DefaultValidatedExecutableTypesType<ExecutableValidationType<T>></code> */ public DefaultValidatedExecutableTypesType<ExecutableValidationType<T>> getOrCreateDefaultValidatedExecutableTypes() { Node node = childNode.getOrCreate("default-validated-executable-types"); DefaultValidatedExecutableTypesType<ExecutableValidationType<T>> defaultValidatedExecutableTypes = new DefaultValidatedExecutableTypesTypeImpl<ExecutableValidationType<T>>(this, "default-validated-executable-types", childNode, node); return defaultValidatedExecutableTypes; }
/** * If not already created, a new <code>executable-validation</code> element with the given value will be created. * Otherwise, the existing <code>executable-validation</code> element will be returned. * @return a new or existing instance of <code>ExecutableValidationType<ValidationConfigurationDescriptor></code> */ public ExecutableValidationType<ValidationConfigurationDescriptor> getOrCreateExecutableValidation() { Node node = model.getOrCreate("executable-validation"); ExecutableValidationType<ValidationConfigurationDescriptor> executableValidation = new ExecutableValidationTypeImpl<ValidationConfigurationDescriptor>(this, "executable-validation", model, node); return executableValidation; }
/** * Returns all <code>property</code> elements * @return list of <code>property</code> */ public List<PropertyType<ValidationConfigurationDescriptor>> getAllProperty() { List<PropertyType<ValidationConfigurationDescriptor>> list = new ArrayList<PropertyType<ValidationConfigurationDescriptor>>(); List<Node> nodeList = model.get("property"); for(Node node: nodeList) { PropertyType<ValidationConfigurationDescriptor> type = new PropertyTypeImpl<ValidationConfigurationDescriptor>(this, "property", model, node); list.add(type); } return list; }
/** * Returns all <code>property</code> elements * @return list of <code>property</code> */ public List<PropertyType<ValidationConfigurationDescriptor>> getAllProperty() { List<PropertyType<ValidationConfigurationDescriptor>> list = new ArrayList<PropertyType<ValidationConfigurationDescriptor>>(); List<Node> nodeList = model.get("property"); for(Node node: nodeList) { PropertyType<ValidationConfigurationDescriptor> type = new PropertyTypeImpl<ValidationConfigurationDescriptor>(this, "property", model, node); list.add(type); } return list; }