|
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.appdef.server.session.AppdefSessionUtil
org.hyperic.hq.appdef.server.session.AppdefSessionEJB
public abstract class AppdefSessionEJB
Parent abstract class of all appdef session ejbs
Field Summary | |
---|---|
protected javax.ejb.SessionContext |
_ctx
|
protected javax.naming.InitialContext |
_ic
|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
AppdefSessionEJB()
|
Method Summary | |
---|---|
void |
changeOwner(AuthzSubject who,
AppdefResource res,
AuthzSubject newOwner)
Change appdef entity owner |
void |
checkAIScanPermission(AuthzSubject subject,
AppdefEntityID id)
Check to see if the subject can perform an autoinventory scan on the specified resource. |
void |
checkAlertingPermission(AuthzSubject subject,
AppdefEntityID id)
Check for manage alerts permission for a given resource |
java.util.List |
checkAlertingScope(AuthzSubject subj)
Check the scope of alertable resources for a give subject |
void |
checkControlPermission(AuthzSubject subject,
AppdefEntityID id)
Check for control permission for a given resource |
void |
checkCreateChildPermission(AuthzSubject subject,
AppdefEntityID id)
Check for create child object permission for a given resource Child Resources: Platforms -> servers Servers -> services Any other resource will throw an InvalidAppdefTypeException since no other resources have this parent->child relationship with respect to their permissions |
void |
checkCreatePlatformPermission(AuthzSubject subject)
Check for createPlatform permission for a resource |
void |
checkModifyPermission(AuthzSubject subject,
AppdefEntityID id)
Check for modify permission for a given resource |
void |
checkMonitorPermission(AuthzSubject subject,
AppdefEntityID id)
Check for monitor permission for a given resource |
protected void |
checkPermission(AuthzSubject subject,
AppdefEntityID id,
java.lang.String operation)
Check a permission |
protected void |
checkPermission(AuthzSubject subject,
ResourceType rtV,
java.lang.Integer id,
java.lang.String operation)
Check a permission |
void |
checkRemovePermission(AuthzSubject subject,
AppdefEntityID id)
Check for control permission for a given resource |
void |
checkViewPermission(AuthzSubject subject,
AppdefEntityID id)
Check for view permission for a given resource |
protected Resource |
createAuthzResource(AuthzSubject who,
ResourceType resType,
Resource prototype,
java.lang.Integer id,
java.lang.String name,
boolean fsystem,
Resource parent)
Create an authz resource |
protected Resource |
createAuthzResource(AuthzSubject who,
ResourceType resType,
Resource prototype,
java.lang.Integer id,
java.lang.String name,
Resource parent)
Create an authz resource |
protected void |
deleteCustomProperties(AppdefEntityID aeid)
|
protected java.util.Collection |
filterResourceTypes(java.util.Collection resources)
builds a list of resource types from the list of resources |
protected java.util.List |
filterViewableServers(java.util.Collection servers,
AuthzSubject who)
Filter a list of Server s by their viewability by the subject |
protected ResourceType |
getApplicationPrototypeResourceType()
|
protected ResourceType |
getApplicationResourceType()
Get the application resource type |
protected ResourceType |
getAuthzResourceType(AppdefEntityID id)
Get the authz resource type by AppdefEntityId |
ResourceType |
getGroupResourceType()
Get the Authz Resource Type for a Group |
protected javax.naming.InitialContext |
getInitialContext()
|
protected Operation |
getOperationByName(ResourceType rtV,
java.lang.String opName)
Find an operation by name inside a ResourcetypeValue object |
protected AuthzSubject |
getOverlord()
Get the overlord. |
protected ResourceType |
getPlatformPrototypeResourceType()
|
protected ResourceType |
getPlatformResourceType()
Get the platform resource type |
AppdefResourcePermissions |
getResourcePermissions(AuthzSubject who,
AppdefEntityID eid)
Deprecated. Use the individual check*Permission methods instead. |
protected ResourceType |
getResourceType(java.lang.String resType)
Get the authz resource type |
protected ResourceType |
getRootResourceType()
Get the root resourceType object. |
protected ResourceType |
getServerPrototypeResourceType()
|
protected ResourceType |
getServerResourceType()
Get the Server Resource Type |
protected ServiceCluster |
getServiceCluster(ResourceGroup group)
Map a ResourceGroup to ServiceCluster, just temporary, should be able to remove when done with the ServiceCluster to ResourceGroup Migration |
protected ResourceType |
getServicePrototypeResourceType()
|
protected ResourceType |
getServiceResourceType()
Get the Service Resource Type |
javax.ejb.SessionContext |
getSessionContext()
|
protected java.util.List |
getViewableApplications(AuthzSubject whoami)
Get the scope of viewable apps for a given user |
protected java.util.List |
getViewableGroups(AuthzSubject whoami)
Get the scope of viewable groups for a given user |
protected java.util.List |
getViewablePlatformPKs(AuthzSubject who)
|
protected java.util.Collection |
getViewablePlatforms(AuthzSubject whoami,
PageControl pc)
Get the scope of viewable platforms for a given user |
protected java.util.List |
getViewableServers(AuthzSubject whoami)
Get the scope of viewable servers for a given user |
protected java.util.List |
getViewableServiceInventory(AuthzSubject whoami)
|
protected java.util.List |
getViewableServices(AuthzSubject whoami)
Get the scope of viewable services for a given user |
protected void |
removeAuthzResource(AuthzSubject subject,
AppdefEntityID aeid,
Resource r)
remove the authz resource entry |
protected void |
rollback()
|
void |
setSessionContext(javax.ejb.SessionContext ctx)
|
Methods inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionUtil |
---|
findResourceType, findResourceType, getAgentDAO, getAIQManagerLocal, getApplicationDAO, getApplicationManager, getConfigManager, getConfigResponseDAO, getCPropManager, getPlatformDAO, getPlatformManager, getPlatformTypeDAO, getResourceManager, getServerDAO, getServerManager, getServerTypeDAO, getServiceDAO, getServiceManager, getServiceTypeDAO |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.ejb.SessionContext _ctx
protected javax.naming.InitialContext _ic
protected org.apache.commons.logging.Log log
Constructor Detail |
---|
public AppdefSessionEJB()
Method Detail |
---|
protected ResourceType getResourceType(java.lang.String resType) throws javax.ejb.FinderException
resType
- - the constant indicating the resource type
(from AuthzConstants)
javax.ejb.FinderException
protected java.util.Collection filterResourceTypes(java.util.Collection resources)
resources
- - Collection
of AppdefResource
{@link
- Collection} of AppdefResourceType
protected Resource createAuthzResource(AuthzSubject who, ResourceType resType, Resource prototype, java.lang.Integer id, java.lang.String name, Resource parent)
resTypeVal
- - the typeid
- - the id of the objectprotected Resource createAuthzResource(AuthzSubject who, ResourceType resType, Resource prototype, java.lang.Integer id, java.lang.String name, boolean fsystem, Resource parent)
resTypeVal
- - the typewho
- - whoid
- - the id of the objectname
- - the name of the resourcefsystem
- - true if the resource should be non-visibleprotected ResourceType getAuthzResourceType(AppdefEntityID id) throws javax.ejb.FinderException
javax.ejb.FinderException
protected void removeAuthzResource(AuthzSubject subject, AppdefEntityID aeid, Resource r) throws javax.ejb.RemoveException, PermissionException, VetoException
javax.ejb.RemoveException
PermissionException
VetoException
protected void checkPermission(AuthzSubject subject, ResourceType rtV, java.lang.Integer id, java.lang.String operation) throws PermissionException
subject
- - whortV
- - type of resourceid
- - the id of the objectoperation
- - the name of the operation to perform
PermissionException
protected void checkPermission(AuthzSubject subject, AppdefEntityID id, java.lang.String operation) throws PermissionException
PermissionException
public void checkCreatePlatformPermission(AuthzSubject subject) throws PermissionException
subject
-
PermissionException
public void checkModifyPermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException
PermissionException
public void checkViewPermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException
PermissionException
public void checkControlPermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException
PermissionException
public void checkRemovePermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException
PermissionException
public void checkMonitorPermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException
PermissionException
public void checkAlertingPermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException
PermissionException
public java.util.List checkAlertingScope(AuthzSubject subj)
public void checkAIScanPermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException, GroupNotCompatibleException
subject
- The user to check permissions on.id
- An ID of a platform or a group of platforms.
GroupNotCompatibleException
- If the group is not a compatible
group.
SystemException
- If the group is empty or is not a group
of platforms.
PermissionException
public void checkCreateChildPermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException
subject
- id
- - whatsubject
- - who
PermissionException
public AppdefResourcePermissions getResourcePermissions(AuthzSubject who, AppdefEntityID eid) throws javax.ejb.FinderException
javax.ejb.FinderException
protected ResourceType getRootResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected Operation getOperationByName(ResourceType rtV, java.lang.String opName) throws PermissionException
PermissionException
protected ResourceType getPlatformResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected ResourceType getApplicationResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected ResourceType getServerResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected ResourceType getServiceResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
public ResourceType getGroupResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected ResourceType getPlatformPrototypeResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected ResourceType getServerPrototypeResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected ResourceType getServicePrototypeResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected ResourceType getApplicationPrototypeResourceType() throws javax.ejb.FinderException
javax.ejb.FinderException
protected java.util.List getViewableServices(AuthzSubject whoami) throws javax.ejb.FinderException, PermissionException
whoami
- - the user
javax.ejb.FinderException
PermissionException
protected java.util.List getViewableServiceInventory(AuthzSubject whoami) throws javax.ejb.FinderException, PermissionException
List
of AppdefEntityID
s that represent the total
set of service inventory that the subject is authorized to see. This
includes all services as well as all clusters
javax.ejb.FinderException
PermissionException
protected java.util.List getViewableApplications(AuthzSubject whoami) throws javax.ejb.FinderException, PermissionException
whoami
-
javax.ejb.FinderException
PermissionException
protected java.util.List getViewableServers(AuthzSubject whoami) throws javax.ejb.FinderException, PermissionException
whoami
- - the user
javax.ejb.FinderException
PermissionException
protected java.util.List filterViewableServers(java.util.Collection servers, AuthzSubject who)
Server
s by their viewability by the subject
protected java.util.Collection getViewablePlatforms(AuthzSubject whoami, PageControl pc) throws javax.ejb.FinderException, PermissionException, javax.naming.NamingException
whoami
- - the user
javax.ejb.FinderException
PermissionException
javax.naming.NamingException
protected java.util.List getViewablePlatformPKs(AuthzSubject who) throws javax.ejb.FinderException, PermissionException
javax.ejb.FinderException
PermissionException
protected java.util.List getViewableGroups(AuthzSubject whoami) throws javax.ejb.FinderException, AppdefGroupNotFoundException, PermissionException
whoami
- - the user
javax.ejb.FinderException
AppdefGroupNotFoundException
PermissionException
protected void deleteCustomProperties(AppdefEntityID aeid)
public void setSessionContext(javax.ejb.SessionContext ctx)
public javax.ejb.SessionContext getSessionContext()
protected void rollback()
protected AuthzSubject getOverlord()
protected javax.naming.InitialContext getInitialContext()
protected ServiceCluster getServiceCluster(ResourceGroup group)
public void changeOwner(AuthzSubject who, AppdefResource res, AuthzSubject newOwner) throws PermissionException, ServerNotFoundException
PermissionException
ServerNotFoundException
|
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 |