use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class SecurityExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(SecuritySubsystemRootResourceDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
final ManagementResourceRegistration securityDomain = registration.registerSubModel(new SecurityDomainResourceDefinition(registerRuntimeOnly));
securityDomain.registerSubModel(JASPIAuthenticationResourceDefinition.INSTANCE);
securityDomain.registerSubModel(ClassicAuthenticationResourceDefinition.INSTANCE);
securityDomain.registerSubModel(AuthorizationResourceDefinition.INSTANCE);
securityDomain.registerSubModel(MappingResourceDefinition.INSTANCE);
securityDomain.registerSubModel(ACLResourceDefinition.INSTANCE);
securityDomain.registerSubModel(AuditResourceDefinition.INSTANCE);
securityDomain.registerSubModel(IdentityTrustResourceDefinition.INSTANCE);
securityDomain.registerSubModel(JSSEResourceDefinition.INSTANCE);
registration.registerSubModel(VaultResourceDefinition.INSTANCE);
// register the elytron integration resources.
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronRealmResourceDefinition());
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronKeyStoreResourceDefinition());
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronTrustStoreResourceDefinition());
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronKeyManagersResourceDefinition());
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronTrustManagersResourceDefinition());
// register the subsystem XML persister.
subsystem.registerXMLElementWriter(SecuritySubsystemPersister.INSTANCE);
if (context.isRegisterTransformers()) {
registerTransformers(subsystem);
}
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class RTSSubsystemExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(RTSSubsystemDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class SarExtension method initialize.
/** {@inheritDoc} */
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(RESOURCE_DEFINITION);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class TransactionExtension method initialize.
/**
* {@inheritDoc}
*/
public void initialize(ExtensionContext context) {
TransactionLogger.ROOT_LOGGER.debug("Initializing Transactions Extension");
final LogStoreResource resource = new LogStoreResource();
final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final TransactionSubsystemRootResourceDefinition rootResourceDefinition = new TransactionSubsystemRootResourceDefinition(registerRuntimeOnly);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(rootResourceDefinition);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
// Create the path resolver handlers
if (context.getProcessType().isServer()) {
// It's less than ideal to create a separate operation here, but this extension contains two relative-to attributes
final ResolvePathHandler objectStorePathHandler = ResolvePathHandler.Builder.of(RESOLVE_OBJECT_STORE_PATH, context.getPathManager()).setPathAttribute(TransactionSubsystemRootResourceDefinition.OBJECT_STORE_PATH).setRelativeToAttribute(TransactionSubsystemRootResourceDefinition.OBJECT_STORE_RELATIVE_TO).build();
registration.registerOperationHandler(objectStorePathHandler.getOperationDefinition(), objectStorePathHandler);
}
ManagementResourceRegistration logStoreChild = registration.registerSubModel(new LogStoreDefinition(resource, registerRuntimeOnly));
if (registerRuntimeOnly) {
ManagementResourceRegistration transactionChild = logStoreChild.registerSubModel(new LogStoreTransactionDefinition(resource));
transactionChild.registerSubModel(LogStoreTransactionParticipantDefinition.INSTANCE);
}
subsystem.registerXMLElementWriter(TransactionSubsystemXMLPersister.INSTANCE);
if (context.isRegisterTransformers()) {
// Register the model transformers
registerTransformers(subsystem);
}
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class UndertowExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(UndertowRootDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE, false);
final ManagementResourceRegistration deployments = subsystem.registerDeploymentModel(DeploymentDefinition.INSTANCE);
deployments.registerSubModel(DeploymentServletDefinition.INSTANCE);
deployments.registerSubModel(DeploymentWebSocketDefinition.INSTANCE);
subsystem.registerXMLElementWriter(UndertowSubsystemParser_4_0.INSTANCE);
if (context.isRegisterTransformers()) {
UndertowRootDefinition.registerTransformers(subsystem);
}
}
Aggregations