Search in sources :

Example 6 with ResourceSetPermission

use of org.xdi.oxauth.model.uma.persistence.ResourceSetPermission in project oxAuth by GluuFederation.

the class ResourceSetPermissionManager method getResourceSetPermissionByConfigurationCode.

public ResourceSetPermission getResourceSetPermissionByConfigurationCode(String p_configurationCode, String clientDn) {
    try {
        final Filter filter = Filter.create(String.format("&(oxConfigurationCode=%s)", p_configurationCode));
        final List<ResourceSetPermission> entries = ldapEntryManager.findEntries(clientDn, ResourceSetPermission.class, filter);
        if (entries != null && !entries.isEmpty()) {
            return entries.get(0);
        }
    } catch (Exception e) {
        log.trace(e.getMessage(), e);
    }
    return null;
}
Also used : Filter(com.unboundid.ldap.sdk.Filter) ResourceSetPermission(org.xdi.oxauth.model.uma.persistence.ResourceSetPermission) LDAPException(com.unboundid.ldap.sdk.LDAPException)

Aggregations

ResourceSetPermission (org.xdi.oxauth.model.uma.persistence.ResourceSetPermission)6 LDAPException (com.unboundid.ldap.sdk.LDAPException)3 Filter (com.unboundid.ldap.sdk.Filter)2 WebApplicationException (javax.ws.rs.WebApplicationException)2 ApiOperation (com.wordnik.swagger.annotations.ApiOperation)1 ApiResponses (com.wordnik.swagger.annotations.ApiResponses)1 Date (java.util.Date)1 List (java.util.List)1 Consumes (javax.ws.rs.Consumes)1 POST (javax.ws.rs.POST)1 Produces (javax.ws.rs.Produces)1 BatchOperation (org.gluu.site.ldap.persistence.BatchOperation)1 UmaRPT (org.xdi.oxauth.model.common.uma.UmaRPT)1 Client (org.xdi.oxauth.model.registration.Client)1 PermissionTicket (org.xdi.oxauth.model.uma.PermissionTicket)1 UmaPermission (org.xdi.oxauth.model.uma.UmaPermission)1