Examples of PolicySubject


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

            }
            binding.setOperationSelector(scaBinding.getOperationSelector());
            binding.setRequestWireFormat(scaBinding.getRequestWireFormat());
            binding.setResponseWireFormat(scaBinding.getResponseWireFormat());
            if (binding instanceof PolicySubject && scaBinding instanceof PolicySubject) {
                PolicySubject subject1 = (PolicySubject)binding;
                PolicySubject subject2 = (PolicySubject)scaBinding;
                subject1.getPolicySets().addAll(subject2.getPolicySets());
                subject1.getRequiredIntents().addAll(subject2.getRequiredIntents());
            }
            return binding;
        } catch (Throwable e) {
            throw new ServiceRuntimeException(e);
        }
View Full Code Here

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

                        implementation.getReferences().addAll(componentType.getReferences());
                        implementation.getProperties().addAll(componentType.getProperties());

                        if (implementation instanceof PolicySubject &&
                                componentType instanceof PolicySubject ) {
                            PolicySubject policiedImpl = (PolicySubject)implementation;
                            PolicySubject policiedCompType = (PolicySubject)componentType;

                            if ( policiedImpl.getPolicySets() != null) {
                                policiedImpl.getPolicySets().addAll(policiedCompType.getPolicySets());
                            }
                            if (policiedImpl.getRequiredIntents() != null) {
                                policiedImpl.getRequiredIntents().addAll(policiedCompType.getRequiredIntents());
                            }
                        }
                    }
                }
            }
View Full Code Here

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

    @Override
    public void visitField(Field field, JavaImplementation type) throws IntrospectionException {
        // Check if a field that is not an SCA reference has any policySet/intent annotations
        JavaElementImpl element = new JavaElementImpl(field);
        if (!type.getReferenceMembers().values().contains(element)) {
            PolicySubject subject = assemblyFactory.createComponent();
            readPolicySetAndIntents(subject, field);
            if (subject.getPolicySets().isEmpty() && subject.getRequiredIntents().isEmpty()) {
                return;
            }
            throw new ServiceRuntimeException(
                                              "[JCA70002,JCA70005] Field that is not an SCA reference cannot have policySet/intent annotations: " + field);
        }
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.