Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleThe TargetHandling Interface
linenumberstrue
import java.util.Set;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyToscaEntityKey;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;

public interface TargetHandling {
    public boolean checkTargets(final ToscaPolicyToscaEntityKey toscaPolicy, final ToscaServiceTemplate serviceTemplate, final Object targetContext);
}

When a PDP receives an event, it determines which policy the event has triggered. It then always calls the checkTargets method on the TargetHandling interface. The The toscaPolicy parameter contains the name and version of the policy that has been triggered. The serviceTemplate parameter provides the policy types and policy definitions that are known to the PDP to the targetsCommon component.

Once the checkTargets method is called, the algorithm described in the Execution Sequence section above is executed by the targetsCommon component.

Target REST API

The Target REST API is a specific REST API for targets, provided the XACML PDP. It executes a single target

Specification of targets in TOSCA

...