本文整理汇总了Java中org.jboss.as.controller.persistence.SubsystemMarshallingContext.startSubsystemElement方法的典型用法代码示例。如果您正苦于以下问题:Java SubsystemMarshallingContext.startSubsystemElement方法的具体用法?Java SubsystemMarshallingContext.startSubsystemElement怎么用?Java SubsystemMarshallingContext.startSubsystemElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jboss.as.controller.persistence.SubsystemMarshallingContext
的用法示例。
在下文中一共展示了SubsystemMarshallingContext.startSubsystemElement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
ModelNode node = context.getModelNode();
if (node.hasDefined(ModelConstants.CONTEXT)) {
ModelNode properties = node.get(ModelConstants.CONTEXT);
for (String key : new TreeSet<String>(properties.keys())) {
String val = properties.get(key).get(ModelConstants.VALUE).asString();
writer.writeStartElement(Element.CAMEL_CONTEXT.getLocalName());
writer.writeAttribute(Attribute.ID.getLocalName(), key);
writer.writeCharacters(val);
writer.writeEndElement();
}
}
writer.writeEndElement();
}
示例2: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
final ModelNode node = context.getModelNode();
final ModelNode mbean = node.get(SmppMbeanDefinition.MBEAN);
for (Property mbeanProp : mbean.asPropertyList()) {
writer.writeStartElement(SmppMbeanDefinition.MBEAN);
final ModelNode mbeanEntry = mbeanProp.getValue();
SmppMbeanDefinition.NAME_ATTR.marshallAsAttribute(mbeanEntry, true, writer);
SmppMbeanDefinition.TYPE_ATTR.marshallAsAttribute(mbeanEntry, true, writer);
final ModelNode property = mbeanEntry.get(SmppMbeanPropertyDefinition.PROPERTY);
if (property != null && property.isDefined()) {
for (Property propertyProp : property.asPropertyList()) {
writer.writeStartElement(SmppMbeanPropertyDefinition.PROPERTY);
final ModelNode propertyEntry = propertyProp.getValue();
SmppMbeanPropertyDefinition.NAME_ATTR.marshallAsAttribute(propertyEntry, true, writer);
SmppMbeanPropertyDefinition.TYPE_ATTR.marshallAsAttribute(propertyEntry, true, writer);
SmppMbeanPropertyDefinition.VALUE_ATTR.marshallAsAttribute(propertyEntry, true, writer);
writer.writeEndElement();
}
}
writer.writeEndElement();
}
writer.writeEndElement();
}
示例3: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context)
throws XMLStreamException {
ModelNode node = context.getModelNode();
// <subsystem>
context.startSubsystemElement(NestSubsystemExtension.NAMESPACE, false);
writer.writeAttribute(NEST_ENABLED_ATTR, node.get(NEST_ENABLED_ATTR).asString());
// our config elements
writeElement(writer, node, NEST_NAME_ELEMENT);
// <custom-configuration>
writer.writeStartElement(CUSTOM_CONFIG_ELEMENT);
ModelNode configNode = node.get(CUSTOM_CONFIG_ELEMENT);
if (configNode != null && configNode.isDefined()) {
for (Property property : configNode.asPropertyList()) {
// <propery>
writer.writeStartElement(PROPERTY_ELEMENT);
writer.writeAttribute(Attribute.NAME.getLocalName(), property.getName());
writer.writeAttribute(Attribute.VALUE.getLocalName(), property.getValue().asString());
// </property>
writer.writeEndElement();
}
}
// </custom-configuration>
writer.writeEndElement();
// </subsystem>
writer.writeEndElement();
}
示例4: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(OpenShiftSubsystemExtension.NAMESPACE, false);
ModelNode node = context.getModelNode();
if(node.hasDefined(Constants.MAX_LINE_LENGTH)) {
OpenShiftSubsystemDefinition.MAX_LINE_LENGTH.marshallAsElement(node, writer);
}
ModelNode metricsGroups = node.get(Constants.METRICS_GROUP);
writeMetricsGroups(writer, metricsGroups);
writer.writeEndElement();
}
示例5: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context)
throws XMLStreamException {
context.startSubsystemElement(OrderedChildResourceExtension.NAMESPACE, false);
final ModelNode node = context.getModelNode();
if (node.hasDefined("child")) {
for (Property prop : node.get("child").asPropertyList()) {
writer.writeStartElement("child");
writer.writeAttribute("name", prop.getName());
writer.writeEndElement();
}
}
writer.writeEndElement();
}
示例6: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
ModelNode model = context.getModelNode();
// Marshall attributes
for (AttributeDefinition attribute : LoggingResourceDefinition.ATTRIBUTES) {
attribute.marshallAsElement(model, false, writer);
}
writeContent(writer, model);
if (model.hasDefined(LOGGING_PROFILE)) {
final List<Property> profiles = model.get(LOGGING_PROFILE).asPropertyList();
if (!profiles.isEmpty()) {
writer.writeStartElement(LOGGING_PROFILES);
for (Property profile : profiles) {
final String name = profile.getName();
writer.writeStartElement(LOGGING_PROFILE);
writer.writeAttribute(Attribute.NAME.getLocalName(), name);
writeContent(writer, profile.getValue());
writer.writeEndElement();
}
writer.writeEndElement();
}
}
writer.writeEndElement();
}
示例7: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
ModelNode scanners = context.getModelNode();
for (final Property list : scanners.asPropertyList()) {
final ModelNode node = list.getValue();
for (final Property scanner : node.asPropertyList()) {
final String scannerName = scanner.getName();
final ModelNode configuration = scanner.getValue();
writer.writeEmptyElement(DEPLOYMENT_SCANNER);
if (!DeploymentScannerExtension.DEFAULT_SCANNER_NAME.equals(scannerName)) {
writer.writeAttribute(NAME, scannerName);
}
DeploymentScannerDefinition.PATH.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.RELATIVE_TO.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.SCAN_ENABLED.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.SCAN_INTERVAL.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.AUTO_DEPLOY_ZIPPED.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.AUTO_DEPLOY_EXPLODED.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.AUTO_DEPLOY_XML.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.DEPLOYMENT_TIMEOUT.marshallAsAttribute(configuration, writer);
}
writer.writeEndElement();
}
}
示例8: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
ModelNode scanners = context.getModelNode();
for (final Property list : scanners.asPropertyList()) {
final ModelNode node = list.getValue();
for (final Property scanner : node.asPropertyList()) {
final String scannerName = scanner.getName();
final ModelNode configuration = scanner.getValue();
writer.writeEmptyElement(DEPLOYMENT_SCANNER);
if (!DeploymentScannerExtension.DEFAULT_SCANNER_NAME.equals(scannerName)) {
writer.writeAttribute(NAME, scannerName);
}
DeploymentScannerDefinition.PATH.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.RELATIVE_TO.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.SCAN_ENABLED.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.SCAN_INTERVAL.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.AUTO_DEPLOY_ZIPPED.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.AUTO_DEPLOY_EXPLODED.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.AUTO_DEPLOY_XML.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.DEPLOYMENT_TIMEOUT.marshallAsAttribute(configuration, writer);
DeploymentScannerDefinition.RUNTIME_FAILURE_CAUSES_ROLLBACK.marshallAsAttribute(configuration, writer);
}
writer.writeEndElement();
}
}
示例9: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context)
throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
ModelNode node = context.getModelNode();
writeThreadsElement(writer, node);
writer.writeEndElement();
}
示例10: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
writeProcessEnginesContent(writer, context);
writeJobExecutorContent(writer, context);
// end subsystem
writer.writeEndElement();
}
示例11: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUri(), false);
ModelNode node = context.getModelNode();
if (!node.isDefined()) {
return;
}
ALLOW_ENV_FUNCTION_ELEMENT.marshallAsElement(node, false, writer);
ASYNC_THREAD_POOL_ELEMENT.marshallAsElement(node, false, writer);
if (like(node, Element.BUFFER_SERVICE_ELEMENT)){
writer.writeStartElement(Element.BUFFER_SERVICE_ELEMENT.getLocalName());
writeBufferService(writer, node);
writer.writeEndElement();
}
MAX_THREADS_ELEMENT.marshallAsElement(node, false, writer);
MAX_ACTIVE_PLANS_ELEMENT.marshallAsElement(node, false, writer);
USER_REQUEST_SOURCE_CONCURRENCY_ELEMENT.marshallAsElement(node, false, writer);
TIME_SLICE_IN_MILLI_ELEMENT.marshallAsElement(node, false, writer);
MAX_ROWS_FETCH_SIZE_ELEMENT.marshallAsElement(node, false, writer);
LOB_CHUNK_SIZE_IN_KB_ELEMENT.marshallAsElement(node, false, writer);
QUERY_THRESHOLD_IN_SECS_ELEMENT.marshallAsElement(node, false, writer);
MAX_SOURCE_ROWS_ELEMENT.marshallAsElement(node, false, writer);
EXCEPTION_ON_MAX_SOURCE_ROWS_ELEMENT.marshallAsElement(node, false, writer);
DETECTING_CHANGE_EVENTS_ELEMENT.marshallAsElement(node, false, writer);
QUERY_TIMEOUT.marshallAsElement(node, false, writer);
WORKMANAGER.marshallAsElement(node, false, writer);
AUTHORIZATION_VALIDATOR_MODULE_ELEMENT.marshallAsElement(node, writer);
POLICY_DECIDER_MODULE_ELEMENT.marshallAsElement(node, writer);
PREPARSER_MODULE_ELEMENT.marshallAsElement(node, writer);
if (like(node, Element.RESULTSET_CACHE_ELEMENT)){
writer.writeStartElement(Element.RESULTSET_CACHE_ELEMENT.getLocalName());
writeResultsetCacheConfiguration(writer, node);
writer.writeEndElement();
}
if (like(node, Element.PREPAREDPLAN_CACHE_ELEMENT)){
writer.writeStartElement(Element.PREPAREDPLAN_CACHE_ELEMENT.getLocalName());
writePreparedPlanCacheConfiguration(writer, node);
writer.writeEndElement();
}
if (like(node, Element.DISTRIBUTED_CACHE)){
writer.writeStartElement(Element.DISTRIBUTED_CACHE.getLocalName());
writeObjectReplicatorConfiguration(writer, node);
writer.writeEndElement();
}
if (has(node, Element.TRANSPORT_ELEMENT.getLocalName())) {
ArrayList<String> transports = new ArrayList<String>(node.get(Element.TRANSPORT_ELEMENT.getLocalName()).keys());
if (!transports.isEmpty()) {
for (String transport:transports) {
writer.writeStartElement(Element.TRANSPORT_ELEMENT.getLocalName());
writeTransportConfiguration(writer, node.get(Element.TRANSPORT_ELEMENT.getLocalName(), transport), transport);
writer.writeEndElement();
}
}
}
if (has(node, Element.TRANSLATOR_ELEMENT.getLocalName())) {
ArrayList<String> translators = new ArrayList<String>(node.get(Element.TRANSLATOR_ELEMENT.getLocalName()).keys());
if (!translators.isEmpty()) {
for (String translator:translators) {
writer.writeStartElement(Element.TRANSLATOR_ELEMENT.getLocalName());
writeTranslator(writer, node.get(Element.TRANSLATOR_ELEMENT.getLocalName(), translator), translator);
writer.writeEndElement();
}
}
}
writer.writeEndElement(); // End of subsystem element
}
示例12: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(XMLExtendedStreamWriter streamWriter, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(namespace, false);
streamWriter.writeEndElement();
}
示例13: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
@Override
public void writeContent(XMLExtendedStreamWriter streamWriter,
SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(NAMESPACE, true);
}
示例14: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
Namespace schemaVer = Namespace.CURRENT;
final ModelNode node = context.getModelNode();
context.startSubsystemElement(schemaVer.getUriString(), false);
if (node.hasDefined(CommonAttributes.EXPOSE_MODEL)) {
ModelNode showModel = node.get(CommonAttributes.EXPOSE_MODEL);
if (showModel.hasDefined(CommonAttributes.RESOLVED)) {
writer.writeEmptyElement(CommonAttributes.EXPOSE_RESOLVED_MODEL);
ExposeModelResourceResolved.DOMAIN_NAME.marshallAsAttribute(showModel.get(CommonAttributes.RESOLVED), false, writer);
ExposeModelResourceResolved.PROPER_PROPERTY_FORMAT.marshallAsAttribute(showModel.get(CommonAttributes.RESOLVED), false, writer);
}
if (showModel.hasDefined(CommonAttributes.EXPRESSION)) {
writer.writeEmptyElement(CommonAttributes.EXPOSE_EXPRESSION_MODEL);
ExposeModelResourceExpression.DOMAIN_NAME.marshallAsAttribute(showModel.get(CommonAttributes.EXPRESSION), false, writer);
}
}
if (node.hasDefined(CommonAttributes.REMOTING_CONNECTOR)) {
writer.writeStartElement(CommonAttributes.REMOTING_CONNECTOR);
final ModelNode resourceModel = node.get(CommonAttributes.REMOTING_CONNECTOR).get(CommonAttributes.JMX);
RemotingConnectorResource.USE_MANAGEMENT_ENDPOINT.marshallAsAttribute(resourceModel, writer);
writer.writeEndElement();
}
if (node.hasDefined(JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getKey()) &&
node.get(JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getKey()).hasDefined(JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getValue())) {
ModelNode auditLog = node.get(JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getKey(), JmxAuditLoggerResourceDefinition.PATH_ELEMENT.getValue());
writer.writeStartElement(CommonAttributes.AUDIT_LOG);
JmxAuditLoggerResourceDefinition.LOG_BOOT.marshallAsAttribute(auditLog, writer);
JmxAuditLoggerResourceDefinition.LOG_READ_ONLY.marshallAsAttribute(auditLog, writer);
JmxAuditLoggerResourceDefinition.ENABLED.marshallAsAttribute(auditLog, writer);
if (auditLog.hasDefined(HANDLER) && auditLog.get(HANDLER).keys().size() > 0) {
writer.writeStartElement(CommonAttributes.HANDLERS);
for (String key : auditLog.get(HANDLER).keys()) {
writer.writeEmptyElement(CommonAttributes.HANDLER);
writer.writeAttribute(CommonAttributes.NAME, key);
}
writer.writeEndElement();
}
writer.writeEndElement();
}
if (node.hasDefined(JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.getName())) {
writer.writeStartElement(CommonAttributes.SENSITIVITY);
JMXSubsystemRootResource.CORE_MBEAN_SENSITIVITY.marshallAsAttribute(node, writer);
writer.writeEndElement();
}
writer.writeEndElement();
}
示例15: writeContent
import org.jboss.as.controller.persistence.SubsystemMarshallingContext; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
ModelNode scanners = context.getModelNode();
for (final Property list : scanners.asPropertyList()) {
final ModelNode node = list.getValue();
for (final Property scanner : node.asPropertyList()) {
writer.writeEmptyElement(CommonAttributes.DEPLOYMENT_SCANNER);
writer.writeAttribute(CommonAttributes.NAME, scanner.getName());
ModelNode configuration = scanner.getValue();
if (configuration.hasDefined(PATH)) {
writer.writeAttribute(PATH, configuration.get(PATH)
.asString());
}
if (configuration.hasDefined(CommonAttributes.SCAN_ENABLED)) {
writer.writeAttribute(CommonAttributes.SCAN_ENABLED,
configuration.get(CommonAttributes.SCAN_ENABLED).asString());
}
if (configuration.hasDefined(CommonAttributes.SCAN_INTERVAL)) {
writer.writeAttribute(CommonAttributes.SCAN_INTERVAL,
configuration.get(CommonAttributes.SCAN_INTERVAL).asString());
}
if (configuration.hasDefined(CommonAttributes.RELATIVE_TO)) {
writer.writeAttribute(CommonAttributes.RELATIVE_TO,
configuration.get(CommonAttributes.RELATIVE_TO).asString());
}
if (configuration.hasDefined(CommonAttributes.AUTO_DEPLOY_ZIPPED)) {
if (!configuration.get(CommonAttributes.AUTO_DEPLOY_ZIPPED).asBoolean()) {
writer.writeAttribute(CommonAttributes.AUTO_DEPLOY_ZIPPED, Boolean.FALSE.toString());
}
}
if (configuration.hasDefined(CommonAttributes.AUTO_DEPLOY_EXPLODED)) {
if (configuration.get(CommonAttributes.AUTO_DEPLOY_EXPLODED).asBoolean()) {
writer.writeAttribute(CommonAttributes.AUTO_DEPLOY_EXPLODED, Boolean.TRUE.toString());
}
}
if (configuration.hasDefined(CommonAttributes.DEPLOYMENT_TIMEOUT)) {
writer.writeAttribute(CommonAttributes.DEPLOYMENT_TIMEOUT, configuration.get(CommonAttributes.DEPLOYMENT_TIMEOUT).asString());
}
}
writer.writeEndElement();
}
}