本文整理了Java中org.jboss.as.controller.parsing.Element.getLocalName()
方法的一些代码示例,展示了Element.getLocalName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getLocalName()
方法的具体详情如下:
包路径:org.jboss.as.controller.parsing.Element
类名称:Element
方法名:getLocalName
[英]Get the local name of this element.
[中]获取此元素的本地名称。
代码示例来源:origin: wildfly/wildfly
@Override
public void marshallAsElement(AttributeDefinition attribute, ModelNode model, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
if (model.hasDefined(attribute.getName())) {
for (Property property : model.get(attribute.getName()).asPropertyList()) {
writer.writeStartElement(Element.PROPERTY.getLocalName());
writer.writeAttribute(Element.NAME.getLocalName(), property.getName());
writer.writeCharacters(property.getValue().asString());
writer.writeEndElement();
}
}
}
};
代码示例来源:origin: org.wildfly.core/wildfly-controller
public static void writeElement(final XMLExtendedStreamWriter writer, final Element element) throws XMLStreamException {
writer.writeStartElement(element.getLocalName());
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void writeConfigurationChanges(XMLExtendedStreamWriter writer, ModelNode configurationChanges) throws XMLStreamException {
writer.writeStartElement(Element.CONFIGURATION_CHANGES.getLocalName());
LegacyConfigurationChangeResourceDefinition.MAX_HISTORY.marshallAsAttribute(configurationChanges, writer);
writer.writeEndElement();
}
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
private void writeServerGroupDeployments(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
final Set<String> deploymentNames = modelNode.keys();
if (deploymentNames.size() > 0) {
writer.writeStartElement(Element.DEPLOYMENTS.getLocalName());
for (String uniqueName : deploymentNames) {
final ModelNode deployment = modelNode.get(uniqueName);
writer.writeStartElement(Element.DEPLOYMENT.getLocalName());
WriteUtils.writeAttribute(writer, Attribute.NAME, uniqueName);
DeploymentAttributes.RUNTIME_NAME.marshallAsAttribute(deployment, writer);
DeploymentAttributes.ENABLED.marshallAsAttribute(deployment, writer);
writer.writeEndElement();
}
writer.writeEndElement();
}
}
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
private void writeDiscoveryOptionProperties(XMLExtendedStreamWriter writer, ModelNode discoveryOptionProperties) throws XMLStreamException {
for (String property : discoveryOptionProperties.keys()) {
writer.writeStartElement(Element.PROPERTY.getLocalName());
WriteUtils.writeAttribute(writer, Attribute.NAME, property);
WriteUtils.writeAttribute(writer, Attribute.VALUE, discoveryOptionProperties.get(property).asString());
writer.writeEndElement();
}
}
代码示例来源:origin: org.wildfly.core/wildfly-domain-management
private void writeIdentity(XMLExtendedStreamWriter writer, ModelNode identity) throws XMLStreamException {
writer.writeStartElement(Element.IDENTITY.getLocalName());
AccessIdentityResourceDefinition.SECURITY_DOMAIN.marshallAsAttribute(identity, writer);
writer.writeEndElement();
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
resourceModel = resourceModel.get(attribute.getXmlName());
writer.writeStartElement(attribute.getName());
final List<Property> properties = resourceModel.asPropertyList();
for (Property property: properties) {
writer.writeStartElement(org.jboss.as.controller.parsing.Element.PROPERTY.getLocalName());
writer.writeAttribute(org.jboss.as.controller.parsing.Attribute.NAME.getLocalName(), property.getName());
writer.writeCharacters(property.getValue().asString());
writer.writeEndElement();
}
writer.writeEndElement();
}
代码示例来源:origin: org.jboss.as/jboss-as-server
protected static void writeElement(final XMLExtendedStreamWriter writer, final Element element) throws XMLStreamException {
writer.writeStartElement(element.getLocalName());
}
代码示例来源:origin: org.wildfly.core/wildfly-host-controller
private void writeServerGroupDeployments(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
final Set<String> deploymentNames = modelNode.keys();
if (deploymentNames.size() > 0) {
writer.writeStartElement(Element.DEPLOYMENTS.getLocalName());
for (String uniqueName : deploymentNames) {
final ModelNode deployment = modelNode.get(uniqueName);
writer.writeStartElement(Element.DEPLOYMENT.getLocalName());
WriteUtils.writeAttribute(writer, Attribute.NAME, uniqueName);
DeploymentAttributes.RUNTIME_NAME.marshallAsAttribute(deployment, writer);
DeploymentAttributes.ENABLED.marshallAsAttribute(deployment, writer);
writer.writeEndElement();
}
writer.writeEndElement();
}
}
代码示例来源:origin: wildfly/wildfly-core
private void writeConfigurationChanges(XMLExtendedStreamWriter writer, ModelNode configurationChanges) throws XMLStreamException {
writer.writeStartElement(Element.CONFIGURATION_CHANGES.getLocalName());
LegacyConfigurationChangeResourceDefinition.MAX_HISTORY.marshallAsAttribute(configurationChanges, writer);
writer.writeEndElement();
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
resourceModel = resourceModel.get(attribute.getXmlName());
writer.writeStartElement(attribute.getName());
final List<Property> properties = resourceModel.asPropertyList();
for (Property property: properties) {
writer.writeStartElement(org.jboss.as.controller.parsing.Element.PROPERTY.getLocalName());
writer.writeAttribute(org.jboss.as.controller.parsing.Attribute.NAME.getLocalName(), property.getName());
writer.writeCharacters(property.getValue().asString());
writer.writeEndElement();
}
writer.writeEndElement();
}
代码示例来源:origin: org.jboss.as/jboss-as-host-controller
private void writeServerGroupDeployments(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
final Set<String> deploymentNames = modelNode.keys();
if (deploymentNames.size() > 0) {
writer.writeStartElement(Element.DEPLOYMENTS.getLocalName());
for (String uniqueName : deploymentNames) {
final ModelNode deployment = modelNode.get(uniqueName);
writer.writeStartElement(Element.DEPLOYMENT.getLocalName());
writeAttribute(writer, Attribute.NAME, uniqueName);
DeploymentAttributes.RUNTIME_NAME.marshallAsAttribute(deployment, writer);
DeploymentAttributes.ENABLED.marshallAsAttribute(deployment, writer);
writer.writeEndElement();
}
writer.writeEndElement();
}
}
代码示例来源:origin: wildfly/wildfly-core
private void writeIdentity(XMLExtendedStreamWriter writer, ModelNode identity) throws XMLStreamException {
writer.writeStartElement(Element.IDENTITY.getLocalName());
AccessIdentityResourceDefinition.SECURITY_DOMAIN.marshallAsAttribute(identity, writer);
writer.writeEndElement();
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Override
public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
resourceModel = resourceModel.get(attribute.getXmlName());
writer.writeStartElement(attribute.getName());
final List<Property> properties = resourceModel.asPropertyList();
for (Property property: properties) {
writer.writeStartElement(org.jboss.as.controller.parsing.Element.PROPERTY.getLocalName());
writer.writeAttribute(org.jboss.as.controller.parsing.Attribute.NAME.getLocalName(), property.getName());
writer.writeCharacters(property.getValue().asString());
writer.writeEndElement();
}
writer.writeEndElement();
}
}
代码示例来源:origin: wildfly/wildfly-core
private void writeDiscoveryOptionProperties(XMLExtendedStreamWriter writer, ModelNode discoveryOptionProperties) throws XMLStreamException {
for (String property : discoveryOptionProperties.keys()) {
writer.writeStartElement(Element.PROPERTY.getLocalName());
WriteUtils.writeAttribute(writer, Attribute.NAME, property);
WriteUtils.writeAttribute(writer, Attribute.VALUE, discoveryOptionProperties.get(property).asString());
writer.writeEndElement();
}
}
代码示例来源:origin: org.jboss.as/jboss-as-controller
public void writeExtensions(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
Set<String> keys = modelNode.keys();
if (keys.size() > 0) {
writer.writeStartElement(Element.EXTENSIONS.getLocalName());
for (final String extension : keys) {
writer.writeEmptyElement(Element.EXTENSION.getLocalName());
writer.writeAttribute(Attribute.MODULE.getLocalName(), extension);
}
writer.writeEndElement();
}
}
代码示例来源:origin: org.infinispan.server/infinispan-server-commons
@Override
public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
ModelNode properties = resourceModel.get(attribute.getName());
if (properties.isDefined()) {
for (Property property : properties.asPropertyList()) {
writer.writeStartElement(org.jboss.as.controller.parsing.Element.PROPERTY.getLocalName());
writer.writeAttribute(org.jboss.as.controller.parsing.Element.NAME.getLocalName(), property.getName());
writer.writeCharacters(property.getValue().asString());
writer.writeEndElement();
}
}
}
};
代码示例来源:origin: wildfly/wildfly-core
private void writeServerGroupDeployments(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
final Set<String> deploymentNames = modelNode.keys();
if (deploymentNames.size() > 0) {
writer.writeStartElement(Element.DEPLOYMENTS.getLocalName());
for (String uniqueName : deploymentNames) {
final ModelNode deployment = modelNode.get(uniqueName);
writer.writeStartElement(Element.DEPLOYMENT.getLocalName());
WriteUtils.writeAttribute(writer, Attribute.NAME, uniqueName);
DeploymentAttributes.RUNTIME_NAME.marshallAsAttribute(deployment, writer);
DeploymentAttributes.ENABLED.marshallAsAttribute(deployment, writer);
writer.writeEndElement();
}
writer.writeEndElement();
}
}
代码示例来源:origin: org.wildfly/wildfly-controller
public void writeExtensions(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
Set<String> keys = modelNode.keys();
if (keys.size() > 0) {
writer.writeStartElement(Element.EXTENSIONS.getLocalName());
for (final String extension : keys) {
writer.writeEmptyElement(Element.EXTENSION.getLocalName());
writer.writeAttribute(Attribute.MODULE.getLocalName(), extension);
}
writer.writeEndElement();
}
}
代码示例来源:origin: org.jboss.eap/wildfly-clustering-common
@Override
public void marshallAsElement(AttributeDefinition attribute, ModelNode model, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException {
if (model.hasDefined(attribute.getName())) {
for (Property property : model.get(attribute.getName()).asPropertyList()) {
writer.writeStartElement(Element.PROPERTY.getLocalName());
writer.writeAttribute(Element.NAME.getLocalName(), property.getName());
writer.writeCharacters(property.getValue().asString());
writer.writeEndElement();
}
}
}
};
内容来源于网络,如有侵权,请联系作者删除!