private void readElement_2_0(Namespace namespace, XMLExtendedStreamReader reader, List<ModelNode> nodes) throws XMLStreamException { readElement_1_4(namespace, reader, nodes); }
@Override public void registerOperations(ManagementResourceRegistration resourceRegistration) { super.registerOperations(resourceRegistration); MigrateOperation.registerOperation(resourceRegistration, getResourceDescriptionResolver()); } }
/** * <p> * Writes the {@code interop} section of the JacORB subsystem configuration using the contents of the provided * {@code ModelNode}. * </p> * * @param writer the {@code XMLExtendedStreamWriter} used to write the configuration XML. * @param node the {@code ModelNode} that contains the interoperability configuration properties. * @throws XMLStreamException if an error occurs while writing the interop configuration. */ private void writeInteropConfig(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException { boolean writeInterop = this.isWritable(node, JacORBSubsystemDefinitions.INTEROP_ATTRIBUTES); if (writeInterop) { writer.writeEmptyElement(JacORBSubsystemConstants.INTEROP); this.writeAttributes(writer, node, JacORBSubsystemDefinitions.INTEROP_ATTRIBUTES); } }
@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 }
if (namespace != Namespace.forUri(reader.getNamespaceURI())) throw unexpectedElement(reader); final Element element = Element.forName(reader.getLocalName()); switch (element) { case PROPERTY: { this.parseGenericProperty(reader, node.get(JacORBSubsystemConstants.PROPERTIES)); break;
private IORTransportConfigDefinition() { super(PathElement.pathElement(JacORBSubsystemConstants.SETTING, JacORBSubsystemConstants.IOR_TRANSPORT_CONFIG), JacORBExtension.getResourceDescriptionResolver(JacORBSubsystemConstants.IOR_SETTINGS, JacORBSubsystemConstants.IOR_TRANSPORT_CONFIG), new ReloadRequiredAddStepHandler(ATTRIBUTES), ReloadRequiredRemoveStepHandler.INSTANCE); }
@Override public void registerAttributes(final ManagementResourceRegistration registry) { OperationStepHandler attributeHander = new JacorbReloadRequiredWriteAttributeHandler( JacORBSubsystemDefinitions.SUBSYSTEM_ATTRIBUTES); for (AttributeDefinition attr : JacORBSubsystemDefinitions.SUBSYSTEM_ATTRIBUTES) { registry.registerReadWriteAttribute(attr, null, attributeHander); } }
@Override protected void initializeLegacyParsers(ExtensionParsingContext context) { context.setSubsystemXmlMapping(SUBSYSTEM_NAME, JacORBSubsystemParser.Namespace.JacORB_1_0.getUriString(), () -> PARSER); context.setSubsystemXmlMapping(SUBSYSTEM_NAME, JacORBSubsystemParser.Namespace.JacORB_1_1.getUriString(), () -> PARSER); context.setSubsystemXmlMapping(SUBSYSTEM_NAME, JacORBSubsystemParser.Namespace.JacORB_1_2.getUriString(), () -> PARSER); context.setSubsystemXmlMapping(SUBSYSTEM_NAME, JacORBSubsystemParser.Namespace.JacORB_1_3.getUriString(), () -> PARSER); context.setSubsystemXmlMapping(SUBSYSTEM_NAME, JacORBSubsystemParser.Namespace.JacORB_1_4.getUriString(), () -> PARSER); context.setSubsystemXmlMapping(SUBSYSTEM_NAME, JacORBSubsystemParser.Namespace.JacORB_2_0.getUriString(), () -> PARSER); }
@Override protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode legacyModel) throws OperationFailedException { printJacORBEmulationWarningMessage(); super.performRuntime(context, operation, legacyModel); }
/** * <p> * Parses the {@code naming} section of the JacORB subsystem configuration. * </p> * * @param reader the {@code XMLExtendedStreamReader} used to read the configuration XML. * @param node the {@code ModelNode} that will hold the parsed interoperability configuration. * @throws javax.xml.stream.XMLStreamException * if an error occurs while parsing the XML. */ private void parseNamingConfig(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException { // parse all naming attributes. EnumSet<Attribute> expectedAttributes = EnumSet.of(Attribute.NAMING_ROOT_CONTEXT, Attribute.NAMING_EXPORT_CORBALOC); this.parseAttributes(reader, node, expectedAttributes, null); // the naming element doesn't have child elements. requireNoContent(reader); }
@Override public void writeContent(final XMLExtendedStreamWriter xmlExtendedStreamWriter, final ModelNode modelNode) throws XMLStreamException { ModelNode model = new ModelNode(); model.get(IORSettingsDefinition.INSTANCE.getPathElement().getKeyValuePair()).set(modelNode); xmlDescription.persist(xmlExtendedStreamWriter, model); } }
@Override public void readElement(final XMLExtendedStreamReader xmlExtendedStreamReader, final List<ModelNode> modelNodes) throws XMLStreamException { xmlDescription.parse(xmlExtendedStreamReader, PathAddress.pathAddress(JacORBSubsystemResource.INSTANCE.getPathElement()), modelNodes); }
@Override protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION); final ManagementResourceRegistration subsystemRegistration = subsystem.registerSubsystemModel(JacORBSubsystemResource.INSTANCE); subsystem.registerXMLElementWriter(PARSER); if (context.isRegisterTransformers()) { // Register the model transformers registerTransformers(subsystem); } return Collections.singleton(subsystemRegistration); }
static void registerOperation(final ManagementResourceRegistration registry, final ResourceDescriptionResolver resourceDescriptionResolver) { registry.registerOperationHandler(new SimpleOperationDefinitionBuilder(MIGRATE, resourceDescriptionResolver) .setReplyParameters(MIGRATION_WARNINGS_ATTR, MIGRATION_ERROR_ATTR) .build(), new MigrateOperation(false)); registry.registerOperationHandler(new SimpleOperationDefinitionBuilder(DESCRIBE_MIGRATION, resourceDescriptionResolver) .setReplyParameters(MIGRATION_WARNINGS_ATTR, MIGRATION_ERROR_ATTR) .setReadOnly() .build(), new MigrateOperation(true)); }
/** * <p> * Writes the {@code naming} section of the JacORB subsystem configuration using the contents of the provided * {@code ModelNode}. * </p> * * @param writer the {@code XMLExtendedStreamWriter} used to write the configuration XML. * @param node the {@code ModelNode} that contains the naming configuration properties. * @throws XMLStreamException if an error occurs while writing the interop configuration. */ private void writeNamingConfig(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException { boolean writeNaming = this.isWritable(node, JacORBSubsystemDefinitions.NAMING_ATTRIBUTES); if (writeNaming) { writer.writeEmptyElement(JacORBSubsystemConstants.NAMING); this.writeAttributes(writer, node, JacORBSubsystemDefinitions.NAMING_ATTRIBUTES); } }
private IORSASContextDefinition() { super(PathElement.pathElement(JacORBSubsystemConstants.SETTING, JacORBSubsystemConstants.IOR_SAS_CONTEXT), JacORBExtension.getResourceDescriptionResolver(JacORBSubsystemConstants.IOR_SETTINGS, JacORBSubsystemConstants.IOR_SAS_CONTEXT), new ReloadRequiredAddStepHandler(ATTRIBUTES), ReloadRequiredRemoveStepHandler.INSTANCE); }
/** * <p> * Writes the {@code security} section of the JacORB subsystem configuration using the contents of the provided * {@code ModelNode}. * </p> * * @param writer the {@code XMLExtendedStreamWriter} used to write the configuration XML. * @param node the {@code ModelNode} that contains the security configuration properties. * @throws XMLStreamException if an error occurs while writing the security configuration. */ private void writeSecurityConfig(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException { boolean writeSecurity = this.isWritable(node, JacORBSubsystemDefinitions.SECURITY_ATTRIBUTES); if (writeSecurity) { writer.writeEmptyElement(SECURITY); this.writeAttributes(writer, node, JacORBSubsystemDefinitions.SECURITY_ATTRIBUTES); } }
private IORASContextDefinition() { super(PathElement.pathElement(JacORBSubsystemConstants.SETTING, JacORBSubsystemConstants.IOR_AS_CONTEXT), JacORBExtension.getResourceDescriptionResolver(JacORBSubsystemConstants.IOR_SETTINGS, JacORBSubsystemConstants.IOR_AS_CONTEXT), new ReloadRequiredAddStepHandler(ATTRIBUTES), ReloadRequiredRemoveStepHandler.INSTANCE); }
private IORSettingsDefinition() { super(PathElement.pathElement(JacORBSubsystemConstants.IOR_SETTINGS, JacORBSubsystemConstants.DEFAULT), JacORBExtension.getResourceDescriptionResolver(JacORBSubsystemConstants.IOR_SETTINGS), new ReloadRequiredAddStepHandler(), ReloadRequiredRemoveStepHandler.INSTANCE); }
private JacORBSubsystemResource() { super(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, JacORBExtension.SUBSYSTEM_NAME), JacORBExtension .getResourceDescriptionResolver(), JacORBSubsystemAdd.INSTANCE, ReloadRequiredRemoveStepHandler.INSTANCE, null, null, new DeprecationData((JacORBExtension.DEPRECATED_SINCE))); }