Examples of FailedOperationTransformationConfig


Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

        Assert.assertTrue(mainServices.isSuccessfulBoot());
        Assert.assertTrue(legacyServices.isSuccessfulBoot());

        List<ModelNode> ops = builder.parseXmlResource("subsystem-1.1-transformers.xml");
        ModelTestUtils.checkFailedTransformedBootOperations(mainServices, oldVersion, ops,
                new FailedOperationTransformationConfig()
                    .addFailedAttribute(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, JPAExtension.SUBSYSTEM_NAME)),
                            new FailedOperationTransformationConfig.RejectExpressionsConfig(DEFAULT_DATASOURCE)
                                .setNotExpectedWriteFailure(JPADefinition.DEFAULT_EXTENDEDPERSISTENCE_INHERITANCE)));

        ModelNode legacyModel = legacyServices.readWholeModel().require(SUBSYSTEM).require(JPAExtension.SUBSYSTEM_NAME);
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

        Assert.assertTrue(legacyServices.isSuccessfulBoot());

        List<ModelNode> ops = builder.parseXmlResource("federation-subsystem-2.0.xml");

        ModelTestUtils.checkFailedTransformedBootOperations(mainServices, oldVersion, ops,
            new FailedOperationTransformationConfig()
                .addFailedAttribute(PathAddress.pathAddress(
                        PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, FederationExtension.SUBSYSTEM_NAME),
                        PathElement.pathElement(ModelElement.FEDERATION.getName()),
                        KeyStoreProviderResourceDefinition.INSTANCE.getPathElement(),
                        KeyResourceDefinition.INSTANCE.getPathElement()),
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

        ModelTestUtils.checkFailedTransformedBootOperations(services, version, xmlOps, createFailedOperationConfig(version));
    }

    private static FailedOperationTransformationConfig createFailedOperationConfig(ModelVersion version) {

        FailedOperationTransformationConfig config = new FailedOperationTransformationConfig();
        PathAddress subsystemAddress = PathAddress.pathAddress(InfinispanSubsystemResourceDefinition.PATH);
        PathAddress containerAddress = subsystemAddress.append(CacheContainerResourceDefinition.WILDCARD_PATH);

        if (InfinispanModel.VERSION_2_0_0.requiresTransformation(version)) {
            for (CacheType type: CacheType.values()) {
                if (type.hasSharedState()) {
                    PathAddress cacheAddress = containerAddress.append(type.pathElement());
                    config.addFailedAttribute(cacheAddress.append(BackupSiteResourceDefinition.WILDCARD_PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
                    config.addFailedAttribute(cacheAddress.append(BackupForResourceDefinition.PATH), FailedOperationTransformationConfig.REJECTED_RESOURCE);
                }
            }
        }

        return config;
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

     *
     * @return config
     */
    private static FailedOperationTransformationConfig getFailedOperationConfig130() {

        FailedOperationTransformationConfig config = createFailedOperationConfig(InfinispanModel.VERSION_1_3_0.getVersion());

        PathAddress subsystemAddress = PathAddress.pathAddress(InfinispanSubsystemResourceDefinition.PATH);
        PathAddress containerAddress = subsystemAddress.append(CacheContainerResourceDefinition.WILDCARD_PATH);
        config.addFailedAttribute(containerAddress, new RejectExpressionsConfig(InfinispanRejectedExpressions_1_3.ACCEPT14_REJECT13_CONTAINER_ATTRIBUTES));

        PathAddress transportAddress = containerAddress.append(TransportResourceDefinition.PATH);
        config.addFailedAttribute(transportAddress, new RejectExpressionsConfig(InfinispanRejectedExpressions_1_3.ACCEPT14_REJECT13_TRANSPORT_ATTRIBUTES));

        PathElement[] childPaths = {
                LockingResourceDefinition.PATH,
                TransactionResourceDefinition.PATH,
                ExpirationResourceDefinition.PATH,
                EvictionResourceDefinition.PATH,
                StateTransferResourceDefinition.PATH
        } ;

        PathElement[] storePaths = {
                CustomStoreResourceDefinition.PATH,
                FileStoreResourceDefinition.PATH,
                StringKeyedJDBCStoreResourceDefinition.PATH,
                BinaryKeyedJDBCStoreResourceDefinition.PATH,
                MixedKeyedJDBCStoreResourceDefinition.PATH,
                RemoteStoreResourceDefinition.PATH
        } ;

        // cache attributes
        for (CacheType type: CacheType.values()) {
            PathAddress cacheAddress = containerAddress.append(type.pathElement());
            FailedOperationTransformationConfig.ChainedConfig.Builder builder = ChainedConfig.createBuilder(InfinispanRejectedExpressions_1_3.ACCEPT14_REJECT13_CACHE_ATTRIBUTES);
            builder.addConfig(new RejectExpressionsConfig(InfinispanRejectedExpressions_1_3.ACCEPT14_REJECT13_CACHE_ATTRIBUTES));
            builder.addConfig(new RemoveResolvedIndexingPropertiesConfig(CacheResourceDefinition.INDEXING_PROPERTIES));
            config.addFailedAttribute(cacheAddress, builder.build());

            // cache child attributes
            for (PathElement childPath: childPaths) {
                // reject expressions on operations in children
                config.addFailedAttribute(cacheAddress.append(childPath), new RejectExpressionsConfig(InfinispanRejectedExpressions_1_3.ACCEPT14_REJECT13_CHILD_ATTRIBUTES));
            }

            RejectExpressionsConfig keyedTableComplexChildConfig = new RejectExpressionsConfig(JDBCStoreResourceDefinition.TABLE_ATTRIBUTES);

            // cache store attributes
            for (PathElement storePath: storePaths) {
                PathAddress storeAddress = cacheAddress.append(storePath);
                // reject expressions on operations on stores and store properties
                config.addFailedAttribute(storeAddress, new RejectExpressionsConfig(InfinispanRejectedExpressions_1_3.ACCEPT14_REJECT13_STORE_ATTRIBUTES)
                        .configureComplexAttribute(ModelKeys.STRING_KEYED_TABLE, keyedTableComplexChildConfig)
                        .configureComplexAttribute(ModelKeys.BINARY_KEYED_TABLE, keyedTableComplexChildConfig)
                );

                PathAddress writeBehindAddress = storeAddress.append(StoreWriteBehindResourceDefinition.PATH);
                config.addFailedAttribute(writeBehindAddress, new RejectExpressionsConfig(InfinispanRejectedExpressions_1_3.ACCEPT14_REJECT13_STORE_ATTRIBUTES));

                PathAddress storePropertyAddress = storeAddress.append(StorePropertyResourceDefinition.WILDCARD_PATH);
                config.addFailedAttribute(storePropertyAddress, new RejectExpressionsConfig(InfinispanRejectedExpressions_1_3.ACCEPT14_REJECT13_STORE_ATTRIBUTES));
            }
        }

        return config;
    }
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

    public void testRejectTransformerEAP600() throws Exception {
        testRejectTransformers(ModelTestControllerVersion.EAP_6_0_0, ModelVersion.create(1, 1, 0), get1_1_0_config());
    }

    private FailedOperationTransformationConfig get1_1_0_config() {
        return new FailedOperationTransformationConfig()
        .addFailedAttribute(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)),
                new FailedOperationTransformationConfig.ChainedConfig(Arrays.asList(new FailedOperationTransformationConfig.AttributesPathAddressConfig<?>[] {
                        new FailedOperationTransformationConfig.RejectExpressionsConfig(
                                DEFAULT_TIMEOUT,
                                STATISTICS_ENABLED,
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

                FailedOperationTransformationConfig.REJECTED_RESOURCE);
    }

    @Test
    public void testRejectTransformers713() throws Exception {
        testRejectTransformers(ModelTestControllerVersion.V7_1_3_FINAL, ModelVersion.create(1, 1, 1), new FailedOperationTransformationConfig()
            .addFailedAttribute(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)),
                    new ChangeToTrueConfig(HORNETQ_STORE_ENABLE_ASYNC_IO))
            .addFailedAttribute(PathAddress.pathAddress(
                    PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)).append(CMResourceResourceDefinition.PATH_CM_RESOURCE),
                    FailedOperationTransformationConfig.REJECTED_RESOURCE));
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

    }

    @Test
    public void testRejectTransformers720() throws Exception {
        testRejectTransformers(ModelTestControllerVersion.V7_1_3_FINAL, ModelVersion.create(1, 2, 0), new FailedOperationTransformationConfig()
            .addFailedAttribute(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)),
                    new ChangeToTrueConfig(HORNETQ_STORE_ENABLE_ASYNC_IO))
            .addFailedAttribute(PathAddress.pathAddress(
                    PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)).append(CMResourceResourceDefinition.PATH_CM_RESOURCE),
                    FailedOperationTransformationConfig.REJECTED_RESOURCE));    }
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

                    PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)).append(CMResourceResourceDefinition.PATH_CM_RESOURCE),
                    FailedOperationTransformationConfig.REJECTED_RESOURCE));    }

    @Test
    public void testRejectTransformersEAP610() throws Exception {
        testRejectTransformers(ModelTestControllerVersion.EAP_6_1_0, ModelVersion.create(1, 2, 0), new FailedOperationTransformationConfig()
            .addFailedAttribute(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)),
                    new ChangeToTrueConfig(HORNETQ_STORE_ENABLE_ASYNC_IO))
            .addFailedAttribute(PathAddress.pathAddress(
                    PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)).append(CMResourceResourceDefinition.PATH_CM_RESOURCE),
                    FailedOperationTransformationConfig.REJECTED_RESOURCE));    }
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

                    PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)).append(CMResourceResourceDefinition.PATH_CM_RESOURCE),
                    FailedOperationTransformationConfig.REJECTED_RESOURCE));    }

    @Test
    public void testRejectTransformersEAP611() throws Exception {
        testRejectTransformers(ModelTestControllerVersion.EAP_6_1_1, ModelVersion.create(1, 2, 0), new FailedOperationTransformationConfig()
            .addFailedAttribute(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)),
                    new ChangeToTrueConfig(HORNETQ_STORE_ENABLE_ASYNC_IO))
            .addFailedAttribute(PathAddress.pathAddress(
                    PathElement.pathElement(SUBSYSTEM, TransactionExtension.SUBSYSTEM_NAME)).append(CMResourceResourceDefinition.PATH_CM_RESOURCE),
                    FailedOperationTransformationConfig.REJECTED_RESOURCE));
