private void readPolicySets(PolicySets policySetAnnotation, List<PolicySet> policySets) { if (policySetAnnotation != null) { String[] policySetNames = policySetAnnotation.value(); if (policySetNames.length != 0) { //Operation operation = assemblyFactory.createOperation(); //operation.setName(method.getName()); //operation.setUnresolved(true); for (String policySetName : policySetNames) { // Add each intent to the list, associated with the // operation corresponding to the annotated method PolicySet policySet = policyFactory.createPolicySet(); policySet.setName(getQName(policySetName)); //intent.getOperations().add(operation); policySets.add(policySet); } } } }
private void readPolicySets(PolicySets policySetAnnotation, List<PolicySet> policySets) { if (policySetAnnotation != null) { String[] policySetNames = policySetAnnotation.value(); if (policySetNames.length != 0) { //Operation operation = assemblyFactory.createOperation(); //operation.setName(method.getName()); //operation.setUnresolved(true); for (String policySetName : policySetNames) { // Add each intent to the list, associated with the // operation corresponding to the annotated method PolicySet policySet = policyFactory.createPolicySet(); policySet.setName(getQName(policySetName)); //intent.getOperations().add(operation); policySets.add(policySet); } } } }
/** * Evaluates a policy set annotation. * * @param annotation the policy set annotation * @param modelObject the model object the policy set is associated with * @param context the current introspection context */ private void processPolicySets(PolicySets annotation, PolicyAware modelObject, IntrospectionContext context) { String[] policySets = annotation.value(); for (String set : policySets) { try { QName qName = QName.valueOf(set); modelObject.addPolicySet(qName); } catch (IllegalArgumentException e) { InvalidIntentName error = new InvalidIntentName(set, null, e); context.addError(error); } } }
/** * Read policy set annotations on a given interface or class * @param policySetAnnotation * @param policySets */ private void readPolicySets(PolicySets policySetAnnotation, List<PolicySet> policySets) { if (policySetAnnotation != null) { String[] policySetNames = policySetAnnotation.value(); if (policySetNames.length != 0) { //Operation operation = assemblyFactory.createOperation(); //operation.setName(method.getName()); //operation.setUnresolved(true); for (String policySetName : policySetNames) { // Add each intent to the list, associated with the // operation corresponding to the annotated method PolicySet policySet = policyFactory.createPolicySet(); policySet.setName(getQName(policySetName)); //intent.getOperations().add(operation); policySets.add(policySet); } } } }
String[] policySetNames = policySetAnnotation.value(); if (policySetNames.length != 0) { for (String policySetName : policySetNames) {
String[] policySetNames = policySetAnnotation.value(); if (policySetNames.length != 0) { for (String policySetName : policySetNames) {