public ArquillianDescriptorImpl(String descriptorName) { this(descriptorName, new Node("arquillian") .attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance") .attribute("xmlns", "http://jboss.org/schema/arquillian") .attribute("xsi:schemaLocation", "http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd")); }
@Override public ApplicationDescriptor connectorModule(String uri) { model.createChild("module").createChild("connector").text(uri); return this; }
@Override public ServletDef asyncSupported(boolean value) { servlet.getOrCreate("async-supported").text(value); return this; }
@Override public Map<String, String> getContainerProperties() { Node props = container.getSingle("configuration"); Map<String, String> properties = new HashMap<String, String>(); if (props != null) { for (Node prop : props.get("property")) { properties.put(prop.getAttribute("name"), prop.getText()); } } return properties; }
@Override public ProtocolDef property(String name, String value) { protocol.getOrCreate("property@name=" + name).attribute("name", name).text(value); return this; }
@Override public Map<String, String> getProtocolProperties() { List<Node> props = protocol.get("property"); Map<String, String> properties = new HashMap<String, String>(); for (Node prop : props) { properties.put(prop.getAttribute("name"), prop.getText()); } return properties; }
@Override public ContainerDef overrideProperty(String name, String value) { container.getOrCreate("configuration").removeChild("property@name=" + name); container.getOrCreate("configuration").getOrCreate("property@name=" + name).text(value); return this; }
/** * Removes the <code>null-value</code> element * @return the current instance of <code>FacesConfigListEntriesType<T></code> */ public FacesConfigListEntriesType<T> removeNullValue() { childNode.removeChild("null-value"); return this; }
/** * Sets the <code>id</code> attribute * @param id the value for the attribute <code>id</code> * @return the current instance of <code>FacesConfigValidatorType<T></code> */ public FacesConfigValidatorType<T> id(String id) { childNode.attribute("id", id); return this; }
/** * Returns the <code>id</code> attribute * @return the value defined for the attribute <code>id</code> */ public String getId() { return childNode.getAttribute("id"); }
/** * Removes the <code>converter-extension</code> element * @return the current instance of <code>FacesConfigConverterType<T></code> */ public Boolean isConverterExtension() { return childNode.getSingle("converter-extension") != null; }
@Override public ServletMappingDef mapping() { Node mappingNode = getRootNode().createChild("servlet-mapping"); ServletMappingDef mapping = new ServletMappingDefImpl(getDescriptorName(), getRootNode(), servlet, mappingNode); mapping.servletName(getName()); return mapping; }
@Override public Map<String, String> getContainerProperties() { Node props = container.getSingle("configuration"); Map<String, String> properties = new HashMap<String, String>(); if (props != null) { for (Node prop : props.get("property")) { properties.put(prop.getAttribute("name"), prop.getText()); } } return properties; }
@Override public ExtensionDef property(String name, String value) { extension.getOrCreate("property@name=" + name).attribute("name", name).text(value); return this; }
public Map<String, String> getProperties() { List<Node> props = protocol.get("property"); Map<String, String> properties = new HashMap<String, String>(); for (Node prop : props) { properties.put(prop.getAttribute("name"), prop.getText()); } return properties; }
/** * Removes the <code>faces-config-extension</code> element * @return the current instance of <code>WebFacesConfigDescriptor</code> */ public WebFacesConfigDescriptor removeFacesConfigExtension() { model.removeChild("faces-config-extension"); return this; }