@Override
    public WsGetPermissionAssignmentsResults getPermissionAssignments(final GrouperPermissionAssignmentsQuery query) {
        val gcGetPermissionAssignments = new GcGetPermissionAssignments();
        FunctionUtils.doIfNotBlank(query.getAttributeDefinitionName(), gcGetPermissionAssignments::addAttributeDefName);
        FunctionUtils.doIfNotBlank(query.getRoleName(), gcGetPermissionAssignments::addAttributeDefName);
        FunctionUtils.doIfNotBlank(query.getRoleUuid(), gcGetPermissionAssignments::addRoleUuid);
        FunctionUtils.doIfNotBlank(query.getSubjectAttributeName(), gcGetPermissionAssignments::addSubjectAttributeName);

        if (StringUtils.isNotBlank(query.getSubjectId()) || StringUtils.isNotBlank(query.getSubjectIdentifier())) {
            val wsSubjectLookup = new WsSubjectLookup();
            wsSubjectLookup.setSubjectId(query.getSubjectId());
            wsSubjectLookup.setSubjectIdentifier(query.getSubjectIdentifier());
            wsSubjectLookup.setSubjectSourceId(query.getSubjectSourceId());
            gcGetPermissionAssignments.addSubjectLookup(wsSubjectLookup);
        }

        return gcGetPermissionAssignments.execute();
    }
This is {@link DefaultGrouperFacade} that acts as a wrapper
in front of the grouper API.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-grouper-core/src/main/java/org/apereo/cas/grouper/DefaultGrouperFacade.java