org.jboss.as.controller.parsing.ExtensionParsingContext Java Examples

The following examples show how to use org.jboss.as.controller.parsing.ExtensionParsingContext. 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: ElytronExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_1_0, () -> new ElytronSubsystemParser1_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_1_1, () -> new ElytronSubsystemParser1_1());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_1_2, () -> new ElytronSubsystemParser1_2());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_2_0, () -> new ElytronSubsystemParser2_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_3_0, () -> new ElytronSubsystemParser3_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_4_0, () -> new ElytronSubsystemParser4_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_5_0, () -> new ElytronSubsystemParser5_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_6_0, () -> new ElytronSubsystemParser6_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_7_0, () -> new ElytronSubsystemParser7_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_8_0, () -> new ElytronSubsystemParser8_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_9_0, () -> new ElytronSubsystemParser9_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_10_0, () -> new ElytronSubsystemParser10_0());
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_11_0, () -> new ElytronSubsystemParser11_0());
}
 
Example #2
Source File: RemotingExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.REMOTING_1_0.getUriString(), RemotingSubsystem10Parser::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.REMOTING_1_1.getUriString(), RemotingSubsystem11Parser::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.REMOTING_1_2.getUriString(), RemotingSubsystem12Parser::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.REMOTING_2_0.getUriString(), RemotingSubsystem20Parser::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.REMOTING_3_0.getUriString(), RemotingSubsystem30Parser::new);
    // For the current version we don't use a Supplier as we want its description initialized
    // TODO if any new xsd versions are added, use a Supplier for the old version
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.REMOTING_4_0.getUriString(), new RemotingSubsystem40Parser());

    // For servers only as a migration aid we'll install io if it is missing.
    // It is invalid to do this on an HC as the HC needs to support profiles running legacy
    // slaves that will not understand the io extension
    // See also WFCORE-778 and the description of the pull request for it
    if (context.getProcessType().isServer()) {
        context.setProfileParsingCompletionHandler(new IOCompletionHandler());
    }
}
 
Example #3
Source File: LoggingExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
public void initializeParsers(final ExtensionParsingContext context) {
    setParser(context, Namespace.LOGGING_1_0, new LoggingSubsystemParser_1_0());
    setParser(context, Namespace.LOGGING_1_1, new LoggingSubsystemParser_1_1());
    setParser(context, Namespace.LOGGING_1_2, new LoggingSubsystemParser_1_2());
    setParser(context, Namespace.LOGGING_1_3, new LoggingSubsystemParser_1_3());
    setParser(context, Namespace.LOGGING_1_4, new LoggingSubsystemParser_1_4());
    setParser(context, Namespace.LOGGING_1_5, new LoggingSubsystemParser_1_5());
    setParser(context, Namespace.LOGGING_2_0, new LoggingSubsystemParser_2_0());
    setParser(context, Namespace.LOGGING_3_0, new LoggingSubsystemParser_3_0());
    setParser(context, Namespace.LOGGING_4_0, new LoggingSubsystemParser_4_0());
    setParser(context, Namespace.LOGGING_5_0, new LoggingSubsystemParser_5_0());
    setParser(context, Namespace.LOGGING_6_0, new LoggingSubsystemParser_6_0());
    setParser(context, Namespace.LOGGING_7_0, new LoggingSubsystemParser_7_0());
    setParser(context, Namespace.LOGGING_8_0, new LoggingSubsystemParser_8_0());

    // Hack to ensure the Element and Attribute enums are loaded during this call which
    // is part of concurrent boot. These enums trigger a lot of classloading and static
    // initialization that we don't want deferred until the single-threaded parsing phase
    if (Element.forName("").equals(Attribute.forName(""))) { // never true
        throw new IllegalStateException();
    }
}
 
Example #4
Source File: KeycloakSamlExtension.java    From keycloak with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initializeParsers(final ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, KeycloakSamlExtension.NAMESPACE_1_1, PARSER);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, KeycloakSamlExtension.NAMESPACE_1_2, PARSER);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, KeycloakSamlExtension.NAMESPACE_1_3, PARSER);
}
 
Example #5
Source File: KeycloakSamlExtension.java    From keycloak with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initializeParsers(final ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, KeycloakSamlExtension.NAMESPACE_1_1, PARSER);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, KeycloakSamlExtension.NAMESPACE_1_2, PARSER);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, KeycloakSamlExtension.NAMESPACE_1_3, PARSER);
}
 
Example #6
Source File: AbstractLegacyExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {

    if (context.getProcessType() == ProcessType.DOMAIN_SERVER) {
        // Do nothing. This allows the extension=cmp:add op that's really targeted
        // to legacy servers to work
        return;
    } else if (context.getProcessType() == ProcessType.STANDALONE_SERVER && context.getRunningMode() != RunningMode.ADMIN_ONLY) {
        throw new UnsupportedOperationException(ControllerLogger.ROOT_LOGGER.unsupportedLegacyExtension(extensionName));
    }

    initializeLegacyParsers(context);
}
 
Example #7
Source File: IOExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.IO_1_0.getUriString(), IOSubsystemParser_1_0::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.IO_1_1.getUriString(), IOSubsystemParser_1_1::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.IO_2_0.getUriString(), IOSubsystemParser_2_0::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.IO_3_0.getUriString(), new IOSubsystemParser_3_0());
}
 
Example #8
Source File: TestExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, "urn:jboss:domain:test-extension:1.0", new XMLElementReader<List<ModelNode>>() {

        @Override
        public void readElement(XMLExtendedStreamReader reader, List<ModelNode> value) throws XMLStreamException {
        }
    });
}
 
Example #9
Source File: DeploymentScannerExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.DEPLOYMENT_SCANNER_1_0.getUriString(), DeploymentScannerParser_1_0::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.DEPLOYMENT_SCANNER_1_1.getUriString(), DeploymentScannerParser_1_1::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.DEPLOYMENT_SCANNER_2_0.getUriString(), DeploymentScannerParser_2_0::new);

}
 
Example #10
Source File: SubsystemTestDelegate.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private ExtensionRegistry cloneExtensionRegistry(AdditionalInitialization additionalInit) {
    final ExtensionRegistry clone = new ExtensionRegistry(additionalInit.getProcessType(), new RunningModeControl(additionalInit.getExtensionRegistryRunningMode()), null, null, null, RuntimeHostControllerInfoAccessor.SERVER);
    for (String extension : extensionParsingRegistry.getExtensionModuleNames()) {
        ExtensionParsingContext epc = clone.getExtensionParsingContext(extension, null);
        for (Map.Entry<String, SubsystemInformation> entry : extensionParsingRegistry.getAvailableSubsystems(extension).entrySet()) {
            for (String namespace : entry.getValue().getXMLNamespaces()) {
                epc.setSubsystemXmlMapping(entry.getKey(), namespace, (XMLElementReader) null);
            }
        }
    }

    return clone;
}
 
Example #11
Source File: JMXExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.JMX_1_0.getUriString(), JMXSubsystemParser_1_0::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.JMX_1_1.getUriString(), JMXSubsystemParser_1_1::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.JMX_1_2.getUriString(), JMXSubsystemParser_1_2::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.JMX_1_3.getUriString(), JMXSubsystemParser_1_3::new);
}
 
Example #12
Source File: DependencySubsystemExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE, parser);
}
 
Example #13
Source File: BpmPlatformExtension.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
  context.setSubsystemXmlMapping(ModelConstants.SUBSYSTEM_NAME, Namespace.CAMUNDA_BPM_PLATFORM_1_1.getUriString(), parser);
}
 
Example #14
Source File: GmlcExtension.java    From gmlc with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
  context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.CURRENT.getUriString(), GmlcSubsystemParser.getInstance());
}
 
Example #15
Source File: SecurityManagerExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(final ExtensionParsingContext context) {
    // For the current version we don't use a Supplier as we want its description initialized
    // TODO if any new xsd versions are added, use a Supplier for the old version
    context.setSubsystemXmlMapping(Constants.SUBSYSTEM_NAME, Namespace.SECURITY_MANAGER_1_0.getUriString(), new SecurityManagerSubsystemParser_1_0());
}
 
Example #16
Source File: ThreadsExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
protected void initializeLegacyParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.CURRENT.getUriString(), ThreadsParser2_0::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.THREADS_1_1.getUriString(), ThreadsParser::new);
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.THREADS_1_0.getUriString(), ThreadsParser::new);
}
 
Example #17
Source File: ValidateSubsystemExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE, parser);
}
 
Example #18
Source File: VersionedExtensionCommon.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, EXTENSION_NAME, parser);
}
 
Example #19
Source File: OldExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, EXTENSION_NAME, EmptyParser::new);
}
 
Example #20
Source File: NewExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, EXTENSION_NAME, parser);
}
 
Example #21
Source File: MainSubsystemExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE, () -> parser);
}
 
Example #22
Source File: BpmPlatformExtension.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void initializeParsers(ExtensionParsingContext context) {
  context.setSubsystemXmlMapping(ModelConstants.SUBSYSTEM_NAME, Namespace.CAMUNDA_BPM_PLATFORM_1_1.getUriString(), parser);
}
 
Example #23
Source File: OtherServicesSubsystemExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE, parser);
}
 
Example #24
Source File: SimpleSubsystemExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE, parser);
}
 
Example #25
Source File: CoreManagementExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    // For the current version we don't use a Supplier as we want its description initialized
    // TODO if any new xsd versions are added, use a Supplier for the old version
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, CoreManagementSubsystemParser_1_0.NAMESPACE, new CoreManagementSubsystemParser_1_0());
}
 
Example #26
Source File: CamelExtension.java    From wildfly-camel with Apache License 2.0 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.VERSION_1_0.getUriString(), CamelSubsystemParser.INSTANCE);
}
 
Example #27
Source File: KeycloakExtension.java    From keycloak with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initializeParsers(final ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, KeycloakExtension.NAMESPACE, PARSER);
}
 
Example #28
Source File: KeycloakExtension.java    From keycloak with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initializeParsers(final ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, KeycloakExtension.NAMESPACE, PARSER);
}
 
Example #29
Source File: KeycloakExtension.java    From keycloak with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initializeParsers(final ExtensionParsingContext context) {
    context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE, PARSER);
}
 
Example #30
Source File: TestExtension.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void initializeParsers(ExtensionParsingContext context) {
    context.setSubsystemXmlMapping("1", parserOne.getNamespace(), parserOne);
    context.setSubsystemXmlMapping("2", parserTwo.getNamespace(), parserTwo);
}