@Override public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { ModelNode model = new ModelNode(); model.get(BeanValidationRootDefinition.INSTANCE.getPathElement().getKeyValuePair()).set(context.getModelNode()); XML_DESCRIPTION.persist(writer, model, Namespace.CURRENT.getUriString()); } }
@Override public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(SingletonSchema.CURRENT.getNamespaceUri(), false); writeSingletonPolicies(writer, context.getModelNode()); writer.writeEndElement(); }
/** {@inheritDoc} */ @Override public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { ModelNode node = context.getModelNode(); boolean hasChildren = node.hasDefined(RESOURCEADAPTER_NAME) && node.get(RESOURCEADAPTER_NAME).asPropertyList().size() > 0; context.startSubsystemElement(Namespace.CURRENT.getUriString(), !hasChildren); if (hasChildren) { writer.writeStartElement(Element.RESOURCE_ADAPTERS.getLocalName()); ModelNode ras = node.get(RESOURCEADAPTER_NAME); for (String name : ras.keys()) { final ModelNode ra = ras.get(name); writeRaElement(writer, ra, name); } writer.writeEndElement(); // Close the subsystem element writer.writeEndElement(); } }
@Override public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); ModelNode model = context.getModelNode(); if (model.hasDefined(ModelConstants.CONFIGURATION)) { ModelNode configuration = model.get(ModelConstants.CONFIGURATION); for (String pid : new TreeSet<String>(configuration.keys())) { writer.writeStartElement(Element.CONFIGURATION.getLocalName()); writer.writeAttribute(Attribute.PID.getLocalName(), pid); ConfigurationResource.ENTRIES.marshallAsElement(configuration.get(pid), writer); writer.writeEndElement(); } } writer.writeEndElement(); }
@Override public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(ModClusterSchema.CURRENT.getNamespaceUri(), false); ModelNode subsystemModel = context.getModelNode(); if (subsystemModel.hasDefined(ProxyConfigurationResourceDefinition.WILDCARD_PATH.getKey())) { for (Property property : subsystemModel.get(ProxyConfigurationResourceDefinition.WILDCARD_PATH.getKey()).asPropertyList()) { String name = property.getName(); ModelNode proxy = property.getValue(); writeProxy(writer, name, proxy); } } writer.writeEndElement(); }
/** * {@inheritDoc} */ @Override public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(NamingExtension.NAMESPACE_2_0, false); ModelNode model = context.getModelNode(); // bindings if (model.hasDefined(BINDING)) { writer.writeStartElement(NamingSubsystemXMLElement.BINDINGS.getLocalName()); final ModelNode bindingModel = model.get(BINDING); this.writeBindings(writer, bindingModel); // </timer-service> writer.writeEndElement(); } if (model.hasDefined(SERVICE)) { final ModelNode service = model.get(SERVICE); if (service.has(REMOTE_NAMING)) { writer.writeEmptyElement(REMOTE_NAMING); } } // write the subsystem end element writer.writeEndElement(); }
@Override public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); ModelNode node = context.getModelNode(); // write the orb configuration section if there are any orb properties to be written. this.writeORBConfig(writer, node); // write the poa configuration section if there are any poa properties to be written. this.writePOAConfig(writer, node); // write the naming configuration section if there are any naming properties to be written. this.writeNamingConfig(writer, node); // write the interop configuration section if there are any interop properties to be written. this.writeInteropConfig(writer, node); // write the security configuration section if there are any security properties to be written. this.writeSecurityConfig(writer, node); // write all defined generic properties. String properties = JacORBSubsystemConstants.PROPERTIES; if (node.hasDefined(properties)) { this.writeGenericProperties(writer, node.get(properties)); } // write the ior-settings configuration section if there are any security properties to be written. if (node.hasDefined(JacORBSubsystemConstants.IOR_SETTINGS)) IORSettingsParser.INSTANCE.writeContent(writer, node.get(JacORBSubsystemConstants.IOR_SETTINGS, JacORBSubsystemConstants.DEFAULT)); writer.writeEndElement(); // End of subsystem element }
/** * {@inheritDoc} */ @Override public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); ModelNode eeSubSystem = context.getModelNode(); GlobalModulesDefinition.INSTANCE.marshallAsElement(eeSubSystem, writer); EeSubsystemRootResource.EAR_SUBDEPLOYMENTS_ISOLATED.marshallAsElement(eeSubSystem, writer); EeSubsystemRootResource.SPEC_DESCRIPTOR_PROPERTY_REPLACEMENT.marshallAsElement(eeSubSystem, writer); EeSubsystemRootResource.JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT.marshallAsElement(eeSubSystem, writer); EeSubsystemRootResource.ANNOTATION_PROPERTY_REPLACEMENT.marshallAsElement(eeSubSystem, writer); writeConcurrentElement(writer,eeSubSystem); writeDefaultBindingsElement(writer,eeSubSystem); writer.writeEndElement(); }
/** * {@inheritDoc} */ @Override public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); ModelNode node = context.getModelNode(); writeArchiveValidation(writer, node); writeBeanValidation(writer, node); writeTracer(writer, node); writeWorkManagers(writer, node); writeDistributedWorkManagers(writer, node); writeBootstrapContexts(writer, node); writeCachedConnectionManager(writer, node); writer.writeEndElement(); }
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); final ModelNode model = context.getModelNode(); if (model.hasDefined(UUID_KEY_GENERATOR) || model.hasDefined(HILO_KEY_GENERATOR)) { writer.writeStartElement(Element.KEY_GENERATORS.getLocalName()); if (model.hasDefined(UUID_KEY_GENERATOR)) { for (Property keyGen : model.get(UUID_KEY_GENERATOR).asPropertyList()) { final String name = keyGen.getName(); final ModelNode keyGenModel = keyGen.getValue(); writeUuid(writer, name, keyGenModel); } } if (model.hasDefined(HILO_KEY_GENERATOR)) { for (Property keyGen : model.get(HILO_KEY_GENERATOR).asPropertyList()) { final String name = keyGen.getName(); final ModelNode keyGenModel = keyGen.getValue(); writeHilo(writer, name, keyGenModel); } } writer.writeEndElement(); } writer.writeEndElement(); }
@Override public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); ModelNode node = context.getModelNode(); // write connection-factory writer.writeStartElement(Element.CONNECTION_FACTORY.getLocalName()); JAXRSubsystemRootResource.CONNECTION_FACTORY_ATTRIBUTE.marshallAsAttribute(node, writer); JAXRSubsystemRootResource.CONNECTION_FACTORY_IMPL_ATTRIBUTE.marshallAsAttribute(node, writer); writer.writeEndElement(); ModelNode properties = node.get(ModelDescriptionConstants.PROPERTY); if (properties.isDefined()) { writer.writeStartElement(Element.PROPERTIES.getLocalName()); for (String key : properties.keys()) { writer.writeStartElement(Element.PROPERTY.getLocalName()); writer.writeAttribute(Attribute.NAME.getLocalName(), key); JAXRPropertyDefinition.VALUE.marshallAsAttribute(properties.get(key), writer); writer.writeEndElement(); } writer.writeEndElement(); } writer.writeEndElement(); }
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); ModelNode node = context.getModelNode();
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); ModelNode node = context.getModelNode(); if (SecuritySubsystemRootResourceDefinition.DEEP_COPY_SUBJECT_MODE.isMarshallable(node) || SecuritySubsystemRootResourceDefinition.INITIALIZE_JACC.isMarshallable(node)) {
final ThreadsParser threadsParser = ThreadsParser.getInstance(); context.startSubsystemElement(Namespace.CURRENT.getUriString(), false); final ModelNode model = context.getModelNode(); BatchSubsystemDefinition.DEFAULT_JOB_REPOSITORY.marshallAsElement(model, writer); BatchSubsystemDefinition.DEFAULT_THREAD_POOL.marshallAsElement(model, writer);
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(JGroupsSchema.CURRENT.getNamespaceUri(), false); ModelNode model = context.getModelNode();
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(InfinispanSchema.CURRENT.getNamespaceUri(), false); ModelNode model = context.getModelNode(); if (model.isDefined()) { if (model.hasDefined(CacheContainerResourceDefinition.WILDCARD_PATH.getKey())) {
protected void writeElements(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { ModelNode model = context.getModelNode();
ModelNode node = context.getModelNode();
protected void writeJobExecutorContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { ModelNode node = context.getModelNode(); ModelNode jobExecutorNode = node.get(Element.JOB_EXECUTOR.getLocalName()); if (jobExecutorNode.isDefined()) { writer.writeStartElement(Element.JOB_EXECUTOR.getLocalName()); for (Property property : jobExecutorNode.asPropertyList()) { ModelNode propertyValue = property.getValue(); for (AttributeDefinition jobExecutorAttribute : SubsystemAttributeDefinitons.JOB_EXECUTOR_ATTRIBUTES) { if (jobExecutorAttribute.equals(SubsystemAttributeDefinitons.NAME)) { ((SimpleAttributeDefinition) jobExecutorAttribute).marshallAsAttribute(propertyValue, writer); } else { jobExecutorAttribute.marshallAsElement(propertyValue, writer); } } writeJobAcquisitionsContent(writer, context, propertyValue); } // end job-executor writer.writeEndElement(); } }
protected void writeJobExecutorContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { ModelNode node = context.getModelNode(); ModelNode jobExecutorNode = node.get(Element.JOB_EXECUTOR.getLocalName()); if (jobExecutorNode.isDefined()) { writer.writeStartElement(Element.JOB_EXECUTOR.getLocalName()); for (Property property : jobExecutorNode.asPropertyList()) { ModelNode propertyValue = property.getValue(); for (AttributeDefinition jobExecutorAttribute : SubsystemAttributeDefinitons.JOB_EXECUTOR_ATTRIBUTES) { if (jobExecutorAttribute.equals(SubsystemAttributeDefinitons.NAME)) { ((SimpleAttributeDefinition) jobExecutorAttribute).marshallAsAttribute(propertyValue, writer); } else { jobExecutorAttribute.marshallAsElement(propertyValue, writer); } } writeJobAcquisitionsContent(writer, context, propertyValue); } // end job-executor writer.writeEndElement(); } }