|
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
org.hyperic.hq.appdef.server.session.ApplicationManagerEJBImpl
public class ApplicationManagerEJBImpl
This class is responsible for managing Application objects in appdef and their relationships
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
|
protected java.lang.String |
VALUE_PROCESSOR
|
Fields inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionEJB |
---|
_ctx, _ic |
Constructor Summary | |
---|---|
ApplicationManagerEJBImpl()
|
Method Summary | |
---|---|
Application |
createApplication(AuthzSubject subject,
ApplicationValue newApp,
java.util.Collection services)
Create a Application of a specified type |
void |
ejbActivate()
|
void |
ejbCreate()
Create a service manager session bean. |
void |
ejbPassivate()
|
void |
ejbRemove()
|
Application |
findApplicationById(AuthzSubject subject,
java.lang.Integer id)
Get application pojo by id. |
Application |
findApplicationByName(AuthzSubject subject,
java.lang.String name)
Find application by name |
ApplicationType |
findApplicationType(java.lang.Integer id)
Get ApplicationType by ID |
java.util.Collection |
findDeletedApplications()
|
PageList |
getAllApplications(AuthzSubject subject,
PageControl pc)
Get all applications. |
java.util.List |
getAllApplicationTypes(AuthzSubject who)
Get all Application types |
java.lang.Number |
getApplicationCount()
Get the # of applications within HQ inventory |
java.lang.Integer[] |
getApplicationIDsByResource(AppdefEntityID resource)
Get all application IDs that use the specified resource. |
java.util.List |
getApplicationResources(AuthzSubject subject,
java.lang.Integer appId)
|
PageList |
getApplicationsByResource(AuthzSubject subject,
AppdefEntityID resource,
PageControl pc)
Get all applications for a resource. |
java.util.List |
getApplicationServices(AuthzSubject subject,
java.lang.Integer appId)
Get all the application services for this application |
protected ApplicationTypeDAO |
getApplicationTypeDAO()
|
static org.hyperic.hq.appdef.shared.ApplicationManagerLocal |
getOne()
|
ResourceTree |
getResourceTree(AuthzSubject subject,
AppdefEntityID[] resources,
int traversal)
Generate a resource tree based on the root resources and the traversal (one of ResourceTreeGenerator.TRAVERSE_*) |
DependencyTree |
getServiceDepsForApp(AuthzSubject subject,
java.lang.Integer pk)
Get the service dependency map for an application |
void |
handleResourceDelete(Resource resource)
|
boolean |
isApplicationMember(AppdefEntityID application,
AppdefEntityID service)
|
void |
removeApplication(AuthzSubject subject,
java.lang.Integer id)
Remove an application |
void |
removeAppService(AuthzSubject caller,
java.lang.Integer appId,
java.lang.Integer appServiceId)
Remove an application service. |
void |
setApplicationServices(AuthzSubject subject,
java.lang.Integer appId,
java.util.List entityIds)
Set the application services for this application |
void |
setServiceDepsForApp(AuthzSubject subject,
DependencyTree depTree)
Set the dependency map for an application |
void |
startup()
|
ApplicationValue |
updateApplication(AuthzSubject subject,
ApplicationValue newValue)
Update the basic properties of an application. |
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 |
Methods inherited from interface javax.ejb.SessionBean |
---|
setSessionContext |
Field Detail |
---|
protected org.apache.commons.logging.Log log
protected final java.lang.String VALUE_PROCESSOR
Constructor Detail |
---|
public ApplicationManagerEJBImpl()
Method Detail |
---|
public java.util.List getAllApplicationTypes(AuthzSubject who) throws javax.ejb.FinderException
javax.ejb.FinderException
public ApplicationType findApplicationType(java.lang.Integer id)
public Application createApplication(AuthzSubject subject, ApplicationValue newApp, java.util.Collection services) throws ValidationException, PermissionException, javax.ejb.CreateException, AppdefDuplicateNameException
subject
- - whonewApp
- - the new application to createservices
- - A collection of ServiceValue objects that will be
the initial set of services for the application. This can be
null if you are creating an empty application.
ValidationException
PermissionException
javax.ejb.CreateException
AppdefDuplicateNameException
public ApplicationValue updateApplication(AuthzSubject subject, ApplicationValue newValue) throws ApplicationNotFoundException, PermissionException, UpdateException, AppdefDuplicateNameException, javax.ejb.FinderException
ApplicationNotFoundException
PermissionException
UpdateException
AppdefDuplicateNameException
javax.ejb.FinderException
public void removeApplication(AuthzSubject subject, java.lang.Integer id) throws ApplicationNotFoundException, PermissionException, javax.ejb.RemoveException, VetoException
ApplicationNotFoundException
PermissionException
javax.ejb.RemoveException
VetoException
public void removeAppService(AuthzSubject caller, java.lang.Integer appId, java.lang.Integer appServiceId) throws ApplicationException, ApplicationNotFoundException, PermissionException
caller
- - Valid spider subject of caller.appId
- - The application identifier.appServiceId
- - The service identifier
ApplicationException
- when unable to perform remove
ApplicationNotFoundException
- - when the app can't be found
PermissionException
- - when caller is not authorized to remove.public void handleResourceDelete(Resource resource)
public DependencyTree getServiceDepsForApp(AuthzSubject subject, java.lang.Integer pk) throws ApplicationNotFoundException, PermissionException
subject
- appId
-
ApplicationNotFoundException
PermissionException
public java.lang.Number getApplicationCount()
public void setServiceDepsForApp(AuthzSubject subject, DependencyTree depTree) throws ApplicationNotFoundException, javax.ejb.RemoveException, PermissionException, javax.ejb.CreateException
depTree
- subject
-
ApplicationNotFoundException
javax.ejb.RemoveException
PermissionException
javax.ejb.CreateException
public Application findApplicationByName(AuthzSubject subject, java.lang.String name) throws ApplicationNotFoundException, PermissionException
subject
- - whoname
- - name of app
ApplicationNotFoundException
PermissionException
public Application findApplicationById(AuthzSubject subject, java.lang.Integer id) throws ApplicationNotFoundException, PermissionException
ApplicationNotFoundException
PermissionException
public java.util.Collection findDeletedApplications()
public PageList getAllApplications(AuthzSubject subject, PageControl pc) throws javax.ejb.FinderException, PermissionException
subject
- The subject trying to list applications.
javax.ejb.FinderException
PermissionException
public java.util.List getApplicationResources(AuthzSubject subject, java.lang.Integer appId) throws ApplicationNotFoundException, PermissionException
List
of Resource
ApplicationNotFoundException
PermissionException
public java.util.List getApplicationServices(AuthzSubject subject, java.lang.Integer appId) throws ApplicationNotFoundException, PermissionException
subject
- appId
-
ApplicationNotFoundException
PermissionException
public void setApplicationServices(AuthzSubject subject, java.lang.Integer appId, java.util.List entityIds) throws ApplicationNotFoundException, javax.ejb.CreateException, AppdefGroupNotFoundException, PermissionException
subject
- map
- key: Integer service ID value: Boolean indicating
that the service is an entry point
ApplicationNotFoundException
javax.ejb.CreateException
AppdefGroupNotFoundException
PermissionException
public PageList getApplicationsByResource(AuthzSubject subject, AppdefEntityID resource, PageControl pc) throws ApplicationNotFoundException, PermissionException
ApplicationNotFoundException
PermissionException
public java.lang.Integer[] getApplicationIDsByResource(AppdefEntityID resource) throws ApplicationNotFoundException
subject
- The subject trying to get the app listresource
- Server ID.pagenum
- The page number to start listing. First page is zero.pagesize
- The size of the page (the number of items to return).sort
- The sort order.
ApplicationNotFoundException
public boolean isApplicationMember(AppdefEntityID application, AppdefEntityID service)
public ResourceTree getResourceTree(AuthzSubject subject, AppdefEntityID[] resources, int traversal) throws AppdefEntityNotFoundException, PermissionException
AppdefEntityNotFoundException
PermissionException
public void startup()
public static org.hyperic.hq.appdef.shared.ApplicationManagerLocal getOne()
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
- If an error occurs creating the pager
for the bean.public void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
protected ApplicationTypeDAO getApplicationTypeDAO()
|
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 |