use of org.jboss.as.controller.ModelVersion in project wildfly by wildfly.
the class JGroupsTransformersTestCase method testRejections.
private void testRejections(final ModelTestControllerVersion controller) throws Exception {
final ModelVersion version = getModelVersion(controller).getVersion();
final String[] dependencies = getDependencies(controller);
// create builder for current subsystem version
KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization());
// initialize the legacy services and add required jars
builder.createLegacyKernelServicesBuilder(createAdditionalInitialization(), controller, version).addSingleChildFirstClass(AdditionalInitialization.class).addMavenResourceURL(dependencies).addSingleChildFirstClass(ClassConfigurator.class).dontPersistXml();
KernelServices services = builder.build();
Assert.assertTrue(services.isSuccessfulBoot());
KernelServices legacyServices = services.getLegacyServices(version);
Assert.assertNotNull(legacyServices);
Assert.assertTrue(legacyServices.isSuccessfulBoot());
List<ModelNode> operations = builder.parseXmlResource("subsystem-jgroups-transform-reject.xml");
ModelTestUtils.checkFailedTransformedBootOperations(services, version, operations, createFailedOperationTransformationConfig(version));
}
use of org.jboss.as.controller.ModelVersion in project wildfly by wildfly.
the class SingletonTransformersTestCase method testTransformation.
private void testTransformation(final ModelTestControllerVersion controller) throws Exception {
final ModelVersion version = getModelVersion(controller).getVersion();
final String[] dependencies = getDependencies(controller);
KernelServices services = this.buildKernelServices("subsystem-transform.xml", controller, version, dependencies);
checkSubsystemModelTransformation(services, version, null, false);
}
use of org.jboss.as.controller.ModelVersion in project wildfly by wildfly.
the class DistributableWebExtensionTransformerRegistration method registerTransformers.
@Override
public void registerTransformers(SubsystemTransformerRegistration registration) {
// Register transformers for all but the current model
for (DistributableWebModel model : EnumSet.complementOf(EnumSet.of(DistributableWebModel.CURRENT))) {
ModelVersion version = model.getVersion();
TransformationDescription transformation = new DistributableWebResourceTransformer().apply(version).build();
TransformationDescription.Tools.register(transformation, registration, version);
}
}
use of org.jboss.as.controller.ModelVersion in project wildfly by wildfly.
the class SecurityTransformersTestCase method testTransformers.
private void testTransformers(ModelTestControllerVersion controllerVersion) throws Exception {
ModelVersion version = ModelVersion.create(2, 0, 0);
final String artifactId = "wildfly-security";
String mavenGav = String.format("%s:%s:%s", controllerVersion.getMavenGroupId(), artifactId, controllerVersion.getMavenGavVersion());
testTransformers(controllerVersion, version, mavenGav);
testReject(controllerVersion, version, mavenGav);
}
Aggregations