View Full Code Here

Examples of org.jboss.as.model.test.FailedOperationTransformationConfig

    private FailedOperationTransformationConfig getConfig_1_1_0(KernelServices mainServices) {
        PathAddress subsystemAddress = PathAddress.pathAddress(SecurityExtension.PATH_SUBSYSTEM);
        PathAddress securityDomain = subsystemAddress.append(SecurityExtension.SECURITY_DOMAIN_PATH);
        PathAddress securityDomainOther = subsystemAddress.append(PathElement.pathElement(SecurityExtension.SECURITY_DOMAIN_PATH.getKey(), "other"));

        FailedOperationTransformationConfig config = new FailedOperationTransformationConfig();

        config.addFailedAttribute(subsystemAddress, new RejectExpressionsConfig(SecuritySubsystemRootResourceDefinition.DEEP_COPY_SUBJECT_MODE));
        config.addFailedAttribute(securityDomain, new RejectExpressionsConfig(SecurityDomainResourceDefinition.CACHE_TYPE));
        config.addFailedAttribute(securityDomainOther.append(SecurityExtension.JSSE_PATH), new RejectExpressionsConfig(JSSEResourceDefinition.ADDITIONAL_PROPERTIES));
        config.addFailedAttribute(subsystemAddress.append(SecurityExtension.VAULT_PATH), new RejectExpressionsConfig(VaultResourceDefinition.OPTIONS));

        PathAddress securityDomainOtherClassicAuthentication = securityDomainOther.append(SecurityExtension.PATH_CLASSIC_AUTHENTICATION);

        PathAddress securityDomainOtherClassicAuthenticationLoginRemoting = securityDomainOtherClassicAuthentication.append(PathElement.pathElement(Constants.LOGIN_MODULE, "Remoting"));
        config.addFailedAttribute(securityDomainOtherClassicAuthenticationLoginRemoting,
                createCorrectModelRejectExpressionsConfig(mainServices, securityDomainOtherClassicAuthenticationLoginRemoting, Constants.FLAG, Constants.MODULE_OPTIONS));

        PathAddress securityDomainOtherJaspiAuthentication = securityDomainOtherClassicAuthentication.append(PathElement.pathElement(Constants.LOGIN_MODULE, "lm"));
        config.addFailedAttribute(securityDomainOtherJaspiAuthentication,
                createCorrectModelRejectExpressionsConfig(mainServices, securityDomainOtherJaspiAuthentication, Constants.FLAG, Constants.MODULE_OPTIONS));

        PathAddress securityDomainOtherClassicAuthenticationLoginRealmUsersRoles = securityDomainOtherClassicAuthentication.append(PathElement.pathElement(Constants.LOGIN_MODULE, "RealmUsersRoles"));
        config.addFailedAttribute(securityDomainOtherClassicAuthenticationLoginRealmUsersRoles,
                createCorrectModelRejectExpressionsConfig(mainServices, securityDomainOtherClassicAuthenticationLoginRealmUsersRoles, Constants.MODULE_OPTIONS));

        PathAddress securityDomainOtherClassicAuthorizationPolicyDenyAll = securityDomainOther.append(SecurityExtension.PATH_AUTHORIZATION_CLASSIC, PathElement.pathElement(Constants.POLICY_MODULE, "DenyAll"));
        config.addFailedAttribute(securityDomainOtherClassicAuthorizationPolicyDenyAll,
                createCorrectModelRejectExpressionsConfig(mainServices, securityDomainOtherClassicAuthorizationPolicyDenyAll, Constants.FLAG, Constants.MODULE_OPTIONS));

        PathAddress securityDomainOtherClassicAcl = securityDomainOther.append(SecurityExtension.ACL_PATH, PathElement.pathElement(Constants.ACL_MODULE, "acl"));
        config.addFailedAttribute(securityDomainOtherClassicAcl,
                createCorrectModelRejectExpressionsConfig(mainServices, securityDomainOtherClassicAcl, Constants.FLAG, Constants.MODULE_OPTIONS));

        PathAddress securityDomainOtherMappingClassicMapping = securityDomainOther.append(SecurityExtension.PATH_MAPPING_CLASSIC, PathElement.pathElement(Constants.MAPPING_MODULE, "test"));
        config.addFailedAttribute(securityDomainOtherMappingClassicMapping,
                createCorrectModelRejectExpressionsConfig(mainServices, securityDomainOtherMappingClassicMapping, Constants.TYPE, Constants.MODULE_OPTIONS));

        PathAddress securityDomainOtherAudit = securityDomainOther.append(SecurityExtension.PATH_AUDIT_CLASSIC, PathElement.pathElement(Constants.PROVIDER_MODULE, "customModule"));
        config.addFailedAttribute(securityDomainOtherAudit,
                createCorrectModelRejectExpressionsConfig(mainServices, securityDomainOtherAudit, Constants.MODULE_OPTIONS));

        PathAddress securityDomainOtherIdentity = securityDomainOther.append(SecurityExtension.PATH_IDENTITY_TRUST_CLASSIC, PathElement.pathElement(Constants.TRUST_MODULE, "IdentityThingy"));
        config.addFailedAttribute(securityDomainOtherIdentity,
                createCorrectModelRejectExpressionsConfig(mainServices, securityDomainOtherIdentity, Constants.FLAG, Constants.MODULE_OPTIONS));

        PathAddress jaspiAuthenticationAuthModule = subsystemAddress.append(
                PathElement.pathElement(Constants.SECURITY_DOMAIN, "jaspi-test"),SecurityExtension.PATH_JASPI_AUTH, PathElement.pathElement(Constants.AUTH_MODULE, "org.jboss.as.web.security.jaspi.modules.HTTPBasicServerAuthModule"));
        config.addFailedAttribute(jaspiAuthenticationAuthModule,
                ChainedConfig.createBuilder(Constants.FLAG, Constants.MODULE_OPTIONS, Constants.MODULE)
                    .addConfig(new CorrectModelConfig(mainServices, jaspiAuthenticationAuthModule, Constants.FLAG))
                    .addConfig(new CorrectModelConfig(mainServices, jaspiAuthenticationAuthModule, Constants.MODULE_OPTIONS))
                    .addConfig(new NewAttributesConfig(Constants.MODULE))
                    .build());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.