Examples of OperationsConfigurator


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

                            resolvePolicySets(policiedImpl.getPolicySets(), resolver);
                            PolicyValidationUtils.validatePolicySets(policiedImpl);

                            if ( implementation instanceof OperationsConfigurator ) {
                                OperationsConfigurator opsConfigurator = (OperationsConfigurator)implementation;
                                for ( ConfiguredOperation implOp : opsConfigurator.getConfiguredOperations() ) {
                                    resolveIntents(implOp.getRequiredIntents(), resolver);
                                    PolicyValidationUtils.validateIntents(implOp, policiedImpl.getType());

                                    resolvePolicySets(implOp.getPolicySets(), resolver);
                                    PolicyValidationUtils.validatePolicySets(implOp,
View Full Code Here

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

                        addInheritedPolicySets(contract.getApplicablePolicySets(), policiedBinding.getApplicablePolicySets());
                        PolicyValidationUtils.validatePolicySets(policiedBinding);
                    }

                    if (binding instanceof OperationsConfigurator) {
                        OperationsConfigurator opConfigurator = (OperationsConfigurator)binding;
                        for (ConfiguredOperation confOp : opConfigurator.getConfiguredOperations()) {
                            resolveIntents(confOp.getRequiredIntents(), resolver);
                            PolicyValidationUtils.validateIntents(confOp, ((PolicySetAttachPoint)binding).getType());

                            resolvePolicySets(confOp.getPolicySets(), resolver);
                            resolvePolicySets(confOp.getApplicablePolicySets(), resolver);
                            //inherit the applicable policysets from parent binding as whatever applies to that
                            //applies to the binding as well
                            addInheritedPolicySets(((PolicySetAttachPoint)binding).getApplicablePolicySets(),
                                                   confOp.getApplicablePolicySets());
                            PolicyValidationUtils.validatePolicySets(confOp, ((PolicySetAttachPoint)binding).getType());
                        }
                    }
                }

                // Resolve callback bindings
                if (contract.getCallback() != null) {
                    resolveIntents(contract.getCallback().getRequiredIntents(), resolver);
                    resolvePolicySets(contract.getCallback().getPolicySets(), resolver);
                    resolvePolicySets(contract.getCallback().getApplicablePolicySets(), resolver);
                    //inherit the contract's policy intents and policysets
                    addInheritedPolicySets(contract.getApplicablePolicySets(), contract.getCallback().getApplicablePolicySets());

                    for (int i = 0, n = contract.getCallback().getBindings().size(); i < n; i++) {
                        Binding binding = contract.getCallback().getBindings().get(i);
                        extensionProcessor.resolve(binding, resolver);

                        if (binding instanceof IntentAttachPoint) {
                            IntentAttachPoint policiedBinding = (IntentAttachPoint)binding;

                            if ( policiedBinding.getType().isUnresolved() ) {
                                IntentAttachPointType resolved =
                                    resolver.resolveModel(IntentAttachPointType.class,
                                                          policiedBinding.getType());
                                policiedBinding.setType(resolved);
                            }

                            resolveIntents(policiedBinding.getRequiredIntents(), resolver);
                            PolicyValidationUtils.validateIntents(policiedBinding, policiedBinding.getType());
                        }

                        if (binding instanceof PolicySetAttachPoint) {
                            PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)binding;
                            resolvePolicySets(policiedBinding.getPolicySets(), resolver);
                            //validate if attached policysets apply to the binding
                            resolvePolicySets(policiedBinding.getApplicablePolicySets(), resolver);
                            //inherit the applicable policysets from parent contract as whatever applies to that
                            //applies to the binding as well
                            addInheritedPolicySets(contract.getApplicablePolicySets(), policiedBinding.getApplicablePolicySets());
                            PolicyValidationUtils.validatePolicySets(policiedBinding);
                        }

                        if (binding instanceof OperationsConfigurator) {
                            OperationsConfigurator opConfigurator = (OperationsConfigurator)binding;
                            for (ConfiguredOperation confOp : opConfigurator.getConfiguredOperations()) {
                                resolveIntents(confOp.getRequiredIntents(), resolver);
                                PolicyValidationUtils.validateIntents(confOp, ((PolicySetAttachPoint)binding).getType());

                                resolvePolicySets(confOp.getPolicySets(), resolver);
                                resolvePolicySets(confOp.getApplicablePolicySets(), resolver);
View Full Code Here

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

    private List<SecurityIdentityPolicy> findPolicies(Operation op) {
        List<SecurityIdentityPolicy> polices = new ArrayList<SecurityIdentityPolicy>();
        // 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.getName().equals(op.getName())) {
                    for (PolicySet ps : cop.getPolicySets()) {
                        for (Object p : ps.getPolicies()) {
                            if (SecurityIdentityPolicy.class.isInstance(p)) {
                                polices.add((SecurityIdentityPolicy)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

                                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

                }
            }
        }

      if (service instanceof OperationsConfigurator) {
            OperationsConfigurator operationsConfigurator = (OperationsConfigurator)service;
            for (ConfiguredOperation cop : operationsConfigurator.getConfiguredOperations()) {
                if (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

                            resolvePolicySets(policiedImpl.getPolicySets(), resolver);
                            PolicyValidationUtils.validatePolicySets(policiedImpl);

                            if ( implementation instanceof OperationsConfigurator ) {
                                OperationsConfigurator opsConfigurator = (OperationsConfigurator)implementation;
                                for ( ConfiguredOperation implOp : opsConfigurator.getConfiguredOperations() ) {
                                    resolveIntents(implOp.getRequiredIntents(), resolver);
                                    PolicyValidationUtils.validateIntents(implOp, policiedImpl.getType());

                                    resolvePolicySets(implOp.getPolicySets(), resolver);
                                    PolicyValidationUtils.validatePolicySets(implOp,
View Full Code Here

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

                        addInheritedPolicySets(contract.getApplicablePolicySets(), policiedBinding.getApplicablePolicySets());
                        PolicyValidationUtils.validatePolicySets(policiedBinding);
                    }

                    if (binding instanceof OperationsConfigurator) {
                        OperationsConfigurator opConfigurator = (OperationsConfigurator)binding;
                        for (ConfiguredOperation confOp : opConfigurator.getConfiguredOperations()) {
                            resolveIntents(confOp.getRequiredIntents(), resolver);
                            PolicyValidationUtils.validateIntents(confOp, ((PolicySetAttachPoint)binding).getType());

                            resolvePolicySets(confOp.getPolicySets(), resolver);
                            resolvePolicySets(confOp.getApplicablePolicySets(), resolver);
                            //inherit the applicable policysets from parent binding as whatever applies to that
                            //applies to the binding as well
                            addInheritedPolicySets(((PolicySetAttachPoint)binding).getApplicablePolicySets(),
                                                   confOp.getApplicablePolicySets());
                            PolicyValidationUtils.validatePolicySets(confOp, ((PolicySetAttachPoint)binding).getType());
                        }
                    }
                }

                // Resolve callback bindings
                if (contract.getCallback() != null) {
                    resolveIntents(contract.getCallback().getRequiredIntents(), resolver);
                    resolvePolicySets(contract.getCallback().getPolicySets(), resolver);
                    resolvePolicySets(contract.getCallback().getApplicablePolicySets(), resolver);
                    //inherit the contract's policy intents and policysets
                    addInheritedPolicySets(contract.getApplicablePolicySets(), contract.getCallback().getApplicablePolicySets());

                    for (int i = 0, n = contract.getCallback().getBindings().size(); i < n; i++) {
                        Binding binding = contract.getCallback().getBindings().get(i);
                        extensionProcessor.resolve(binding, resolver);

                        if (binding instanceof IntentAttachPoint) {
                            IntentAttachPoint policiedBinding = (IntentAttachPoint)binding;

                            if ( policiedBinding.getType().isUnresolved() ) {
                                IntentAttachPointType resolved =
                                    resolver.resolveModel(IntentAttachPointType.class,
                                                          policiedBinding.getType());
                                policiedBinding.setType(resolved);
                            }

                            resolveIntents(policiedBinding.getRequiredIntents(), resolver);
                            PolicyValidationUtils.validateIntents(policiedBinding, policiedBinding.getType());
                        }

                        if (binding instanceof PolicySetAttachPoint) {
                            PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)binding;
                            resolvePolicySets(policiedBinding.getPolicySets(), resolver);
                            //validate if attached policysets apply to the binding
                            resolvePolicySets(policiedBinding.getApplicablePolicySets(), resolver);
                            //inherit the applicable policysets from parent contract as whatever applies to that
                            //applies to the binding as well
                            addInheritedPolicySets(contract.getApplicablePolicySets(), policiedBinding.getApplicablePolicySets());
                            PolicyValidationUtils.validatePolicySets(policiedBinding);
                        }

                        if (binding instanceof OperationsConfigurator) {
                            OperationsConfigurator opConfigurator = (OperationsConfigurator)binding;
                            for (ConfiguredOperation confOp : opConfigurator.getConfiguredOperations()) {
                                resolveIntents(confOp.getRequiredIntents(), resolver);
                                PolicyValidationUtils.validateIntents(confOp, ((PolicySetAttachPoint)binding).getType());

                                resolvePolicySets(confOp.getPolicySets(), resolver);
                                resolvePolicySets(confOp.getApplicablePolicySets(), resolver);
View Full Code Here

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

       
        Composite composite = (Composite)staxProcessor.read(reader);
        JMSBinding binding = (JMSBinding)   composite.getComponents().get(0).getServices().get(0).getBindings().get(0);       
        assertNotNull(binding);
       
        OperationsConfigurator opConfig = ((OperationsConfigurator)binding);
        assertEquals(opConfig.getConfiguredOperations().get(0).getRequiredIntents().size(), 2);
    }
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.getName().equals(op.getName())) {
                    for (PolicySet ps : cop.getApplicablePolicySets()) {
                        for (Object p : ps.getPolicies()) {
                            if (LDAPRealmAuthenticationPolicy.class.isInstance(p)) {
                                polices.add((LDAPRealmAuthenticationPolicy)p);
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.