All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.security.ams.api.PolicyAssignments Maven / Gradle / Ivy

Go to download

Client Library for integrating Jakarta EE applications with SAP Authorization Management Service (AMS)

The newest version!
/************************************************************************
 * © 2019-2023 SAP SE or an SAP affiliate company. All rights reserved. *
 ************************************************************************/
package com.sap.cloud.security.ams.api;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import java.util.function.Predicate;
import java.util.Set;

/**
 * {@link PolicyAssignments} provide a general m:n mapping from a named entity to policy names. Each mapping is
 * tied to an {@link AuthorizationMode} which provides a convenient way to apply the mapping automatically if
 * the specified mode is detected.
 */
public interface PolicyAssignments {

    /**
     * Get the set of policies for the provided mode.
     * @param mode the {@link AuthorizationMode}
     * @param nameFilter Optional predicate that can be as a filter for the named entities.
     * @return
     */
    Set getPoliciesForMode(@NonNull AuthorizationMode mode, @Nullable Predicate nameFilter);

    /**
     * Check if the mapping for a certain {@link AuthorizationMode} is empty.
     * @param mode The AuthorizationMode that should be checked.
     *
     * @return true if the mapping for the provided {@link AuthorizationMode} is empty.
     */
    boolean isEmpty(@NonNull AuthorizationMode mode);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy