Java Code Examples for org.jboss.as.controller.AttributeDefinition#equals()
The following examples show how to use
org.jboss.as.controller.AttributeDefinition#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BpmPlatformParser.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
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(); } }
Example 2
Source File: BpmPlatformParser.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
protected void writeJobAcquisitionsContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context, ModelNode parentNode) throws XMLStreamException { writer.writeStartElement(Element.JOB_AQUISITIONS.getLocalName()); ModelNode jobAcquisitionConfigurations = parentNode.get(Element.JOB_AQUISITIONS.getLocalName()); if (jobAcquisitionConfigurations.isDefined()) { for (Property property : jobAcquisitionConfigurations.asPropertyList()) { // write each child element to xml writer.writeStartElement(Element.JOB_AQUISITION.getLocalName()); for (AttributeDefinition jobAcquisitionAttribute : SubsystemAttributeDefinitons.JOB_ACQUISITION_ATTRIBUTES) { if (jobAcquisitionAttribute.equals(SubsystemAttributeDefinitons.NAME)) { ((SimpleAttributeDefinition) jobAcquisitionAttribute).marshallAsAttribute(property.getValue(), writer); } else { jobAcquisitionAttribute.marshallAsElement(property.getValue(), writer); } } writer.writeEndElement(); } } // end job-acquisitions writer.writeEndElement(); }
Example 3
Source File: BpmPlatformParser1_1.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
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(); } }
Example 4
Source File: BpmPlatformParser1_1.java From camunda-bpm-platform with Apache License 2.0 | 6 votes |
protected void writeJobAcquisitionsContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context, ModelNode parentNode) throws XMLStreamException { writer.writeStartElement(Element.JOB_AQUISITIONS.getLocalName()); ModelNode jobAcquisitionConfigurations = parentNode.get(Element.JOB_AQUISITIONS.getLocalName()); if (jobAcquisitionConfigurations.isDefined()) { for (Property property : jobAcquisitionConfigurations.asPropertyList()) { // write each child element to xml writer.writeStartElement(Element.JOB_AQUISITION.getLocalName()); for (AttributeDefinition jobAcquisitionAttribute : SubsystemAttributeDefinitons.JOB_ACQUISITION_ATTRIBUTES) { if (jobAcquisitionAttribute.equals(SubsystemAttributeDefinitons.NAME)) { ((SimpleAttributeDefinition) jobAcquisitionAttribute).marshallAsAttribute(property.getValue(), writer); } else { jobAcquisitionAttribute.marshallAsElement(property.getValue(), writer); } } writer.writeEndElement(); } } // end job-acquisitions writer.writeEndElement(); }
Example 5
Source File: BaseHttpInterfaceResourceDefinition.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { AttributeDefinition[] attributeDefinitions = getAttributeDefinitions(); OperationStepHandler defaultWriteHandler = new ManagementWriteAttributeHandler(attributeDefinitions, getValidationConsumer()); for (AttributeDefinition attr : attributeDefinitions) { if (attr.equals(HTTP_UPGRADE_ENABLED)) { HttpUpgradeAttributeHandler handler = new HttpUpgradeAttributeHandler(); resourceRegistration.registerReadWriteAttribute(attr, handler, handler); } else { resourceRegistration.registerReadWriteAttribute(attr, null, defaultWriteHandler); } } }
Example 6
Source File: BpmPlatformParser.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
protected void writeProcessEnginesContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { writer.writeStartElement(Element.PROCESS_ENGINES.getLocalName()); ModelNode node = context.getModelNode(); ModelNode processEngineConfigurations = node.get(Element.PROCESS_ENGINES.getLocalName()); if (processEngineConfigurations.isDefined()) { for (Property property : processEngineConfigurations.asPropertyList()) { // write each child element to xml writer.writeStartElement(Element.PROCESS_ENGINE.getLocalName()); ModelNode propertyValue = property.getValue(); for (AttributeDefinition processEngineAttribute : SubsystemAttributeDefinitons.PROCESS_ENGINE_ATTRIBUTES) { if (processEngineAttribute.equals(SubsystemAttributeDefinitons.NAME) || processEngineAttribute.equals(SubsystemAttributeDefinitons.DEFAULT)) { ((SimpleAttributeDefinition) processEngineAttribute).marshallAsAttribute(propertyValue, writer); } else { processEngineAttribute.marshallAsElement(propertyValue, writer); } } writer.writeEndElement(); } } // end process-engines writer.writeEndElement(); }
Example 7
Source File: BpmPlatformParser1_1.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
protected void writeProcessEnginesContent(final XMLExtendedStreamWriter writer, final SubsystemMarshallingContext context) throws XMLStreamException { writer.writeStartElement(Element.PROCESS_ENGINES.getLocalName()); ModelNode node = context.getModelNode(); ModelNode processEngineConfigurations = node.get(Element.PROCESS_ENGINES.getLocalName()); if (processEngineConfigurations.isDefined()) { for (Property property : processEngineConfigurations.asPropertyList()) { // write each child element to xml writer.writeStartElement(Element.PROCESS_ENGINE.getLocalName()); ModelNode propertyValue = property.getValue(); for (AttributeDefinition processEngineAttribute : SubsystemAttributeDefinitons.PROCESS_ENGINE_ATTRIBUTES) { if (processEngineAttribute.equals(SubsystemAttributeDefinitons.NAME) || processEngineAttribute.equals(SubsystemAttributeDefinitons.DEFAULT)) { ((SimpleAttributeDefinition) processEngineAttribute).marshallAsAttribute(propertyValue, writer); } else { processEngineAttribute.marshallAsElement(propertyValue, writer); } } writer.writeEndElement(); } } // end process-engines writer.writeEndElement(); }