|
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.AIQueueManagerEJBImpl
public class AIQueueManagerEJBImpl
This class is responsible for managing the various autoinventory queues.
Field Summary | |
---|---|
protected java.lang.String |
AIPLATFORM_PROCESSOR
|
protected java.lang.String |
AIPLATFORM_PROCESSOR_NOPLACEHOLDERS
|
protected org.apache.commons.logging.Log |
log
|
Fields inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionEJB |
---|
_ctx, _ic |
Constructor Summary | |
---|---|
AIQueueManagerEJBImpl()
|
Method Summary | |
---|---|
void |
checkAIScanPermission(AuthzSubject subject,
AppdefEntityID id)
Check to see if the subject can perform an autoinventory scan on the specified resource. |
void |
ejbActivate()
|
void |
ejbCreate()
Create an AI queue manager session bean. |
void |
ejbPassivate()
|
void |
ejbRemove()
|
AIIpValue |
findAIIpByAddress(AuthzSubject subject,
java.lang.String address)
Get an AIIpValue by address. |
AIIpValue |
findAIIpById(AuthzSubject subject,
int ipID)
Get an AIIp by id. |
AIPlatformValue |
findAIPlatformByFqdn(AuthzSubject subject,
java.lang.String fqdn)
Get an AIPlatformValue by FQDN. |
AIPlatformValue |
findAIPlatformById(AuthzSubject subject,
int aiplatformID)
Get an AIPlatformValue by id. |
AIServerValue |
findAIServerById(AuthzSubject subject,
int serverID)
Get an AIServerValue by Id. |
AIServerValue |
findAIServerByName(AuthzSubject subject,
java.lang.String name)
Get an AIServerValue by name. |
protected AIIpDAO |
getAIIpDAO()
|
AIPlatformValue |
getAIPlatformByPlatformID(AuthzSubject subject,
java.lang.Integer platformID)
Get a platform given an AI platform, returns null if none found |
protected AIPlatformDAO |
getAIPlatformDAO()
|
protected AIServerDAO |
getAIServerDAO()
|
static org.hyperic.hq.appdef.shared.AIQueueManagerLocal |
getOne()
|
Platform |
getPlatformByAI(AuthzSubject subject,
AIPlatform aipLocal)
Find an AI platform given an platform |
PlatformValue |
getPlatformByAI(AuthzSubject subject,
int aiPlatformID)
Find a platform given an AI platform id |
PageList |
getQueue(AuthzSubject subject,
boolean showIgnored,
boolean showPlaceholders,
boolean showAlreadyProcessed,
PageControl pc)
Retrieve the contents of the AI queue. |
java.util.List |
processQueue(AuthzSubject subject,
java.util.List platformList,
java.util.List serverList,
java.util.List ipList,
int action)
Process resources in the AI queue. |
AIPlatformValue |
queue(AuthzSubject subject,
AIPlatformValue aiplatform,
boolean updateServers,
boolean isApproval,
boolean isReport)
Try to queue a candidate platform discovered via autoinventory. |
void |
removeAssociatedAIPlatform(Platform platform)
|
void |
removeFromQueue(AIPlatform aiplatform)
Remove an AI platform from the queue. |
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 final java.lang.String AIPLATFORM_PROCESSOR
protected final java.lang.String AIPLATFORM_PROCESSOR_NOPLACEHOLDERS
protected org.apache.commons.logging.Log log
Constructor Detail |
---|
public AIQueueManagerEJBImpl()
Method Detail |
---|
public AIPlatformValue queue(AuthzSubject subject, AIPlatformValue aiplatform, boolean updateServers, boolean isApproval, boolean isReport)
aiplatform
- The platform that we got from the recent autoinventory
data that we are wanting to queue. This may return null if the appdef
platform was removed because the AI platform had a qstat of "remove" that
was approved.public PageList getQueue(AuthzSubject subject, boolean showIgnored, boolean showPlaceholders, boolean showAlreadyProcessed, PageControl pc)
showIgnored
- If true, even resources in the AI queue that have
the 'ignored' flag set will be returned. By default, resources with
the 'ignored' flag set are excluded when the queue is retrieved.showPlaceholders
- If true, even resources in the AI queue that are
unchanged with respect to appdef will be returned. By default, resources
that are unchanged with respect to appdef are excluded when the queue is
retrieved.showAlreadyProcessed
- If true, even resources that have already
been processed (approved or not approved) will be shown.
public AIPlatformValue findAIPlatformById(AuthzSubject subject, int aiplatformID)
public AIPlatformValue findAIPlatformByFqdn(AuthzSubject subject, java.lang.String fqdn)
public AIServerValue findAIServerById(AuthzSubject subject, int serverID)
public void removeAssociatedAIPlatform(Platform platform) throws VetoException
VetoException
public AIServerValue findAIServerByName(AuthzSubject subject, java.lang.String name)
public AIIpValue findAIIpById(AuthzSubject subject, int ipID)
public AIIpValue findAIIpByAddress(AuthzSubject subject, java.lang.String address)
public java.util.List processQueue(AuthzSubject subject, java.util.List platformList, java.util.List serverList, java.util.List ipList, int action) throws javax.ejb.FinderException, PermissionException, ValidationException, javax.ejb.RemoveException, AIQApprovalException
platformList
- A List of aiplatform IDs. This may be
null, in which case it is ignored.ipList
- A List of aiip IDs. This may be
null, in which case it is ignored.serverList
- A List of aiserver IDs. This may be
null, in which case it is ignored.action
- One of the AIQueueConstants.Q_DECISION_XXX constants
indicating what to do with the platforms, ips and servers.
javax.ejb.FinderException
PermissionException
ValidationException
javax.ejb.RemoveException
AIQApprovalException
public void removeFromQueue(AIPlatform aiplatform)
public PlatformValue getPlatformByAI(AuthzSubject subject, int aiPlatformID) throws javax.ejb.FinderException, PermissionException, PlatformNotFoundException
javax.ejb.FinderException
PermissionException
PlatformNotFoundException
public AIPlatformValue getAIPlatformByPlatformID(AuthzSubject subject, java.lang.Integer platformID)
public Platform getPlatformByAI(AuthzSubject subject, AIPlatform aipLocal) throws PermissionException, PlatformNotFoundException
PermissionException
PlatformNotFoundException
public void checkAIScanPermission(AuthzSubject subject, AppdefEntityID id) throws PermissionException, GroupNotCompatibleException
checkAIScanPermission
in class AppdefSessionEJB
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.
PermissionException
public static org.hyperic.hq.appdef.shared.AIQueueManagerLocal getOne()
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
- If an error occurs creating 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 AIPlatformDAO getAIPlatformDAO()
protected AIIpDAO getAIIpDAO()
protected AIServerDAO getAIServerDAO()
|
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 |