|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.authz.server.session.AuthzSession
org.hyperic.hq.authz.shared.PermissionManager
org.hyperic.hq.authz.shared.PermissionManagerImpl
public class PermissionManagerImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.hyperic.hq.authz.shared.PermissionManager |
---|
PermissionManager.RolePermNativeSQL |
Field Summary |
---|
Fields inherited from class org.hyperic.hq.authz.shared.PermissionManager |
---|
OPERATION_PAGER |
Fields inherited from class org.hyperic.hq.authz.server.session.AuthzSession |
---|
ctx, log |
Constructor Summary | |
---|---|
PermissionManagerImpl()
|
Method Summary | |
---|---|
void |
check(java.lang.Integer subjectId,
java.lang.Integer typeId,
java.lang.Integer instanceId,
java.lang.Integer operationId)
Check permission. |
void |
check(java.lang.Integer subject,
ResourceType type,
java.lang.Integer instanceId,
java.lang.String operation)
Check permission. |
void |
check(java.lang.Integer subjectId,
java.lang.String resType,
java.lang.Integer instanceId,
java.lang.String operation)
Check permission. |
java.util.List |
findOperationScopeBySubject(AuthzSubject subj,
java.lang.Integer opId)
Find the list of instance ids for which a given subject id has a given operation. |
java.util.List |
findOperationScopeBySubject(AuthzSubject subj,
java.lang.String opName,
java.lang.String resType)
Find the list of instance ids for which a given subject id has the named operation in one of their roles or owns a resource for which the operation is valid |
Resource[] |
findOperationScopeBySubjectBatch(AuthzSubject whoami,
ResourceValue[] resArr,
java.lang.String[] opArr)
Find the list of resources for which a given subject id can perform specified operation. |
java.util.Collection |
findServiceResources(AuthzSubject subj,
java.lang.Boolean fsystem)
|
java.util.List |
findViewableResources(AuthzSubject subj,
java.lang.String searchFor,
PageControl pc)
Search viewable resources of any type |
java.util.List |
findViewableResources(AuthzSubject subj,
java.lang.String resType,
java.lang.String resName,
java.lang.String appdefTypeStr,
java.lang.Integer typeId,
PageControl pc)
Get viewable resources of a specific type |
java.lang.String |
getAlertDefsHQL()
|
java.lang.String |
getAlertsHQL(boolean inEscalation,
boolean notFixed,
java.lang.Integer groupId,
java.lang.Integer alertDefId,
boolean count)
|
java.util.List |
getAllOperations(AuthzSubject subject,
PageControl pc)
Get all operations for a given subject |
CloningBossInterface |
getCloningBoss()
Return the CloningBoss implementation |
java.lang.String |
getGroupAlertDefsHQL()
|
java.lang.String |
getGroupAlertsHQL(boolean inEscalation,
boolean notFixed,
java.lang.Integer groupId,
java.lang.Integer galertDefId)
|
java.util.Collection |
getGroupResources(java.lang.Integer subjectId,
java.lang.Integer groupId,
java.lang.Boolean fsystem)
|
HierarchicalAlertingManagerInterface |
getHierarchicalAlertingManager()
Return the HierarchicalAlertingManager implementation |
MaintenanceEventManagerInterface |
getMaintenanceEventManager()
Return the MaintenanceEventManager implementation |
java.lang.String |
getOperableGroupsHQL(AuthzSubject subject,
java.lang.String alias,
java.lang.String oper)
|
java.lang.String |
getResourceTypeSQL(java.lang.String instanceId,
java.lang.Integer subjectId,
java.lang.String resType,
java.lang.String op)
|
PermissionManager.RolePermNativeSQL |
getRolePermissionNativeSQL(java.lang.String resourceVar,
java.lang.String eventLogVar,
java.lang.String subjectParam,
java.lang.String opListViewResourcesParam,
java.lang.String opListManageAlertsParam)
|
java.lang.String |
getSQLWhere(java.lang.Integer subjectId)
Get a clause that you can append to an existing WHERE clause to make it authz-aware. |
boolean |
hasAdminPermission(java.lang.Integer who)
Check whether a user has permission to access the admin component. |
boolean |
hasGuestRole()
Check to see if user can see role dashboards |
EdgePermCheck |
makePermCheckHql(java.lang.String subjectParam,
java.lang.String resourceVar,
java.lang.String resourceParam,
java.lang.String distanceParam,
java.lang.String opsParam,
boolean includeDescendants)
Generates an object which aids in the creation of hierarchical, permission checking HQL. |
EdgePermCheck |
makePermCheckSql(java.lang.String subjectParam,
java.lang.String resVar,
java.lang.String resParam,
java.lang.String distanceParam,
java.lang.String opsParam,
boolean includeDescendants)
Generates an object which aids in the creation of hierarchical, permission checking SQL. |
Methods inherited from class org.hyperic.hq.authz.shared.PermissionManager |
---|
findResourceCount, getConnection, makePermCheckHql, makePermCheckSql |
Methods inherited from class org.hyperic.hq.authz.server.session.AuthzSession |
---|
findPrototype, findSubjectByAuth, getContainmentRelation, getInitialContext, getNetworkRelation, getOperationDAO, getResourceDAO, getResourceGroupDAO, getResourceTypeDAO, getRoleDAO, getRootResourceType, getSessionContext, getSubjectDAO, getVirtualRelation, lookupSubject, setSessionContext, toPojos |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissionManagerImpl()
Method Detail |
---|
public void check(java.lang.Integer subject, ResourceType type, java.lang.Integer instanceId, java.lang.String operation) throws PermissionException
PermissionManager
check
in class PermissionManager
subject
- The subject.type
- The type of the resource.instanceId
- The consumer's ID for the resource in question.operation
- The operation (as a String) that the subject may want
to perform.
PermissionException
- If subject is not authorized to
perform the given operation on the resource of the given type whose
id is instanceId.public void check(java.lang.Integer subjectId, java.lang.Integer typeId, java.lang.Integer instanceId, java.lang.Integer operationId) throws PermissionException
PermissionManager
check
in class PermissionManager
subjectId
- ID of the subject.typeId
- ID of the type of the resource.instanceId
- The consumer's ID for the resource in question.operationId
- ID of the operation that the subject may want
to perform.
PermissionException
- If subject is not authorized to
perform the given operation on the resource of the given type whose
id is instanceId.public void check(java.lang.Integer subjectId, java.lang.String resType, java.lang.Integer instanceId, java.lang.String operation) throws PermissionException
PermissionManager
check
in class PermissionManager
subjectId
- ID of the subject.instanceId
- The consumer's ID for the resource in question.
PermissionException
- If subject is not authorized to
perform the given operation on the resource of the given type whose
id is instanceId.public boolean hasAdminPermission(java.lang.Integer who)
PermissionManager
hasAdminPermission
in class PermissionManager
public java.util.List findOperationScopeBySubject(AuthzSubject subj, java.lang.String opName, java.lang.String resType) throws javax.ejb.FinderException, PermissionException
PermissionManager
findOperationScopeBySubject
in class PermissionManager
javax.ejb.FinderException
PermissionException
public java.util.List findOperationScopeBySubject(AuthzSubject subj, java.lang.Integer opId) throws javax.ejb.FinderException, PermissionException
PermissionManager
findOperationScopeBySubject
in class PermissionManager
javax.ejb.FinderException
PermissionException
public Resource[] findOperationScopeBySubjectBatch(AuthzSubject whoami, ResourceValue[] resArr, java.lang.String[] opArr) throws javax.ejb.FinderException
PermissionManager
findOperationScopeBySubjectBatch
in class PermissionManager
whoami
- - subjectresArr
- - batch of resources to verifyopArr
- - corresponding batch of operations
javax.ejb.FinderException
public java.util.List findViewableResources(AuthzSubject subj, java.lang.String resType, java.lang.String resName, java.lang.String appdefTypeStr, java.lang.Integer typeId, PageControl pc)
PermissionManager
findViewableResources
in class PermissionManager
resType
- the authz resource type nameresName
- if result should filter by resource nameappdefTypeStr
- the Appdef type name, like 'platform', 'server', etctypeId
- the appdef type ID, e.g. the platform_type_id
public java.util.List findViewableResources(AuthzSubject subj, java.lang.String searchFor, PageControl pc)
PermissionManager
findViewableResources
in class PermissionManager
public java.lang.String getResourceTypeSQL(java.lang.String instanceId, java.lang.Integer subjectId, java.lang.String resType, java.lang.String op)
getResourceTypeSQL
in class PermissionManager
public java.util.List getAllOperations(AuthzSubject subject, PageControl pc) throws PermissionException, javax.ejb.FinderException
PermissionManager
getAllOperations
in class PermissionManager
PermissionException
javax.ejb.FinderException
public java.util.Collection getGroupResources(java.lang.Integer subjectId, java.lang.Integer groupId, java.lang.Boolean fsystem)
getGroupResources
in class PermissionManager
public java.util.Collection findServiceResources(AuthzSubject subj, java.lang.Boolean fsystem)
findServiceResources
in class PermissionManager
public PermissionManager.RolePermNativeSQL getRolePermissionNativeSQL(java.lang.String resourceVar, java.lang.String eventLogVar, java.lang.String subjectParam, java.lang.String opListViewResourcesParam, java.lang.String opListManageAlertsParam)
getRolePermissionNativeSQL
in class PermissionManager
public java.lang.String getAlertsHQL(boolean inEscalation, boolean notFixed, java.lang.Integer groupId, java.lang.Integer alertDefId, boolean count)
getAlertsHQL
in class PermissionManager
public java.lang.String getAlertDefsHQL()
getAlertDefsHQL
in class PermissionManager
public java.lang.String getGroupAlertsHQL(boolean inEscalation, boolean notFixed, java.lang.Integer groupId, java.lang.Integer galertDefId)
getGroupAlertsHQL
in class PermissionManager
public java.lang.String getGroupAlertDefsHQL()
getGroupAlertDefsHQL
in class PermissionManager
public boolean hasGuestRole()
PermissionManager
hasGuestRole
in class PermissionManager
public EdgePermCheck makePermCheckSql(java.lang.String subjectParam, java.lang.String resVar, java.lang.String resParam, java.lang.String distanceParam, java.lang.String opsParam, boolean includeDescendants)
PermissionManager
makePermCheckSql
in class PermissionManager
includeDescendants
- - include the resource's descendants in the querypublic EdgePermCheck makePermCheckHql(java.lang.String subjectParam, java.lang.String resourceVar, java.lang.String resourceParam, java.lang.String distanceParam, java.lang.String opsParam, boolean includeDescendants)
PermissionManager
makePermCheckHql
in class PermissionManager
includeDescendants
- - include the resource's descendants in the querypublic java.lang.String getOperableGroupsHQL(AuthzSubject subject, java.lang.String alias, java.lang.String oper)
getOperableGroupsHQL
in class PermissionManager
public java.lang.String getSQLWhere(java.lang.Integer subjectId)
PermissionManager
getSQLWhere
in class PermissionManager
public MaintenanceEventManagerInterface getMaintenanceEventManager()
PermissionManager
getMaintenanceEventManager
in class PermissionManager
public CloningBossInterface getCloningBoss()
PermissionManager
getCloningBoss
in class PermissionManager
public HierarchicalAlertingManagerInterface getHierarchicalAlertingManager()
PermissionManager
getHierarchicalAlertingManager
in class PermissionManager
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |