main/src/main/java/org/onap/policy/pap/main/rest/depundep/ProviderBase.java
/**
     * Process a single policy from the request.
     *
     * @param data session data
     * @param desiredPolicy request policy
     * @throws PfModelException if an error occurred
     */
Process a single policy from the request.
@param data session data
@param desiredPolicy request policy
@throws PfModelException if an error occurred
Process a single policy from the request . @param data session data @param desiredPolicy request policy @throws PfModelException if an error occurred
protected void processPolicy(SessionData data, ToscaPolicyIdentifierOptVersion desiredPolicy)
                    throws PfModelException {
        ToscaPolicy policy = getPolicy(data, desiredPolicy);
        Collection<PdpGroup> groups = getGroups(data, policy.getTypeIdentifier());
        if (groups.isEmpty()) {
            throw new PfModelException(Status.BAD_REQUEST, "policy not supported by any PDP group: "
                            + desiredPolicy.getName() + " " + desiredPolicy.getVersion());
        }
        BiFunction<PdpGroup, PdpSubGroup, Boolean> updater = makeUpdater(policy, desiredPolicy);
        for (PdpGroup group : groups) {
            upgradeGroup(data, group, updater);
        }
    }
protected void processPolicy ( SessionData data , ToscaPolicyIdentifierOptVersion desiredPolicy ) throws PfModelException { ToscaPolicy policy = getPolicy ( data , desiredPolicy ) ; Collection < PdpGroup > groups = getGroups ( data , policy . getTypeIdentifier ( ) ) ; if ( groups . isEmpty ( ) ) { throw new PfModelException ( Status . BAD_REQUEST , "policy not supported by any PDP group: " + desiredPolicy . getName ( ) + " " + desiredPolicy . getVersion ( ) ) ; } BiFunction < PdpGroup , PdpSubGroup , Boolean > updater = makeUpdater ( policy , desiredPolicy ) ; for ( PdpGroup group : groups ) { upgradeGroup ( data , group , updater ) ; } }
Process a single policy from the request.
Process a single policy from the request .