private Set<Intent> aggregateOperationIntents(LogicalOperation operation) throws PolicyResolutionException { Set<QName> intentNames = new LinkedHashSet<>(); intentNames.addAll(operation.getIntents()); return expandAndFilterIntents(intentNames, operation); }
private Set<Intent> getRequestedIntents(LogicalComponent<?> logicalComponent, LogicalOperation operation) throws PolicyResolutionException { // Aggregate all the intents from the ancestors Set<QName> intentNames = new LinkedHashSet<>(); intentNames.addAll(operation.getIntents()); ComponentDefinition<? extends Implementation<?>> definition = logicalComponent.getDefinition(); Implementation<?> implementation = definition.getImplementation(); ComponentType componentType = implementation.getComponentType(); intentNames.addAll(implementation.getIntents()); intentNames.addAll(componentType.getIntents()); intentNames.addAll(aggregateIntents(logicalComponent)); // Expand all the profile intents Set<Intent> requiredIntents = resolveIntents(intentNames); // Remove intents not applicable to the artifact filterInvalidIntents(Intent.IMPLEMENTATION, requiredIntents); filterMutuallyExclusiveIntents(requiredIntents); return requiredIntents; }
private boolean useByReference(LogicalOperation operation, boolean remote) { if (!passByValueEnabled || remote) { // Pass-by-value is disabled or the invocation chain is remote. Pass-by-reference semantics should be used for remote invocation chains // since the binding will enforce pass-by-value implicitly through serialization return true; } LogicalAttachPoint logicalAttachPoint = operation.getParent(); LogicalComponent<?> component = logicalAttachPoint.getParent(); return operation.getIntents().contains(ALLOWS_BY_REFERENCE) || logicalAttachPoint.getIntents().contains(ALLOWS_BY_REFERENCE) || component.getIntents().contains(ALLOWS_BY_REFERENCE) || component.getDefinition().getImplementation().getIntents().contains( ALLOWS_BY_REFERENCE) || component.getDefinition().getImplementation().getComponentType().getIntents().contains(ALLOWS_BY_REFERENCE); } }
List<LogicalOperation> operations = parent.getOperations(); for (LogicalOperation operation : operations) { if (!operation.getIntents().contains(ONEWAY)) { throw new PolicyResolutionException("Cannot specify transacted one-way for a request-response operation: " + parent.getUri()); if (!operation.getIntents().contains(ONEWAY)) { throw new PolicyResolutionException( "Cannot specify transacted one-way for a request-response operation: " + operation.getParent().getUri()); List<LogicalOperation> operations = parent.getOperations(); for (LogicalOperation operation : operations) { if (!operation.getIntents().contains(ONEWAY)) { throw new PolicyResolutionException("Cannot specify immediate one-way for a request-response operation: " + parent.getUri()); if (!operation.getIntents().contains(ONEWAY)) { throw new PolicyResolutionException("Cannot specify immediate one-way for a request-response operation: " + operation.getParent().getUri());
if (containsTransactionIntent(operation.getIntents())) { return true; if (containsTransactionIntent(operation.getIntents())) { return true;