|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kim.impl.permission.PermissionServiceBase org.kuali.rice.kim.impl.permission.PermissionServiceImpl
public class PermissionServiceImpl
This is a description of what this class does - jonathan don't forget to fill this in.
Field Summary |
---|
Fields inherited from class org.kuali.rice.kim.impl.permission.PermissionServiceBase |
---|
businessObjectService, criteriaLookupService, DEFAULT_PERMISSION_TYPE_SERVICE |
Constructor Summary | |
---|---|
PermissionServiceImpl()
|
Method Summary | |
---|---|
Permission |
createPermission(Permission permission)
This will create a Permission exactly like the permission passed in. |
List<Template> |
getAllTemplates()
Return all Permission Templates. |
List<Permission> |
getAuthorizedPermissions(String principalId,
String namespaceCode,
String permissionName,
Map<String,String> permissionDetails,
Map<String,String> qualification)
Returns permissions (with their details) that are granted to the principal given the passed qualification. |
List<Permission> |
getAuthorizedPermissionsByTemplateName(String principalId,
String namespaceCode,
String permissionTemplateName,
Map<String,String> permissionDetails,
Map<String,String> qualification)
Returns permissions (with their details) that are granted to the principal given the passed qualification. |
protected List<Permission> |
getMatchingPermissions(List<PermissionBo> permissions,
Map<String,String> permissionDetails)
Compare each of the passed in permissions with the given permissionDetails. |
Permission |
getPermission(String permissionId)
Get the permission object with the given ID. |
List<Assignee> |
getPermissionAssignees(String namespaceCode,
String permissionName,
Map<String,String> permissionDetails,
Map<String,String> qualification)
Get the list of principals/groups who have a given permission. |
List<Assignee> |
getPermissionAssigneesForTemplateName(String namespaceCode,
String permissionTemplateName,
Map<String,String> permissionDetails,
Map<String,String> qualification)
Get the list of principals/groups who have a given permission that match the given permission template and permission details. |
protected PermissionBo |
getPermissionBoByName(String namespaceCode,
String permissionName)
|
Permission |
getPermissionByName(String namespaceCode,
String permissionName)
Get the Permission object with the unique combination of namespace and permission name. |
PermissionDao |
getPermissionDao()
|
String |
getPermissionDetailLabel(String permissionId,
String kimTypeId,
String attributeName)
Returns the label of the permission detail for the given permissionId, kimType and attributeName. |
protected PermissionBo |
getPermissionImpl(String permissionId)
|
protected List<PermissionBo> |
getPermissionImplsByName(String namespaceCode,
String permissionName)
|
protected List<PermissionBo> |
getPermissionImplsByNameIncludingInactive(String namespaceCode,
String permissionName)
|
protected List<PermissionBo> |
getPermissionImplsByTemplateName(String namespaceCode,
String permissionTemplateName)
|
List<Permission> |
getPermissionsByName(String namespaceCode,
String permissionName)
Return the permission object for the given unique combination of namespace, component and permission name. |
List<Permission> |
getPermissionsByNameIncludingInactive(String namespaceCode,
String permissionName)
Return the permission object for the given unique combination of namespace, component and permission name. |
List<Permission> |
getPermissionsByTemplateName(String namespaceCode,
String permissionTemplateName)
Return the permission object for the given unique combination of namespace, component and permission template name. |
protected List<Permission> |
getPermissionsForUser(String principalId,
List<Permission> permissions,
Map<String,String> qualification)
Checks the list of permissions against the principal's roles and returns a subset of the list which match. |
Template |
getPermissionTemplate(String permissionTemplateId)
Return the Permission Template given the Template ID. |
Template |
getPermissionTemplateByName(String namespaceCode,
String permissionTemplateName)
Return the Permission Template given the Template Name and Namespace Code. |
protected PermissionTypeService |
getPermissionTypeService(PermissionTemplateBo permissionTemplate)
|
protected PermissionTypeService |
getPermissionTypeService(String namespaceCode,
String permissionTemplateName,
String permissionName,
String permissionId)
|
protected Map<String,PermissionTypeService> |
getPermissionTypeServicesByTemplateId(Collection<PermissionBo> permissions)
|
List<String> |
getRoleIdsForPermission(String namespaceCode,
String permissionName,
Map<String,String> permissionDetails)
Get the role IDs for the given permission. |
List<String> |
getRoleIdsForPermissionId(String permissionId)
Get the role IDs for the given permission. |
List<String> |
getRoleIdsForPermissions(List<Permission> permissions)
Get the role IDs for the given list of permissions. |
protected List<String> |
getRoleIdsForPermissionTemplate(String namespaceCode,
String permissionTemplateName,
Map<String,String> permissionDetails)
|
protected Map<String,List<Permission>> |
groupPermissionsByTemplate(Collection<PermissionBo> permissions)
|
boolean |
hasPermission(String principalId,
String namespaceCode,
String permissionName,
Map<String,String> permissionDetails)
Checks whether the principal has been granted a permission matching the given details without taking role qualifiers into account. |
boolean |
hasPermissionByTemplateName(String principalId,
String namespaceCode,
String permissionTemplateName,
Map<String,String> permissionDetails)
Checks whether the principal has been granted a permission matching the given details without taking role qualifiers into account. |
boolean |
isAuthorized(String principalId,
String namespaceCode,
String permissionName,
Map<String,String> permissionDetails,
Map<String,String> qualification)
Checks whether the given qualified permission is granted to the principal given the passed roleQualification. |
boolean |
isAuthorizedByTemplateName(String principalId,
String namespaceCode,
String permissionTemplateName,
Map<String,String> permissionDetails,
Map<String,String> qualification)
Checks whether the given qualified permission is granted to the principal given the passed roleQualification. |
boolean |
isPermissionAssigned(String namespaceCode,
String permissionName,
Map<String,String> permissionDetails)
|
boolean |
isPermissionDefined(String namespaceCode,
String permissionName,
Map<String,String> permissionDetails)
Returns true if the given permission is defined on any Roles. |
boolean |
isPermissionDefinedForTemplateName(String namespaceCode,
String permissionTemplateName,
Map<String,String> permissionDetails)
Returns true if the given permission template is defined on any Roles. |
List<Permission> |
lookupPermissions(Map<String,String> searchCriteria,
boolean unbounded)
Search for permissions using arbitrary search criteria. |
void |
setBusinessObjectDictionaryService(BusinessObjectDictionaryService businessObjectDictionaryService)
Sets the businessObjectDictionaryService attribute value. |
void |
setDataDictionaryService(DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService attribute value. |
void |
setDefaultPermissionTypeService(PermissionTypeService defaultPermissionTypeService)
Sets the defaultPermissionTypeService attribute value. |
void |
setKimTypeInfoService(KimTypeInfoService kimTypeInfoService)
Sets the kimTypeInfoService attribute value. |
void |
setPermissionDao(PermissionDao permissionDao)
|
void |
setRoleService(RoleService roleService)
Sets the roleService attribute value. |
Permission |
updatePermission(Permission permission)
This will update a Permission . |
Methods inherited from class org.kuali.rice.kim.impl.permission.PermissionServiceBase |
---|
setBusinessObjectService, setCriteriaLookupService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissionServiceImpl()
Method Detail |
---|
protected PermissionTypeService getPermissionTypeService(String namespaceCode, String permissionTemplateName, String permissionName, String permissionId)
protected PermissionTypeService getPermissionTypeService(PermissionTemplateBo permissionTemplate)
public boolean hasPermission(String principalId, String namespaceCode, String permissionName, Map<String,String> permissionDetails)
PermissionService
hasPermission
in interface PermissionService
org.kuali.rice.kim.service.PermissionService#hasPermission(java.lang.String, String, java.lang.String, Map)
public boolean isAuthorized(String principalId, String namespaceCode, String permissionName, Map<String,String> permissionDetails, Map<String,String> qualification)
PermissionService
#hasPermission(String, String, String, Map)
.
Each role assigned to the principal is checked for qualifications. If a qualifier
exists on the principal's membership in that role, that is checked first through
the role's type service. Once it is determined that the principal has the role
in the given context (qualification), the permissions are examined.
Each permission is checked against the permissionDetails. The PermissionTypeService
is called for each permission with the given permissionName to see if the
permissionDetails matches its details.
isAuthorized
in interface PermissionService
public boolean hasPermissionByTemplateName(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails)
PermissionService
hasPermissionByTemplateName
in interface PermissionService
public boolean isAuthorizedByTemplateName(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification)
PermissionService
#hasPermission(String, String, String, Map)
.
Each role assigned to the principal is checked for qualifications. If a qualifier
exists on the principal's membership in that role, that is checked first through
the role's type service. Once it is determined that the principal has the role
in the given context (qualification), the permissions are examined.
Each permission is checked against the permissionDetails. The PermissionTypeService
is called for each permission with the given permissionName to see if the
permissionDetails matches its details.
isAuthorizedByTemplateName
in interface PermissionService
public List<Permission> getAuthorizedPermissions(String principalId, String namespaceCode, String permissionName, Map<String,String> permissionDetails, Map<String,String> qualification)
PermissionService
getAuthorizedPermissions
in interface PermissionService
public List<Permission> getAuthorizedPermissionsByTemplateName(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification)
PermissionService
getAuthorizedPermissionsByTemplateName
in interface PermissionService
protected List<Permission> getPermissionsForUser(String principalId, List<Permission> permissions, Map<String,String> qualification)
protected Map<String,PermissionTypeService> getPermissionTypeServicesByTemplateId(Collection<PermissionBo> permissions)
protected Map<String,List<Permission>> groupPermissionsByTemplate(Collection<PermissionBo> permissions)
protected List<Permission> getMatchingPermissions(List<PermissionBo> permissions, Map<String,String> permissionDetails)
public List<Assignee> getPermissionAssignees(String namespaceCode, String permissionName, Map<String,String> permissionDetails, Map<String,String> qualification)
PermissionService
getPermissionAssignees
in interface PermissionService
public List<Assignee> getPermissionAssigneesForTemplateName(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification)
PermissionService
getPermissionAssigneesForTemplateName
in interface PermissionService
public boolean isPermissionAssigned(String namespaceCode, String permissionName, Map<String,String> permissionDetails)
public boolean isPermissionDefined(String namespaceCode, String permissionName, Map<String,String> permissionDetails)
PermissionService
isPermissionDefined
in interface PermissionService
public boolean isPermissionDefinedForTemplateName(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails)
PermissionService
isPermissionDefinedForTemplateName
in interface PermissionService
public List<String> getRoleIdsForPermission(String namespaceCode, String permissionName, Map<String,String> permissionDetails)
PermissionService
getRoleIdsForPermission
in interface PermissionService
protected List<String> getRoleIdsForPermissionTemplate(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails)
public List<String> getRoleIdsForPermissions(List<Permission> permissions)
PermissionService
getRoleIdsForPermissions
in interface PermissionService
public Permission getPermission(String permissionId)
PermissionService
getPermission
in interface PermissionService
PermissionService.getPermission(java.lang.String)
public List<Permission> getPermissionsByTemplateName(String namespaceCode, String permissionTemplateName)
PermissionService
getPermissionsByTemplateName
in interface PermissionService
PermissionService.getPermissionsByTemplateName(String, String)
public List<Permission> getPermissionsByName(String namespaceCode, String permissionName)
PermissionService
getPermissionsByName
in interface PermissionService
PermissionService.getPermissionsByName(String, String)
protected PermissionBo getPermissionImpl(String permissionId)
protected List<PermissionBo> getPermissionImplsByTemplateName(String namespaceCode, String permissionTemplateName)
protected List<PermissionBo> getPermissionImplsByName(String namespaceCode, String permissionName)
public PermissionDao getPermissionDao()
public void setPermissionDao(PermissionDao permissionDao)
public List<Permission> lookupPermissions(Map<String,String> searchCriteria, boolean unbounded)
PermissionService
lookupPermissions
in interface PermissionService
public String getPermissionDetailLabel(String permissionId, String kimTypeId, String attributeName)
PermissionService
getPermissionDetailLabel
in interface PermissionService
public Template getPermissionTemplate(String permissionTemplateId)
PermissionService
getPermissionTemplate
in interface PermissionService
PermissionService.getPermissionTemplate(java.lang.String)
public Template getPermissionTemplateByName(String namespaceCode, String permissionTemplateName)
PermissionService
getPermissionTemplateByName
in interface PermissionService
PermissionService.getPermissionTemplateByName(java.lang.String, java.lang.String)
public List<Template> getAllTemplates()
PermissionService
getAllTemplates
in interface PermissionService
public List<String> getRoleIdsForPermissionId(String permissionId)
PermissionService
getRoleIdsForPermissionId
in interface PermissionService
public List<Permission> getPermissionsByNameIncludingInactive(String namespaceCode, String permissionName)
PermissionService
getPermissionsByNameIncludingInactive
in interface PermissionService
protected List<PermissionBo> getPermissionImplsByNameIncludingInactive(String namespaceCode, String permissionName)
public Permission createPermission(Permission permission) throws RiceIllegalArgumentException, RiceIllegalStateException
PermissionService
Permission
exactly like the permission passed in.
createPermission
in interface PermissionService
permission
- the permission to create
RiceIllegalArgumentException
RiceIllegalStateException
PermissionService.createPermission(org.kuali.rice.kim.api.permission.Permission)
public Permission updatePermission(Permission permission) throws RiceIllegalArgumentException, RiceIllegalStateException
PermissionService
Permission
.
updatePermission
in interface PermissionService
permission
- the permission to update
RiceIllegalArgumentException
RiceIllegalStateException
PermissionService.updatePermission(org.kuali.rice.kim.api.permission.Permission)
public Permission getPermissionByName(String namespaceCode, String permissionName)
PermissionService
null
.
getPermissionByName
in interface PermissionService
protected PermissionBo getPermissionBoByName(String namespaceCode, String permissionName)
public void setDataDictionaryService(DataDictionaryService dataDictionaryService)
dataDictionaryService
- The dataDictionaryService to set.public void setKimTypeInfoService(KimTypeInfoService kimTypeInfoService)
kimTypeInfoService
- The kimTypeInfoService to set.public void setDefaultPermissionTypeService(PermissionTypeService defaultPermissionTypeService)
defaultPermissionTypeService
- The defaultPermissionTypeService to set.public void setBusinessObjectDictionaryService(BusinessObjectDictionaryService businessObjectDictionaryService)
businessObjectDictionaryService
- The businessObjectDictionaryService to set.public void setRoleService(RoleService roleService)
roleService
- The roleService to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |