Examples of OperationsConfigurator


Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                fail();
            }
        }

        //test for proper aggregation of policy intents and policysets on operations of implementation
        OperationsConfigurator opConf = (OperationsConfigurator)composite.getComponents().get(5);
        assertEquals(opConf.getConfiguredOperations().get(0).getRequiredIntents().size(), 4);
        for ( Intent intent :  opConf.getConfiguredOperations().get(0).getRequiredIntents()) {
            String intentName = intent.getName().getLocalPart();
            if ( !(intentName.equals("tuscanyIntent_1") || intentName.equals("tuscanyIntent_4") ||
                intentName.equals("tuscanyIntent_5") || intentName.equals("tuscanyIntent_6") ) ) {
                fail();
            }
        }
       
        opConf = (OperationsConfigurator)composite.getComponents().get(6);
        assertEquals(opConf.getConfiguredOperations().get(0).getRequiredIntents().size(), 3);
        for ( Intent intent :  opConf.getConfiguredOperations().get(0).getRequiredIntents()) {
            String intentName = intent.getName().getLocalPart();
            if ( !(intentName.equals("tuscanyIntent_1") || intentName.equals("tuscanyIntent_4") ||
                intentName.equals("tuscanyIntent_6.qualified2") ) ) {
                fail();
            }
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                fail();
            }
        }

        //test for computation of policysets on operations of implementation
        OperationsConfigurator opConf = (OperationsConfigurator)composite.getComponents().get(5);
        assertEquals(opConf.getConfiguredOperations().get(0).getPolicySets().size(), 3);
        for ( PolicySet policySet : opConf.getConfiguredOperations().get(0).getPolicySets() ) {
            String policySetName = policySet.getName().getLocalPart();
            if ( !(policySetName.equals("tuscanyPolicySet_1") || policySetName.equals("tuscanyPolicySet_2")
                    || policySetName.equals("tuscanyPolicySet_3")) ) {
                fail();
            }
        }
       
        opConf = (OperationsConfigurator)composite.getComponents().get(6);
        assertEquals(opConf.getConfiguredOperations().get(0).getPolicySets().size(), 4);
        for ( PolicySet policySet : opConf.getConfiguredOperations().get(0).getPolicySets() ) {
            String policySetName = policySet.getName().getLocalPart();
            if ( !(policySetName.equals("tuscanyPolicySet_1") || policySetName.equals("tuscanyPolicySet_2")
                    || policySetName.equals("tuscanyPolicySet_3")
                    || policySetName.equals("tuscanyPolicySet_4")) ) {
                fail();
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                    }
                }
            }

            if (service instanceof OperationsConfigurator) {
                OperationsConfigurator operationsConfigurator = (OperationsConfigurator)service;
                for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
                    if (cop!= null && cop.getName() != null && cop.getName().equals(op.getName())) {
                        for (PolicySet ps : cop.getApplicablePolicySets()) {
                            for (Object p : ps.getPolicies()) {
                                if (p instanceof LDAPRealmAuthenticationPolicy) {
                                    polices.add((LDAPRealmAuthenticationPolicy)p);
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                    }
                }
            }

            if (service instanceof OperationsConfigurator) {
                OperationsConfigurator operationsConfigurator = (OperationsConfigurator)service;
                for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
                    if (cop != null && cop.getName() != null && cop.getName().equals(op.getName())) {
                        for (PolicySet ps : cop.getApplicablePolicySets()) {
                            for (Object p : ps.getPolicies()) {
                                if (p instanceof AuthorizationPolicy) {
                                    polices.add((AuthorizationPolicy)p);
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                  warning("InvalidInterfaceException", wsdlFactory, model.getName());
                }
            }
        }
        policyProcessor.resolvePolicies(model, resolver);
        OperationsConfigurator opCongigurator = (OperationsConfigurator)model;
        for (ConfiguredOperation confOp : opCongigurator.getConfiguredOperations()) {
            policyProcessor.resolvePolicies(confOp, resolver);
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                }
            }
        }

      if (service instanceof OperationsConfigurator) {
            OperationsConfigurator operationsConfigurator = (OperationsConfigurator)service;
            for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
                if (cop != null && cop.getName() != null && cop.getName().equals(op.getName())) {
                    for (PolicySet ps : cop.getApplicablePolicySets()) {
                        for (Object p : ps.getPolicies()) {
                            if (JaasAuthenticationPolicy.class.isInstance(p)) {
                                polices.add((JaasAuthenticationPolicy)p);
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

    private List<JaasAuthenticationPolicy> findPolicies(Operation op) {
        List<JaasAuthenticationPolicy> polices = new ArrayList<JaasAuthenticationPolicy>();
        // FIXME: How do we get a list of effective policySets for a given operation?
        if (implementation instanceof OperationsConfigurator) {
            OperationsConfigurator operationsConfigurator = (OperationsConfigurator)implementation;
            for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
                if (cop != null && cop.getName() != null && cop.getName().equals(op.getName())) {
                    for (PolicySet ps : cop.getPolicySets()) {
                        for (Object p : ps.getPolicies()) {
                            if (JaasAuthenticationPolicy.class.isInstance(p)) {
                                polices.add((JaasAuthenticationPolicy)p);
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                                policyProcessor.readPolicies(operation, reader);
                            } else {
                                policyProcessor.readPolicies(operation, reader);
                            }
                           
                            OperationsConfigurator opConfigurator = null;
                            if ( compositeService != null ) {
                                opConfigurator = compositeService;
                            } else if ( componentService != null ) {
                                opConfigurator = componentService;
                            } else if ( compositeReference != null ) {
                                opConfigurator = compositeReference;
                            } else if ( componentReference != null ) {
                                opConfigurator = componentReference;
                            }
                           
                            opConfigurator.getConfiguredOperations().add(operation);
                        } else if (IMPLEMENTATION_COMPOSITE_QNAME.equals(name)) {
   
                            // Read an implementation.composite
                            Composite implementation = assemblyFactory.createComposite();
                            implementation.setName(getQName(reader, NAME));
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                fail();
            }
        }

        //test for proper aggregation of policy intents and policysets on operations of implementation
        OperationsConfigurator opConf = (OperationsConfigurator)composite.getComponents().get(5);
        assertEquals(opConf.getConfiguredOperations().get(0).getRequiredIntents().size(), 4);
        for ( Intent intent :  opConf.getConfiguredOperations().get(0).getRequiredIntents()) {
            String intentName = intent.getName().getLocalPart();
            if ( !(intentName.equals("tuscanyIntent_1") || intentName.equals("tuscanyIntent_4") ||
                intentName.equals("tuscanyIntent_5") || intentName.equals("tuscanyIntent_6") ) ) {
                fail();
            }
        }
       
        opConf = (OperationsConfigurator)composite.getComponents().get(6);
        assertEquals(opConf.getConfiguredOperations().get(0).getRequiredIntents().size(), 3);
        for ( Intent intent :  opConf.getConfiguredOperations().get(0).getRequiredIntents()) {
            String intentName = intent.getName().getLocalPart();
            if ( !(intentName.equals("tuscanyIntent_1") || intentName.equals("tuscanyIntent_4") ||
                intentName.equals("tuscanyIntent_6.qualified2") ) ) {
                fail();
            }
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.OperationsConfigurator

                fail();
            }
        }

        //test for computation of policysets on operations of implementation
        OperationsConfigurator opConf = (OperationsConfigurator)composite.getComponents().get(5);
        assertEquals(opConf.getConfiguredOperations().get(0).getPolicySets().size(), 3);
        for ( PolicySet policySet : opConf.getConfiguredOperations().get(0).getPolicySets() ) {
            String policySetName = policySet.getName().getLocalPart();
            if ( !(policySetName.equals("tuscanyPolicySet_1") || policySetName.equals("tuscanyPolicySet_2")
                    || policySetName.equals("tuscanyPolicySet_3")) ) {
                fail();
            }
        }
       
        opConf = (OperationsConfigurator)composite.getComponents().get(6);
        assertEquals(opConf.getConfiguredOperations().get(0).getPolicySets().size(), 4);
        for ( PolicySet policySet : opConf.getConfiguredOperations().get(0).getPolicySets() ) {
            String policySetName = policySet.getName().getLocalPart();
            if ( !(policySetName.equals("tuscanyPolicySet_1") || policySetName.equals("tuscanyPolicySet_2")
                    || policySetName.equals("tuscanyPolicySet_3")
                    || policySetName.equals("tuscanyPolicySet_4")) ) {
                fail();
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.