|
||||||||||
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.PermissionServiceImpl
public class PermissionServiceImpl
Constructor Summary | |
---|---|
PermissionServiceImpl()
|
Method Summary | |
---|---|
Permission |
createPermission(Permission permission)
This will create a Permission exactly like the permission passed in. |
Permission |
findPermByNamespaceCodeAndName(String namespaceCode,
String permissionName)
Get the Permission object with the unique combination of namespace and permission name. |
PermissionQueryResults |
findPermissions(QueryByCriteria queryByCriteria)
This method find Permissions based on a query criteria. |
TemplateQueryResults |
findPermissionTemplates(QueryByCriteria queryByCriteria)
This method find Permission Templates based on a query criteria. |
List<Permission> |
findPermsByNamespaceCodeTemplateName(String namespaceCode,
String permissionTemplateName)
Return the permission object for the given unique combination of namespace, component and permission template name. |
Template |
findPermTemplateByNamespaceCodeAndName(String namespaceCode,
String permissionTemplateName)
Return the Permission Template given the Template Name and Namespace Code. |
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<org.kuali.rice.kim.impl.permission.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> |
getPermissionAssigneesByTemplateName(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 org.kuali.rice.kim.impl.permission.PermissionBo |
getPermissionBoByName(String namespaceCode,
String permissionName)
|
protected org.kuali.rice.kim.impl.permission.PermissionBo |
getPermissionImpl(String permissionId)
|
protected List<org.kuali.rice.kim.impl.permission.PermissionBo> |
getPermissionImplsByName(String namespaceCode,
String permissionName)
|
protected List<org.kuali.rice.kim.impl.permission.PermissionBo> |
getPermissionImplsByTemplateName(String namespaceCode,
String permissionTemplateName)
|
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. |
protected PermissionTypeService |
getPermissionTypeService(org.kuali.rice.kim.impl.permission.PermissionTemplateBo permissionTemplate)
|
protected Map<String,PermissionTypeService> |
getPermissionTypeServicesByTemplateId(Collection<org.kuali.rice.kim.impl.permission.PermissionBo> permissions)
|
List<String> |
getRoleIdsForPermission(String namespaceCode,
String permissionName,
Map<String,String> permissionDetails)
Get the role IDs for the given permission. |
protected List<String> |
getRoleIdsForPermissionTemplate(String namespaceCode,
String permissionTemplateName,
Map<String,String> permissionDetails)
|
protected Map<String,List<Permission>> |
groupPermissionsByTemplate(Collection<org.kuali.rice.kim.impl.permission.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 |
isPermissionDefined(String namespaceCode,
String permissionName,
Map<String,String> permissionDetails)
Returns true if the given permission is defined on any Roles. |
boolean |
isPermissionDefinedByTemplateName(String namespaceCode,
String permissionTemplateName,
Map<String,String> permissionDetails)
Returns true if the given permission template is defined on any Roles. |
void |
setBusinessObjectService(BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value. |
void |
setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
Sets the criteriaLookupService attribute value. |
void |
setDefaultPermissionTypeService(PermissionTypeService defaultPermissionTypeService)
Sets the defaultPermissionTypeService attribute value. |
void |
setKimTypeInfoService(KimTypeInfoService kimTypeInfoService)
Sets the kimTypeInfoService attribute value. |
void |
setRoleService(RoleService roleService)
Sets the roleService attribute value. |
Permission |
updatePermission(Permission permission)
This will update a Permission . |
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(org.kuali.rice.kim.impl.permission.PermissionTemplateBo permissionTemplate)
public boolean hasPermission(String principalId, String namespaceCode, String permissionName, Map<String,String> permissionDetails) throws RiceIllegalArgumentException
PermissionService
hasPermission
in interface PermissionService
RiceIllegalArgumentException
public boolean isAuthorized(String principalId, String namespaceCode, String permissionName, Map<String,String> permissionDetails, Map<String,String> qualification) throws RiceIllegalArgumentException
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
RiceIllegalArgumentException
public boolean hasPermissionByTemplateName(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails) throws RiceIllegalArgumentException
PermissionService
hasPermissionByTemplateName
in interface PermissionService
RiceIllegalArgumentException
public boolean isAuthorizedByTemplateName(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification) throws RiceIllegalArgumentException
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
RiceIllegalArgumentException
public List<Permission> getAuthorizedPermissions(String principalId, String namespaceCode, String permissionName, Map<String,String> permissionDetails, Map<String,String> qualification) throws RiceIllegalArgumentException
PermissionService
getAuthorizedPermissions
in interface PermissionService
RiceIllegalArgumentException
public List<Permission> getAuthorizedPermissionsByTemplateName(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification) throws RiceIllegalArgumentException
PermissionService
getAuthorizedPermissionsByTemplateName
in interface PermissionService
RiceIllegalArgumentException
protected List<Permission> getPermissionsForUser(String principalId, List<Permission> permissions, Map<String,String> qualification)
protected Map<String,PermissionTypeService> getPermissionTypeServicesByTemplateId(Collection<org.kuali.rice.kim.impl.permission.PermissionBo> permissions)
protected Map<String,List<Permission>> groupPermissionsByTemplate(Collection<org.kuali.rice.kim.impl.permission.PermissionBo> permissions)
protected List<Permission> getMatchingPermissions(List<org.kuali.rice.kim.impl.permission.PermissionBo> permissions, Map<String,String> permissionDetails)
public List<Assignee> getPermissionAssignees(String namespaceCode, String permissionName, Map<String,String> permissionDetails, Map<String,String> qualification) throws RiceIllegalArgumentException
PermissionService
getPermissionAssignees
in interface PermissionService
RiceIllegalArgumentException
public List<Assignee> getPermissionAssigneesByTemplateName(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification) throws RiceIllegalArgumentException
PermissionService
getPermissionAssigneesByTemplateName
in interface PermissionService
RiceIllegalArgumentException
public boolean isPermissionDefined(String namespaceCode, String permissionName, Map<String,String> permissionDetails) throws RiceIllegalArgumentException
PermissionService
isPermissionDefined
in interface PermissionService
RiceIllegalArgumentException
public boolean isPermissionDefinedByTemplateName(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails) throws RiceIllegalArgumentException
PermissionService
isPermissionDefinedByTemplateName
in interface PermissionService
RiceIllegalArgumentException
public List<String> getRoleIdsForPermission(String namespaceCode, String permissionName, Map<String,String> permissionDetails) throws RiceIllegalArgumentException
PermissionService
getRoleIdsForPermission
in interface PermissionService
RiceIllegalArgumentException
protected List<String> getRoleIdsForPermissionTemplate(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails)
public Permission getPermission(String permissionId) throws RiceIllegalArgumentException
PermissionService
getPermission
in interface PermissionService
RiceIllegalArgumentException
public List<Permission> findPermsByNamespaceCodeTemplateName(String namespaceCode, String permissionTemplateName) throws RiceIllegalArgumentException
PermissionService
findPermsByNamespaceCodeTemplateName
in interface PermissionService
RiceIllegalArgumentException
protected org.kuali.rice.kim.impl.permission.PermissionBo getPermissionImpl(String permissionId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
protected List<org.kuali.rice.kim.impl.permission.PermissionBo> getPermissionImplsByTemplateName(String namespaceCode, String permissionTemplateName)
protected List<org.kuali.rice.kim.impl.permission.PermissionBo> getPermissionImplsByName(String namespaceCode, String permissionName)
public Template getPermissionTemplate(String permissionTemplateId) throws RiceIllegalArgumentException
PermissionService
getPermissionTemplate
in interface PermissionService
RiceIllegalArgumentException
public Template findPermTemplateByNamespaceCodeAndName(String namespaceCode, String permissionTemplateName) throws RiceIllegalArgumentException
PermissionService
findPermTemplateByNamespaceCodeAndName
in interface PermissionService
RiceIllegalArgumentException
public List<Template> getAllTemplates()
PermissionService
getAllTemplates
in interface PermissionService
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
public Permission updatePermission(Permission permission) throws RiceIllegalArgumentException, RiceIllegalStateException
PermissionService
Permission
.
updatePermission
in interface PermissionService
permission
- the permission to update
RiceIllegalArgumentException
RiceIllegalStateException
public Permission findPermByNamespaceCodeAndName(String namespaceCode, String permissionName) throws RiceIllegalArgumentException
PermissionService
null
.
findPermByNamespaceCodeAndName
in interface PermissionService
RiceIllegalArgumentException
protected org.kuali.rice.kim.impl.permission.PermissionBo getPermissionBoByName(String namespaceCode, String permissionName)
public PermissionQueryResults findPermissions(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
PermissionService
findPermissions
in interface PermissionService
queryByCriteria
- the criteria. Cannot be null.
RiceIllegalArgumentException
public TemplateQueryResults findPermissionTemplates(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
PermissionService
findPermissionTemplates
in interface PermissionService
queryByCriteria
- the criteria. Cannot be null.
RiceIllegalArgumentException
public void setKimTypeInfoService(KimTypeInfoService kimTypeInfoService)
kimTypeInfoService
- The kimTypeInfoService to set.public void setDefaultPermissionTypeService(PermissionTypeService defaultPermissionTypeService)
defaultPermissionTypeService
- The defaultPermissionTypeService to set.public void setRoleService(RoleService roleService)
roleService
- The roleService to set.public void setBusinessObjectService(BusinessObjectService businessObjectService)
businessObjectService
- The businessObjectService to set.public void setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
criteriaLookupService
- The criteriaLookupService to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |