Package org.apache.tuscany.sca.policy

Examples of org.apache.tuscany.sca.policy.ImplementationType


        BindingType wsBindingType = bindingTypesTable.get(wsBinding);
        assertNull(wsBindingType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNull(wsBindingType.getMayProvidedIntents().get(0).getDescription());

        ImplementationType javaImplType = implTypesTable.get(javaImpl);
        assertNull(javaImplType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNull(javaImplType.getMayProvidedIntents().get(0).getDescription());

        ModelResolver resolver = new DefaultModelResolver();
        policyDefinitionsProcessor.resolve(definitions, resolver, context);
        //builder.build(scaDefinitions);

        //testing if policy intents have been linked have property been linked up
        assertNotNull(i1.getRequiredIntents().get(0).getDescription());
        // assertNotNull(i2.getQualifiableIntent().getDescription());
        assertEquals(secureReliablePolicySet.getProvidedIntents().get(1).getName(), integrity);
        assertNotNull(secureReliablePolicySet.getProvidedIntents().get(1).getDescription());

        //testing if policysets have been properly linked up with intents
        assertFalse(secureMessagingPolicySet.isUnresolved());
        assertTrue(isRealizedBy(secureMessagingPolicySet, intentTable.get(confidentiality)));
        assertTrue(isRealizedBy(secureMessagingPolicySet, intentTable.get(confidentiality_transport)));

        //testing if intent maps have been properly mapped to policies
        assertFalse(securityPolicySet.isUnresolved());
        assertTrue(isRealizedBy(securityPolicySet, intentTable.get(confidentiality)));
        assertTrue(isRealizedBy(securityPolicySet, intentTable.get(confidentiality_message)));

        //testing for inclusion of referred policysets
        assertFalse(basicAuthMsgProtSecurityPolicySet.getPolicies().isEmpty());
        assertFalse(basicAuthMsgProtSecurityPolicySet.getIntentMaps().get(0).getQualifiers().isEmpty());
        assertTrue(isRealizedBy(basicAuthMsgProtSecurityPolicySet, intentTable.get(confidentiality_transport)));

        assertNotNull(wsBindingType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNotNull(wsBindingType.getMayProvidedIntents().get(0).getDescription());

        assertNotNull(javaImplType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNotNull(javaImplType.getMayProvidedIntents().get(0).getDescription());
    }
View Full Code Here


                        }
                    } else if (artifact instanceof BindingType) {
                        BindingType bindingType = (BindingType)artifact;
                        bindingTypesTable.put(bindingType.getType(), bindingType);
                    } else if (artifact instanceof ImplementationType) {
                        ImplementationType implType = (ImplementationType)artifact;
                        implTypesTable.put(implType.getType(), implType);
                    } else if ( artifact instanceof ExternalAttachment) {
                      ExternalAttachment attachment = (ExternalAttachment)artifact;
                      attachmentsTable.put(attachment.getPolicySets().get(0).getName(), attachment);
                    }
View Full Code Here

    @Override
    protected ExtensionType resolveExtensionType(ExtensionType extnType, ModelResolver resolver, ProcessorContext context)
        throws ContributionResolveException {
        if (extnType instanceof ImplementationType) {
            ImplementationType implType = (ImplementationType)extnType;
            return resolver.resolveModel(ImplementationType.class, implType, context);
        } else {
            return extnType;
        }
View Full Code Here

    @Override
    protected ExtensionType resolveExtensionType(ExtensionType extnType, ModelResolver resolver, ProcessorContext context)
        throws ContributionResolveException {
        if (extnType instanceof ImplementationType) {
            ImplementationType implType = (ImplementationType)extnType;
            return resolver.resolveModel(ImplementationType.class, implType, context);
        } else {
            return extnType;
        }
View Full Code Here

        BindingType wsBindingType = bindingTypesTable.get(wsBinding);
        assertNull(wsBindingType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNull(wsBindingType.getMayProvidedIntents().get(0).getDescription());

        ImplementationType javaImplType = implTypesTable.get(javaImpl);
        assertNull(javaImplType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNull(javaImplType.getMayProvidedIntents().get(0).getDescription());

        ModelResolver resolver = new DefaultModelResolver();
        policyDefinitionsProcessor.resolve(definitions, resolver, context);
        //builder.build(scaDefinitions);

        //testing if policy intents have been linked have property been linked up
        assertNotNull(i1.getRequiredIntents().get(0).getDescription());
        // assertNotNull(i2.getQualifiableIntent().getDescription());
        assertEquals(secureReliablePolicySet.getProvidedIntents().get(1).getName(), integrity);
        assertNotNull(secureReliablePolicySet.getProvidedIntents().get(1).getDescription());

        //testing if policysets have been properly linked up with intents
        assertFalse(secureMessagingPolicySet.isUnresolved());
        assertTrue(isRealizedBy(secureMessagingPolicySet, intentTable.get(confidentiality)));
        assertTrue(isRealizedBy(secureMessagingPolicySet, intentTable.get(confidentiality_transport)));

        //testing if intent maps have been properly mapped to policies
        assertFalse(securityPolicySet.isUnresolved());
        assertTrue(isRealizedBy(securityPolicySet, intentTable.get(confidentiality)));
        assertTrue(isRealizedBy(securityPolicySet, intentTable.get(confidentiality_message)));

        //testing for inclusion of referred policysets
        assertFalse(basicAuthMsgProtSecurityPolicySet.getPolicies().isEmpty());
        assertFalse(basicAuthMsgProtSecurityPolicySet.getIntentMaps().get(0).getQualifiers().isEmpty());
        assertTrue(isRealizedBy(basicAuthMsgProtSecurityPolicySet, intentTable.get(confidentiality_transport)));

        assertNotNull(wsBindingType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNotNull(wsBindingType.getMayProvidedIntents().get(0).getDescription());

        assertNotNull(javaImplType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNotNull(javaImplType.getMayProvidedIntents().get(0).getDescription());
    }
View Full Code Here

                        }
                    } else if (artifact instanceof BindingType) {
                        BindingType bindingType = (BindingType)artifact;
                        bindingTypesTable.put(bindingType.getType(), bindingType);
                    } else if (artifact instanceof ImplementationType) {
                        ImplementationType implType = (ImplementationType)artifact;
                        implTypesTable.put(implType.getType(), implType);
                    } else if ( artifact instanceof ExternalAttachment) {
                      ExternalAttachment attachment = (ExternalAttachment)artifact;
                      attachmentsTable.put(attachment.getPolicySets().get(0).getName(), attachment);
                    }
View Full Code Here

                        }
                    } else if (artifact instanceof BindingType) {
                        BindingType bindingType = (BindingType)artifact;
                        bindingTypesTable.put(bindingType.getType(), bindingType);
                    } else if (artifact instanceof ImplementationTypeImpl) {
                        ImplementationType implType = (ImplementationType)artifact;
                        implTypesTable.put(implType.getType(), implType);
                    }

                    if (artifact != null) {
                        resolver.addModel(artifact);
                    }
View Full Code Here

    @Override
    protected ExtensionType resolveExtensionType(ExtensionType extnType, ModelResolver resolver)
        throws ContributionResolveException {
        if (extnType instanceof ImplementationType) {
            ImplementationType implType = (ImplementationType)extnType;
            return resolver.resolveModel(ImplementationType.class, implType);
        } else {
            return extnType;
        }
View Full Code Here

        BindingType wsBindingType = bindingTypesTable.get(wsBinding);
        assertNull(wsBindingType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNull(wsBindingType.getMayProvidedIntents().get(0).getDescription());

        ImplementationType javaImplType = implTypesTable.get(javaImpl);
        assertNull(javaImplType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNull(javaImplType.getMayProvidedIntents().get(0).getDescription());

        ModelResolver resolver = new DefaultModelResolver();
        policyDefinitionsProcessor.resolve(definitions, resolver);
        //builder.build(scaDefinitions);

        //testing if policy intents have been linked have property been linked up
        assertNotNull(i1.getRequiredIntents().get(0).getDescription());
        // assertNotNull(i2.getQualifiableIntent().getDescription());
        assertEquals(secureReliablePolicySet.getProvidedIntents().get(1).getName(), integrity);
        assertNotNull(secureReliablePolicySet.getProvidedIntents().get(1).getDescription());

        //testing if policysets have been properly linked up with intents
        assertFalse(secureMessagingPolicySet.isUnresolved());
        assertTrue(isRealizedBy(secureMessagingPolicySet, intentTable.get(confidentiality)));
        assertTrue(isRealizedBy(secureMessagingPolicySet, intentTable.get(confidentiality_transport)));

        //testing if intent maps have been properly mapped to policies
        assertFalse(securityPolicySet.isUnresolved());
        assertTrue(isRealizedBy(securityPolicySet, intentTable.get(confidentiality)));
        assertTrue(isRealizedBy(securityPolicySet, intentTable.get(confidentiality_message)));

        //testing for inclusion of referred policysets
        assertFalse(basicAuthMsgProtSecurityPolicySet.getPolicies().isEmpty());
        assertFalse(basicAuthMsgProtSecurityPolicySet.getIntentMaps().get(0).getQualifiers().isEmpty());
        assertTrue(isRealizedBy(basicAuthMsgProtSecurityPolicySet, intentTable.get(confidentiality_transport)));

        assertNotNull(wsBindingType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNotNull(wsBindingType.getMayProvidedIntents().get(0).getDescription());

        assertNotNull(javaImplType.getAlwaysProvidedIntents().get(0).getDescription());
        assertNotNull(javaImplType.getMayProvidedIntents().get(0).getDescription());
    }
View Full Code Here

    @Override
    protected ExtensionType resolveExtensionType(ExtensionType extnType, ModelResolver resolver, ProcessorContext context)
        throws ContributionResolveException {
        if (extnType instanceof ImplementationType) {
            ImplementationType implType = (ImplementationType)extnType;
            return resolver.resolveModel(ImplementationType.class, implType, context);
        } else {
            return extnType;
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.policy.ImplementationType

Copyright © 2018 www.massapicom. 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.