|
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.PlatformManagerEJBImpl
public class PlatformManagerEJBImpl
This class is responsible for managing Platform objects in appdef and their relationships
Field Summary |
---|
Fields inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionEJB |
---|
_ctx, _ic, log |
Constructor Summary | |
---|---|
PlatformManagerEJBImpl()
|
Method Summary | |
---|---|
Ip |
addIp(Platform platform,
java.lang.String address,
java.lang.String netmask,
java.lang.String macAddress)
Add an IP to a platform |
Platform |
createPlatform(AuthzSubject subject,
AIPlatformValue aipValue)
Create a Platform from an AIPlatform |
Platform |
createPlatform(AuthzSubject subject,
java.lang.Integer platformTypeId,
PlatformValue pValue,
java.lang.Integer agentPK)
Create a Platform of a specified type |
void |
deletePlatformType(PlatformType pt)
DevNote: This method was refactored out of updatePlatformTypes. |
void |
ejbActivate()
|
void |
ejbCreate()
Create a platform manager session bean. |
void |
ejbPassivate()
|
void |
ejbRemove()
|
java.util.Collection |
findAllPlatformTypes()
|
java.util.Collection |
findDeletedPlatforms()
|
java.util.List |
findParentPlatformPojosByNetworkRelation(AuthzSubject subj,
java.util.List platformTypeIds,
java.lang.String platformName,
java.lang.Boolean hasChildren)
|
Platform |
findPlatformByFqdn(AuthzSubject subject,
java.lang.String fqdn)
Get the Platform that has the specified Fqdn |
Platform |
findPlatformById(java.lang.Integer id)
Find a Platform by Id. |
java.util.Collection |
findPlatformPojosByIpAddr(java.lang.String addr)
Get the platforms that have an IP with the specified address. |
java.util.List |
findPlatformPojosByNoNetworkRelation(AuthzSubject subj,
java.util.List platformTypeIds,
java.lang.String platformName)
|
java.util.List |
findPlatformPojosByTypeAndName(AuthzSubject subj,
java.lang.Integer pType,
java.lang.String regEx)
|
PageList |
findPlatformsByIpAddr(AuthzSubject subject,
java.lang.String addr,
PageControl pc)
Get the platforms that have an IP with the specified address. |
PlatformType |
findPlatformType(java.lang.Integer id)
Find a PlatformType by id |
PlatformType |
findPlatformTypeByName(java.lang.String type)
Find a platform type by name |
Resource |
findResource(PlatformType pt)
|
java.util.Collection |
findSupportedPlatformTypes()
|
java.util.Collection |
findUnsupportedPlatformTypes()
|
PageList |
getAllPlatforms(AuthzSubject subject,
PageControl pc)
Get all platforms. |
PageList |
getAllPlatformTypes(AuthzSubject subject,
PageControl pc)
Find all platform types |
Platform |
getAssociatedPlatformByMacAddress(AuthzSubject subject,
Resource r)
Get the associated platform that has the same MAC address as the given resource |
java.lang.Number |
getCpuCount()
|
static org.hyperic.hq.appdef.shared.PlatformManagerLocal |
getOne()
|
Platform |
getPhysPlatformByAgentToken(java.lang.String agentToken)
|
Platform |
getPlatformByAIPlatform(AuthzSubject subject,
AIPlatformValue aiPlatform)
Get the Platform object based on an AIPlatformValue. |
Platform |
getPlatformById(AuthzSubject subject,
java.lang.Integer id)
Get platform light value by id. |
java.util.Collection |
getPlatformByIpAddr(AuthzSubject subject,
java.lang.String address)
Get the Collection of platforms that have the specified Ip address |
java.util.Collection |
getPlatformByMacAddr(AuthzSubject subject,
java.lang.String address)
Get the Collection of platforms that have the specified MAC address |
PlatformValue |
getPlatformByName(AuthzSubject subject,
java.lang.String name)
Find a platform by name |
Platform |
getPlatformByName(java.lang.String name)
|
PlatformValue |
getPlatformByServer(AuthzSubject subject,
java.lang.Integer serverId)
Get the platform for a server. |
PlatformValue |
getPlatformByService(AuthzSubject subject,
java.lang.Integer serviceId)
Get the platform that hosts the server that provides the specified service. |
java.lang.Number |
getPlatformCount()
|
java.lang.Integer |
getPlatformIdByServer(java.lang.Integer serverId)
Get the platform ID for a server. |
java.lang.Integer |
getPlatformIdByService(java.lang.Integer serviceId)
Get the platform ID that hosts the server that provides the specified service. |
java.lang.Integer[] |
getPlatformIds(AuthzSubject subject,
java.lang.Integer platTypeId)
Get server IDs by server type and platform. |
java.util.Collection |
getPlatformPksByAgentToken(AuthzSubject subject,
java.lang.String agentToken)
Get the platform by agent token |
java.lang.String |
getPlatformPluginName(AppdefEntityID id)
Get PlatformPluginName for an entity id. |
PageList |
getPlatformsByApplication(AuthzSubject subject,
java.lang.Integer appId,
PageControl pc)
Get all platforms by application. |
PageList |
getPlatformsByServers(AuthzSubject subject,
java.util.List sIDs)
Get the platforms for a list of servers. |
java.util.List |
getPlatformsByType(AuthzSubject subject,
java.lang.String type)
Get server IDs by server type and platform. |
java.util.List |
getPlatformTypeCounts()
Returns a list of 2 element arrays. |
PageList |
getRecentPlatforms(AuthzSubject subject,
long range,
int size)
Get platforms created within a given time range. |
PageList |
getViewablePlatformTypes(AuthzSubject subject,
PageControl pc)
Find viewable platform types |
void |
handleResourceDelete(Resource resource)
|
void |
removeIp(Platform platform,
java.lang.String address,
java.lang.String netmask,
java.lang.String macAddress)
Remove an IP on a platform |
void |
removePlatform(AuthzSubject subject,
Platform platform)
Delete a platform |
Ip |
updateIp(Platform platform,
java.lang.String address,
java.lang.String netmask,
java.lang.String macAddress)
Update an IP on a platform |
Platform |
updatePlatform(AuthzSubject subject,
PlatformValue existing)
Update an existing Platform. |
Platform |
updatePlatformImpl(AuthzSubject subject,
PlatformValue existing)
Update an existing Platform. |
void |
updatePlatformTypes(java.lang.String plugin,
PlatformTypeInfo[] infos)
Update platform types |
void |
updateWithAI(AIPlatformValue aiplatform,
AuthzSubject subj)
Update an existing appdef platform with data from an AI platform. |
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 PlatformManagerEJBImpl()
Method Detail |
---|
public PlatformType findPlatformType(java.lang.Integer id) throws org.hibernate.ObjectNotFoundException
org.hibernate.ObjectNotFoundException
public PlatformType findPlatformTypeByName(java.lang.String type) throws PlatformNotFoundException
type
- - name of the platform type
PlatformNotFoundException
public java.util.Collection findAllPlatformTypes()
PlatformType
spublic java.util.Collection findSupportedPlatformTypes()
PlatformType
spublic java.util.Collection findUnsupportedPlatformTypes()
PlatformType
spublic Resource findResource(PlatformType pt)
public PageList getAllPlatformTypes(AuthzSubject subject, PageControl pc)
public PageList getViewablePlatformTypes(AuthzSubject subject, PageControl pc) throws javax.ejb.FinderException, PermissionException
javax.ejb.FinderException
PermissionException
public java.lang.String getPlatformPluginName(AppdefEntityID id) throws AppdefEntityNotFoundException
AppdefEntityNotFoundException
public void removePlatform(AuthzSubject subject, Platform platform) throws javax.ejb.RemoveException, PlatformNotFoundException, PermissionException, VetoException
subject
- The user performing the delete operation.id
- - The id of the Platform
javax.ejb.RemoveException
PlatformNotFoundException
PermissionException
VetoException
public void handleResourceDelete(Resource resource)
public Platform createPlatform(AuthzSubject subject, java.lang.Integer platformTypeId, PlatformValue pValue, java.lang.Integer agentPK) throws javax.ejb.CreateException, ValidationException, PermissionException, AppdefDuplicateNameException, AppdefDuplicateFQDNException, ApplicationException
javax.ejb.CreateException
ValidationException
PermissionException
AppdefDuplicateNameException
AppdefDuplicateFQDNException
ApplicationException
public Platform createPlatform(AuthzSubject subject, AIPlatformValue aipValue) throws ApplicationException, javax.ejb.CreateException
aipValue
- the AIPlatform to create as a regular appdef platform.
ApplicationException
javax.ejb.CreateException
public PageList getAllPlatforms(AuthzSubject subject, PageControl pc) throws javax.ejb.FinderException, PermissionException
subject
- The subject trying to list platforms.pc
- a PageControl object which determines the size of the page and
the sorting, if any.
javax.ejb.FinderException
PermissionException
public PageList getRecentPlatforms(AuthzSubject subject, long range, int size) throws javax.ejb.FinderException, PermissionException
subject
- The subject trying to list platforms.range
- The range in milliseconds.size
- The number of platforms to return.
javax.ejb.FinderException
PermissionException
public Platform getPlatformById(AuthzSubject subject, java.lang.Integer id) throws PlatformNotFoundException, PermissionException
PlatformNotFoundException
PermissionException
public Platform findPlatformById(java.lang.Integer id) throws PlatformNotFoundException
id
- The id to look up.
PlatformNotFoundException
- If the given Platform is not found.public Platform getPlatformByAIPlatform(AuthzSubject subject, AIPlatformValue aiPlatform) throws PermissionException
PermissionException
public Platform getPhysPlatformByAgentToken(java.lang.String agentToken)
Platform
associated with the
agentToken or null if one does not exist.public PlatformValue getPlatformByName(AuthzSubject subject, java.lang.String name) throws PlatformNotFoundException, PermissionException
subject
- - who is trying thisname
- - the name of the platform
PlatformNotFoundException
PermissionException
public Platform getPlatformByName(java.lang.String name)
public Platform findPlatformByFqdn(AuthzSubject subject, java.lang.String fqdn) throws PlatformNotFoundException, PermissionException
PlatformNotFoundException
PermissionException
public java.util.Collection getPlatformByIpAddr(AuthzSubject subject, java.lang.String address) throws PermissionException
PermissionException
public java.util.Collection getPlatformByMacAddr(AuthzSubject subject, java.lang.String address) throws PermissionException
PermissionException
public Platform getAssociatedPlatformByMacAddress(AuthzSubject subject, Resource r) throws PermissionException, PlatformNotFoundException
PermissionException
PlatformNotFoundException
public java.util.Collection getPlatformPksByAgentToken(AuthzSubject subject, java.lang.String agentToken) throws PlatformNotFoundException
PlatformNotFoundException
public PlatformValue getPlatformByService(AuthzSubject subject, java.lang.Integer serviceId) throws PlatformNotFoundException, PermissionException
subject
- The subject trying to list services.serviceId
- service ID.
PlatformNotFoundException
PermissionException
public java.lang.Integer getPlatformIdByService(java.lang.Integer serviceId) throws PlatformNotFoundException
serviceId
- service ID.
PlatformNotFoundException
public PlatformValue getPlatformByServer(AuthzSubject subject, java.lang.Integer serverId) throws PlatformNotFoundException, PermissionException
subject
- The subject trying to list services.serverId
- Server ID.
PlatformNotFoundException
PermissionException
public java.lang.Integer getPlatformIdByServer(java.lang.Integer serverId) throws PlatformNotFoundException
serverId
- Server ID.
PlatformNotFoundException
public PageList getPlatformsByServers(AuthzSubject subject, java.util.List sIDs) throws PlatformNotFoundException, PermissionException
subject
- The subject trying to list services.
PlatformNotFoundException
PermissionException
public PageList getPlatformsByApplication(AuthzSubject subject, java.lang.Integer appId, PageControl pc) throws ApplicationNotFoundException, PlatformNotFoundException, PermissionException
subject
- The subject trying to list services.appId
- Application ID. but when they are, they should live somewhere
in appdef/shared so that clients can use them too.
ApplicationNotFoundException
PlatformNotFoundException
PermissionException
public java.lang.Integer[] getPlatformIds(AuthzSubject subject, java.lang.Integer platTypeId) throws PermissionException
subject
- The subject trying to list servers.
PermissionException
public java.util.List getPlatformsByType(AuthzSubject subject, java.lang.String type) throws PermissionException, InvalidAppdefTypeException
subject
- The subject trying to list servers.pc
- The page control.
PermissionException
InvalidAppdefTypeException
public PageList findPlatformsByIpAddr(AuthzSubject subject, java.lang.String addr, PageControl pc) throws PermissionException
PermissionException
public java.util.List findPlatformPojosByTypeAndName(AuthzSubject subj, java.lang.Integer pType, java.lang.String regEx)
subj
- pType
- platform typenameRegEx
- regex which matches either the platform fqdn or the resource
sortname XXX scottmf need to add permission checkingpublic java.util.List findParentPlatformPojosByNetworkRelation(AuthzSubject subj, java.util.List platformTypeIds, java.lang.String platformName, java.lang.Boolean hasChildren)
subj
- platformTypeIds
- ListhasChildren
- indicates whether the platform is the parent of
a network hierarchy
Platform
spublic java.util.List findPlatformPojosByNoNetworkRelation(AuthzSubject subj, java.util.List platformTypeIds, java.lang.String platformName)
subj
- platformTypeIds
- ListPlatform
spublic java.util.Collection findPlatformPojosByIpAddr(java.lang.String addr)
Platform
spublic java.util.Collection findDeletedPlatforms()
public Platform updatePlatformImpl(AuthzSubject subject, PlatformValue existing) throws UpdateException, PermissionException, AppdefDuplicateNameException, PlatformNotFoundException, AppdefDuplicateFQDNException, ApplicationException
existing
- - the value object for the platform you want to save
UpdateException
PermissionException
AppdefDuplicateNameException
PlatformNotFoundException
AppdefDuplicateFQDNException
ApplicationException
public Platform updatePlatform(AuthzSubject subject, PlatformValue existing) throws UpdateException, PermissionException, AppdefDuplicateNameException, PlatformNotFoundException, AppdefDuplicateFQDNException, ApplicationException
existing
- - the value object for the platform you want to save
UpdateException
PermissionException
AppdefDuplicateNameException
PlatformNotFoundException
AppdefDuplicateFQDNException
ApplicationException
public void deletePlatformType(PlatformType pt) throws VetoException, javax.ejb.RemoveException
VetoException
javax.ejb.RemoveException
public void updatePlatformTypes(java.lang.String plugin, PlatformTypeInfo[] infos) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.ejb.RemoveException, VetoException
javax.ejb.CreateException
javax.ejb.FinderException
javax.ejb.RemoveException
VetoException
public void updateWithAI(AIPlatformValue aiplatform, AuthzSubject subj) throws PlatformNotFoundException, ApplicationException
aiplatform
- the AI platform object to use for data
PlatformNotFoundException
ApplicationException
public Ip addIp(Platform platform, java.lang.String address, java.lang.String netmask, java.lang.String macAddress)
public Ip updateIp(Platform platform, java.lang.String address, java.lang.String netmask, java.lang.String macAddress)
public void removeIp(Platform platform, java.lang.String address, java.lang.String netmask, java.lang.String macAddress)
public java.util.List getPlatformTypeCounts()
public java.lang.Number getPlatformCount()
public java.lang.Number getCpuCount()
public static org.hyperic.hq.appdef.shared.PlatformManagerLocal 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
|
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 |