|
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.ServiceManagerEJBImpl
public class ServiceManagerEJBImpl
This class is responsible for managing Server objects in appdef and their relationships
Field Summary |
---|
Fields inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionEJB |
---|
_ctx, _ic |
Constructor Summary | |
---|---|
ServiceManagerEJBImpl()
|
Method Summary | |
---|---|
Service |
createService(AuthzSubject subject,
java.lang.Integer serverId,
java.lang.Integer serviceTypeId,
java.lang.String name,
java.lang.String desc,
java.lang.String location)
Create a Service which runs on a given server |
Service |
createService(AuthzSubject subject,
Server server,
ServiceType type,
java.lang.String name,
java.lang.String desc,
java.lang.String location,
Service parent)
|
void |
deleteServiceType(ServiceType serviceType,
AuthzSubject overlord,
org.hyperic.hq.authz.shared.ResourceGroupManagerLocal resGroupMan,
org.hyperic.hq.authz.shared.ResourceManagerLocal resMan)
|
void |
ejbActivate()
|
void |
ejbCreate()
|
void |
ejbPassivate()
|
void |
ejbRemove()
|
java.util.Collection |
findDeletedServices()
|
java.util.List |
findPlatformServicesByType(Platform p,
ServiceType st)
Get platform service POJOs |
Service |
findServiceById(java.lang.Integer id)
Find Service by Id. |
java.util.List |
findServicesById(AuthzSubject subject,
java.lang.Integer[] serviceIds)
|
java.util.List |
findServicesByType(Server server,
ServiceType st)
Get Service s which are children of the server, and of the
specified type. |
ServiceType |
findServiceType(java.lang.Integer id)
Find a ServiceType by id |
ServiceType |
findServiceTypeByName(java.lang.String name)
Find service type by name |
PageList |
findVirtualServiceTypesByPlatform(AuthzSubject subject,
java.lang.Integer platformId)
|
PageList |
getAllClusterAppUnassignedServices(AuthzSubject subject,
PageControl pc)
Fetch all services that haven't been assigned to a cluster and that haven't been assigned to any applications. |
PageList |
getAllServices(AuthzSubject subject,
PageControl pc)
|
PageList |
getAllServiceTypes(AuthzSubject subject,
PageControl pc)
|
java.lang.Integer[] |
getFlattenedServiceIdsByApplication(AuthzSubject subject,
java.lang.Integer appId)
Get all service inventory by application, including those inside an associated cluster |
PageList |
getFlattenedServicesByApplication(AuthzSubject subject,
java.lang.Integer appId,
java.lang.Integer typeId,
PageControl pc)
Get all services by application. |
java.util.Map |
getMappedPlatformServices(AuthzSubject subject,
java.lang.Integer platId,
PageControl pc)
Get platform services (children of virtual servers), mapped by type id of a specified type |
static org.hyperic.hq.appdef.shared.ServiceManagerLocal |
getOne()
|
java.util.Collection |
getPlatformServices(AuthzSubject subject,
java.lang.Integer platId)
Get platform service POJOs |
PageList |
getPlatformServices(AuthzSubject subject,
java.lang.Integer platId,
java.lang.Integer typeId,
PageControl pc)
Get platform services (children of virtual servers) of a specified type |
PageList |
getPlatformServices(AuthzSubject subject,
java.lang.Integer platId,
PageControl pc)
Get platform services (children of virtual servers) |
Service |
getServiceById(AuthzSubject subject,
java.lang.Integer id)
Get Service by Id and perform permission check. |
Service |
getServiceById(java.lang.Integer id)
Get Service by Id. |
Service |
getServiceByName(Platform platform,
java.lang.String name)
|
Service |
getServiceByName(Server server,
java.lang.String name)
|
java.lang.Number |
getServiceCount()
Get the # of services within HQ inventory |
java.lang.Integer[] |
getServiceIds(AuthzSubject subject,
java.lang.Integer servTypeId)
Get service IDs by service type. |
java.lang.Integer[] |
getServiceIdsByServer(AuthzSubject subject,
java.lang.Integer serverId,
java.lang.Integer svcTypeId)
|
java.lang.Integer[] |
getServiceIdsByService(AuthzSubject subject,
java.lang.Integer serviceId,
java.lang.Integer svcTypeId)
Get service IDs by service. |
PageList |
getServiceInventoryByApplication(AuthzSubject subject,
java.lang.Integer appId,
java.lang.Integer svcTypeId,
PageControl pc)
|
PageList |
getServiceInventoryByApplication(AuthzSubject subject,
java.lang.Integer appId,
PageControl pc)
|
java.util.List |
getServicesByAIID(Server server,
java.lang.String aiid)
|
java.util.List |
getServicesByApplication(AuthzSubject subject,
java.lang.Integer appId)
|
PageList |
getServicesByApplication(AuthzSubject subject,
java.lang.Integer appId,
java.lang.Integer svcTypeId,
PageControl pc)
|
PageList |
getServicesByApplication(AuthzSubject subject,
java.lang.Integer appId,
PageControl pc)
|
PageList |
getServicesByPlatform(AuthzSubject subject,
java.lang.Integer platId,
java.lang.Integer svcTypeId,
PageControl pc)
Get services by platform. |
PageList |
getServicesByPlatform(AuthzSubject subject,
java.lang.Integer platId,
PageControl pc)
|
PageList |
getServicesByServer(AuthzSubject subject,
java.lang.Integer serverId,
java.lang.Integer svcTypeId,
PageControl pc)
|
PageList |
getServicesByServer(AuthzSubject subject,
java.lang.Integer serverId,
PageControl pc)
Get services by server and type. |
java.util.List |
getServicesByServer(AuthzSubject subject,
Server server)
Get service POJOs by server and type. |
PageList |
getServicesByService(AuthzSubject subject,
java.lang.Integer serviceId,
java.lang.Integer svcTypeId,
PageControl pc)
Get services by server. |
PageList |
getServicesByService(AuthzSubject subject,
java.lang.Integer serviceId,
PageControl pc)
|
java.util.List |
getServicesByType(AuthzSubject subject,
java.lang.String svcName,
boolean asc)
|
java.util.List |
getServiceTypeCounts()
Returns a list of 2 element arrays. |
PageList |
getServiceTypesByServerType(AuthzSubject subject,
int serverTypeId)
|
PageList |
getViewableServiceTypes(AuthzSubject subject,
PageControl pc)
|
void |
handleResourceDelete(Resource resource)
|
void |
moveService(AuthzSubject subject,
Service target,
Platform destination)
Move a Service from one Platform to another. |
void |
moveService(AuthzSubject subject,
Service target,
Server destination)
Move a Service from one Server to another. |
void |
removeService(AuthzSubject subject,
Service service)
A removeService method that takes a ServiceLocal. |
Service |
updateService(AuthzSubject subject,
ServiceValue existing)
|
void |
updateServiceTypes(java.lang.String plugin,
ServiceTypeInfo[] infos)
|
void |
updateServiceZombieStatus(AuthzSubject subject,
Service svc,
boolean zombieStatus)
|
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 |
Constructor Detail |
---|
public ServiceManagerEJBImpl()
Method Detail |
---|
public Service createService(AuthzSubject subject, Server server, ServiceType type, java.lang.String name, java.lang.String desc, java.lang.String location, Service parent) throws PermissionException
PermissionException
public void moveService(AuthzSubject subject, Service target, Platform destination) throws VetoException, PermissionException
subject
- The user initiating the move.target
- The target Service to move.destination
- The destination Platform to move this Service to.
PermissionException
- If the passed
user does not have permission to move the Service.
VetoException
- If the operation canot be
performed due to incompatible types.public void moveService(AuthzSubject subject, Service target, Server destination) throws VetoException, PermissionException
subject
- The user initiating the move.target
- The target Service to move.destination
- The destination Server to move this Service to.
PermissionException
- If the passed
user does not have permission to move the Service.
VetoException
- If the operation canot be
performed due to incompatible types.public Service createService(AuthzSubject subject, java.lang.Integer serverId, java.lang.Integer serviceTypeId, java.lang.String name, java.lang.String desc, java.lang.String location) throws javax.ejb.CreateException, ValidationException, PermissionException, ServerNotFoundException, AppdefDuplicateNameException
javax.ejb.CreateException
ValidationException
PermissionException
ServerNotFoundException
AppdefDuplicateNameException
public java.lang.Integer[] getServiceIds(AuthzSubject subject, java.lang.Integer servTypeId) throws PermissionException
subject
- The subject trying to list service.servTypeId
- service type id.
PermissionException
public java.util.List findServicesById(AuthzSubject subject, java.lang.Integer[] serviceIds) throws ServiceNotFoundException, PermissionException
ServiceNotFoundException
PermissionException
public Service findServiceById(java.lang.Integer id) throws ServiceNotFoundException
ServiceNotFoundException
public Service getServiceById(java.lang.Integer id)
public Service getServiceById(AuthzSubject subject, java.lang.Integer id) throws ServiceNotFoundException, PermissionException
ServiceNotFoundException
PermissionException
public java.util.List getServicesByAIID(Server server, java.lang.String aiid)
server
- Server
aiid
- service autoinventory identifier
List
of Service
public Service getServiceByName(Server server, java.lang.String name)
server
- Server
name
- corresponds to the EAM_RESOURCE.sort_name columnpublic Service getServiceByName(Platform platform, java.lang.String name)
public ServiceType findServiceType(java.lang.Integer id) throws org.hibernate.ObjectNotFoundException
org.hibernate.ObjectNotFoundException
public ServiceType findServiceTypeByName(java.lang.String name)
public java.util.Collection findDeletedServices()
public PageList getAllServiceTypes(AuthzSubject subject, PageControl pc)
public PageList getViewableServiceTypes(AuthzSubject subject, PageControl pc) throws javax.ejb.FinderException, PermissionException
javax.ejb.FinderException
PermissionException
public PageList getServiceTypesByServerType(AuthzSubject subject, int serverTypeId)
public PageList findVirtualServiceTypesByPlatform(AuthzSubject subject, java.lang.Integer platformId)
public PageList getAllServices(AuthzSubject subject, PageControl pc) throws javax.ejb.FinderException, PermissionException
javax.ejb.FinderException
PermissionException
public PageList getAllClusterAppUnassignedServices(AuthzSubject subject, PageControl pc) throws javax.ejb.FinderException, PermissionException
javax.ejb.FinderException
PermissionException
public PageList getServicesByServer(AuthzSubject subject, java.lang.Integer serverId, PageControl pc) throws ServiceNotFoundException, ServerNotFoundException, PermissionException
ServiceNotFoundException
ServerNotFoundException
PermissionException
public PageList getServicesByServer(AuthzSubject subject, java.lang.Integer serverId, java.lang.Integer svcTypeId, PageControl pc) throws ServiceNotFoundException, PermissionException
ServiceNotFoundException
PermissionException
public java.util.List getServicesByServer(AuthzSubject subject, Server server) throws PermissionException, ServiceNotFoundException
PermissionException
ServiceNotFoundException
public java.lang.Integer[] getServiceIdsByServer(AuthzSubject subject, java.lang.Integer serverId, java.lang.Integer svcTypeId) throws ServiceNotFoundException, PermissionException
ServiceNotFoundException
PermissionException
public java.util.List getServicesByType(AuthzSubject subject, java.lang.String svcName, boolean asc) throws PermissionException, InvalidAppdefTypeException
PermissionException
InvalidAppdefTypeException
public PageList getServicesByService(AuthzSubject subject, java.lang.Integer serviceId, PageControl pc) throws ServiceNotFoundException, PermissionException
ServiceNotFoundException
PermissionException
public PageList getServicesByService(AuthzSubject subject, java.lang.Integer serviceId, java.lang.Integer svcTypeId, PageControl pc) throws ServiceNotFoundException, PermissionException
ServiceNotFoundException
PermissionException
public java.lang.Integer[] getServiceIdsByService(AuthzSubject subject, java.lang.Integer serviceId, java.lang.Integer svcTypeId) throws ServiceNotFoundException, PermissionException
ServiceNotFoundException
PermissionException
public PageList getServicesByPlatform(AuthzSubject subject, java.lang.Integer platId, PageControl pc) throws ServiceNotFoundException, PlatformNotFoundException, PermissionException
ServiceNotFoundException
PlatformNotFoundException
PermissionException
public PageList getPlatformServices(AuthzSubject subject, java.lang.Integer platId, PageControl pc) throws PlatformNotFoundException, PermissionException, ServiceNotFoundException
PlatformNotFoundException
PermissionException
ServiceNotFoundException
public PageList getPlatformServices(AuthzSubject subject, java.lang.Integer platId, java.lang.Integer typeId, PageControl pc) throws PlatformNotFoundException, PermissionException, ServiceNotFoundException
PlatformNotFoundException
PermissionException
ServiceNotFoundException
public java.util.List findServicesByType(Server server, ServiceType st)
Service
s which are children of the server, and of the
specified type.
public java.util.List findPlatformServicesByType(Platform p, ServiceType st)
public java.util.Collection getPlatformServices(AuthzSubject subject, java.lang.Integer platId) throws ServiceNotFoundException, PermissionException
ServiceNotFoundException
PermissionException
public java.util.Map getMappedPlatformServices(AuthzSubject subject, java.lang.Integer platId, PageControl pc) throws PlatformNotFoundException, PermissionException, ServiceNotFoundException
PlatformNotFoundException
PermissionException
ServiceNotFoundException
public PageList getServicesByPlatform(AuthzSubject subject, java.lang.Integer platId, java.lang.Integer svcTypeId, PageControl pc) throws ServiceNotFoundException, PlatformNotFoundException, PermissionException
ServiceNotFoundException
PlatformNotFoundException
PermissionException
public PageList getServicesByApplication(AuthzSubject subject, java.lang.Integer appId, PageControl pc) throws ApplicationNotFoundException, ServiceNotFoundException, PermissionException
ApplicationNotFoundException
ServiceNotFoundException
PermissionException
public PageList getServicesByApplication(AuthzSubject subject, java.lang.Integer appId, java.lang.Integer svcTypeId, PageControl pc) throws PermissionException, ApplicationNotFoundException, ServiceNotFoundException
ApplicationNotFoundException
- if the appId is bogus
ServiceNotFoundException
- if services could not be looked up
PermissionException
public java.util.List getServicesByApplication(AuthzSubject subject, java.lang.Integer appId) throws PermissionException, ApplicationNotFoundException, ServiceNotFoundException
ApplicationNotFoundException
- if the appId is bogus
ServiceNotFoundException
- if services could not be looked up
PermissionException
public PageList getServiceInventoryByApplication(AuthzSubject subject, java.lang.Integer appId, PageControl pc) throws ApplicationNotFoundException, ServiceNotFoundException, PermissionException
ApplicationNotFoundException
ServiceNotFoundException
PermissionException
public PageList getFlattenedServicesByApplication(AuthzSubject subject, java.lang.Integer appId, java.lang.Integer typeId, PageControl pc) throws ApplicationNotFoundException, ServiceNotFoundException, PermissionException
ApplicationNotFoundException
ServiceNotFoundException
PermissionException
public PageList getServiceInventoryByApplication(AuthzSubject subject, java.lang.Integer appId, java.lang.Integer svcTypeId, PageControl pc) throws ApplicationNotFoundException, ServiceNotFoundException, PermissionException
ApplicationNotFoundException
ServiceNotFoundException
PermissionException
public java.lang.Integer[] getFlattenedServiceIdsByApplication(AuthzSubject subject, java.lang.Integer appId) throws ServiceNotFoundException, PermissionException, ApplicationNotFoundException
subject
- The subject trying to list services.appId
- Application id.
ServiceNotFoundException
PermissionException
ApplicationNotFoundException
public void updateServiceZombieStatus(AuthzSubject subject, Service svc, boolean zombieStatus) throws PermissionException
PermissionException
public Service updateService(AuthzSubject subject, ServiceValue existing) throws PermissionException, UpdateException, AppdefDuplicateNameException, ServiceNotFoundException
PermissionException
UpdateException
AppdefDuplicateNameException
ServiceNotFoundException
public void updateServiceTypes(java.lang.String plugin, ServiceTypeInfo[] infos) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.ejb.RemoveException, VetoException
javax.ejb.CreateException
javax.ejb.FinderException
javax.ejb.RemoveException
VetoException
public void deleteServiceType(ServiceType serviceType, AuthzSubject overlord, org.hyperic.hq.authz.shared.ResourceGroupManagerLocal resGroupMan, org.hyperic.hq.authz.shared.ResourceManagerLocal resMan) throws VetoException, javax.ejb.RemoveException
VetoException
javax.ejb.RemoveException
public void removeService(AuthzSubject subject, Service service) throws javax.ejb.RemoveException, PermissionException, VetoException
javax.ejb.RemoveException
PermissionException
VetoException
public void handleResourceDelete(Resource resource)
public java.util.List getServiceTypeCounts()
public java.lang.Number getServiceCount()
public static org.hyperic.hq.appdef.shared.ServiceManagerLocal getOne()
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
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
|
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 |