edu.internet2.middleware.grouper.internal.dao
Interface PermissionEntryDAO

All Superinterfaces:
GrouperDAO
All Known Implementing Classes:
Hib3PermissionEntryDAO

public interface PermissionEntryDAO
extends GrouperDAO

Basic PermissionEntry DAO interface.

Version:
$Id: PermissionEntryDAO.java,v 1.3 2009-10-26 04:52:17 mchyzer Exp $
Author:
mchyzer

Method Summary
 Set<PermissionEntry> findByMemberId(String memberId)
          find all permissions that a subject has
 Set<PermissionEntry> findByMemberIdAndAttributeDefNameId(String memberId, String attributeDefNameId)
          get attribute assigns by member and attribute def name id
 Set<PermissionEntry> findPermissions(Collection<String> attributeDefIds, Collection<String> attributeDefNameIds, Collection<String> roleIds, Collection<String> actions, Boolean enabled, Collection<String> memberIds)
          securely search for assignments.
 boolean hasPermissionBySubjectIdSourceIdActionAttributeDefName(String subjectId, String sourceId, String action, String attributeDefNameName)
          see if the permission exists and is enabled
 

Method Detail

findByMemberId

Set<PermissionEntry> findByMemberId(String memberId)
find all permissions that a subject has

Parameters:
memberId -
Returns:
the permissions

findByMemberIdAndAttributeDefNameId

Set<PermissionEntry> findByMemberIdAndAttributeDefNameId(String memberId,
                                                         String attributeDefNameId)
get attribute assigns by member and attribute def name id

Parameters:
memberId -
attributeDefNameId -
Returns:
set of assigns or empty if none there

hasPermissionBySubjectIdSourceIdActionAttributeDefName

boolean hasPermissionBySubjectIdSourceIdActionAttributeDefName(String subjectId,
                                                               String sourceId,
                                                               String action,
                                                               String attributeDefNameName)
see if the permission exists and is enabled

Parameters:
subjectId -
sourceId -
action -
attributeDefNameName -
Returns:
true if has permissions and is enabled

findPermissions

Set<PermissionEntry> findPermissions(Collection<String> attributeDefIds,
                                     Collection<String> attributeDefNameIds,
                                     Collection<String> roleIds,
                                     Collection<String> actions,
                                     Boolean enabled,
                                     Collection<String> memberIds)
securely search for assignments. need to pass in either the assign ids, def ids, def name ids, or group ids cannot have more than 100 bind variables

Parameters:
attributeDefIds - optional
attributeDefNameIds - mutually exclusive with attributeDefIds
roleIds - optional
actions - (null means all actions)
enabled - (null means all, true means enabled, false means disabled)
memberIds -
Returns:
the permissions