Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.bizapp.server.session
Class ProductBossEJBImpl

java.lang.Object
  extended by org.hyperic.hq.bizapp.server.session.BizappSessionEJB
      extended by org.hyperic.hq.bizapp.server.session.ProductBossEJBImpl
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class ProductBossEJBImpl
extends BizappSessionEJB
implements javax.ejb.SessionBean

The Product Boss

See Also:
Serialized Form

Nested Class Summary
static class ProductBossEJBImpl.ConfigSchemaAndBaseResponse
           
 
Field Summary
 
Fields inherited from class org.hyperic.hq.bizapp.server.session.BizappSessionEJB
ctx
 
Constructor Summary
ProductBossEJBImpl()
           
 
Method Summary
 void clearCaches(int sessionId)
          Clear out all the caches
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 AttachmentDescriptor findAttachment(int sessionId, java.lang.Integer descId)
           
 java.util.Collection findAttachments(int sessionId, AppdefEntityID ent, ViewResourceCategory cat)
          Find AttachmentDescriptors attached to the target type
 java.util.Collection findAttachments(int sessionId, AttachType type)
          Find AttachmentDescriptors attached to the target type
 View findViewById(int sessionId, java.lang.Integer id)
          Get an attachment view by ID
 java.lang.String getBuildNumber()
          Gets the build number, date, and type.
 ConfigResponseDB getConfigResponse(int sessionId, AppdefEntityID id)
           
 ConfigSchema getConfigSchema(AuthzSubject subject, AppdefEntityID id, java.lang.String type, boolean validateFlow)
           
 ConfigSchema getConfigSchema(int sessionId, AppdefEntityID id, java.lang.String type)
           
 ConfigSchema getConfigSchema(int sessionId, AppdefEntityID id, java.lang.String type, ConfigResponse resp)
          Get the config schema used to configure an entity.
 ProductBossEJBImpl.ConfigSchemaAndBaseResponse getConfigSchemaAndBaseResponse(AuthzSubject subject, AppdefEntityID id, java.lang.String type, boolean validateFlow)
          Get a configuration schema.
 ConfigResponse getMergedConfigResponse(AuthzSubject subject, java.lang.String productType, AppdefEntityID id, boolean required)
           
 ConfigResponse getMergedConfigResponse(int sessionId, java.lang.String productType, AppdefEntityID id, boolean required)
          Get a config response object merged through the hierarchy.
 ConfigResponse[] getMergedGroupConfigResponse(int sessionId, java.lang.String productType, int groupId, boolean required)
          Get the merged config responses for group entries.
 java.lang.String getMonitoringHelp(int sessionId, AppdefEntityID id, java.util.Map props)
           
static org.hyperic.hq.bizapp.shared.ProductBossLocal getOne()
           
 java.lang.String getVersion()
          Gets the version number
 void preload()
          Preload the 2nd level caches
 void setConfigResponse(AuthzSubject subject, AppdefEntityID id, ConfigResponse response, java.lang.String type)
           
 void setConfigResponse(int sessionId, AppdefEntityID id, ConfigResponse response, java.lang.String type)
          Set the config response for an entity/type combination.
 
Methods inherited from class org.hyperic.hq.bizapp.server.session.BizappSessionEJB
getAgentManager, getAIBoss, getAIManager, getAppdefBoss, getAppdefStatManager, getApplicationManager, getAuthManager, getAuthzBoss, getAuthzSubjectManager, getAutoInventoryManager, getAvailManager, getConfigManager, getControlBoss, getControlManager, getControlScheduleManager, getCPropManager, getDataMan, getEventsBoss, getMeasurementBoss, getMetricManager, getOverlord, getPlatformManager, getProductBoss, getProductManager, getReportProcessor, getResourceGroupManager, getResourceManager, getServerConfigManager, getServerManager, getServiceManager, getSessionContext, getSrnManager, getTemplateManager, getTrackerManager, rollback, setSessionContext
 
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

ProductBossEJBImpl

public ProductBossEJBImpl()
Method Detail

ejbCreate

public void ejbCreate()

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

getMergedGroupConfigResponse

public ConfigResponse[] getMergedGroupConfigResponse(int sessionId,
                                                     java.lang.String productType,
                                                     int groupId,
                                                     boolean required)
                                              throws AppdefEntityNotFoundException,
                                                     PermissionException,
                                                     ConfigFetchException,
                                                     SessionNotFoundException,
                                                     SessionTimeoutException,
                                                     EncodingException
Get the merged config responses for group entries. This routine has the same functionality as getMergedConfigResponse, except it takes in a groupId and returns multiple configResponse objects -- 1 for each entity in the group.

Parameters:
productType - one of ProductPlugin.TYPE_*
groupId - ID of the group to get configs for
required - If true, all the entities required to make a merged config response must exist. Else as many values as can be gotten are tried.
Throws:
AppdefEntityNotFoundException
PermissionException
ConfigFetchException
SessionNotFoundException
SessionTimeoutException
EncodingException

getMergedConfigResponse

public ConfigResponse getMergedConfigResponse(int sessionId,
                                              java.lang.String productType,
                                              AppdefEntityID id,
                                              boolean required)
                                       throws AppdefEntityNotFoundException,
                                              EncodingException,
                                              PermissionException,
                                              ConfigFetchException,
                                              SessionNotFoundException,
                                              SessionTimeoutException
Get a config response object merged through the hierarchy. All entities are merged with the product's config response, and any entity lower than them in the config stack. Config responses defining a specific attribute will override the same attribute if it was declared lower in the application stack. Only entities within the same plugin will be processed, so the most likely situation is a simple service + server + product or server + product merge. Additionally, due to restrictions in the authz model, this merge is performed as the overlord user regardless of the caller. The reason for this is that the caller may not have view access to the entire hierarchy, but still wants to view the merged configuration. This will need to be reviewed post-release

Parameters:
productType - one of ProductPlugin.TYPE_*
id - Entity to get config for
required - If true, all the entities required to make a merged config response must exist. Else as many values as can be gotten are tried.
Throws:
AppdefEntityNotFoundException
EncodingException
PermissionException
ConfigFetchException
SessionNotFoundException
SessionTimeoutException

getMergedConfigResponse

public ConfigResponse getMergedConfigResponse(AuthzSubject subject,
                                              java.lang.String productType,
                                              AppdefEntityID id,
                                              boolean required)
                                       throws AppdefEntityNotFoundException,
                                              PermissionException,
                                              ConfigFetchException,
                                              EncodingException
Throws:
AppdefEntityNotFoundException
PermissionException
ConfigFetchException
EncodingException

getConfigResponse

public ConfigResponseDB getConfigResponse(int sessionId,
                                          AppdefEntityID id)
                                   throws AppdefEntityNotFoundException,
                                          SessionNotFoundException,
                                          SessionTimeoutException
Throws:
AppdefEntityNotFoundException
SessionNotFoundException
SessionTimeoutException

getMonitoringHelp

public java.lang.String getMonitoringHelp(int sessionId,
                                          AppdefEntityID id,
                                          java.util.Map props)
                                   throws PluginNotFoundException,
                                          PermissionException,
                                          AppdefEntityNotFoundException,
                                          SessionNotFoundException,
                                          SessionTimeoutException
Throws:
PluginNotFoundException
PermissionException
AppdefEntityNotFoundException
SessionNotFoundException
SessionTimeoutException

getConfigSchema

public ConfigSchema getConfigSchema(int sessionId,
                                    AppdefEntityID id,
                                    java.lang.String type,
                                    ConfigResponse resp)
                             throws SessionTimeoutException,
                                    SessionNotFoundException,
                                    PluginException,
                                    PermissionException,
                                    AppdefEntityNotFoundException
Get the config schema used to configure an entity. If the appropriate base entities have not yet been configured, an exception will be thrown indicating which resource must be configured.

Throws:
SessionTimeoutException
SessionNotFoundException
PluginException
PermissionException
AppdefEntityNotFoundException

getConfigSchema

public ConfigSchema getConfigSchema(int sessionId,
                                    AppdefEntityID id,
                                    java.lang.String type)
                             throws ConfigFetchException,
                                    javax.ejb.FinderException,
                                    EncodingException,
                                    PluginNotFoundException,
                                    PluginException,
                                    SessionTimeoutException,
                                    SessionNotFoundException,
                                    PermissionException,
                                    AppdefEntityNotFoundException
Throws:
ConfigFetchException
javax.ejb.FinderException
EncodingException
PluginNotFoundException
PluginException
SessionTimeoutException
SessionNotFoundException
PermissionException
AppdefEntityNotFoundException

getConfigSchemaAndBaseResponse

public ProductBossEJBImpl.ConfigSchemaAndBaseResponse getConfigSchemaAndBaseResponse(AuthzSubject subject,
                                                                                     AppdefEntityID id,
                                                                                     java.lang.String type,
                                                                                     boolean validateFlow)
                                                                              throws ConfigFetchException,
                                                                                     EncodingException,
                                                                                     PluginNotFoundException,
                                                                                     PluginException,
                                                                                     PermissionException,
                                                                                     AppdefEntityNotFoundException
Get a configuration schema.

Parameters:
id - Entity to be configured
type - One of ProductPlugin.TYPE_*
validateFlow - If true a ConfigFetchException will be thrown if the appropriate base entities are not already configured.
Throws:
ConfigFetchException
EncodingException
PluginNotFoundException
PluginException
PermissionException
AppdefEntityNotFoundException

getConfigSchema

public ConfigSchema getConfigSchema(AuthzSubject subject,
                                    AppdefEntityID id,
                                    java.lang.String type,
                                    boolean validateFlow)
                             throws ConfigFetchException,
                                    EncodingException,
                                    PluginNotFoundException,
                                    PluginException,
                                    PermissionException,
                                    AppdefEntityNotFoundException
Throws:
ConfigFetchException
EncodingException
PluginNotFoundException
PluginException
PermissionException
AppdefEntityNotFoundException

setConfigResponse

public void setConfigResponse(int sessionId,
                              AppdefEntityID id,
                              ConfigResponse response,
                              java.lang.String type)
                       throws javax.ejb.FinderException,
                              InvalidConfigException,
                              SessionTimeoutException,
                              EncodingException,
                              PermissionException,
                              ConfigFetchException,
                              AppdefEntityNotFoundException,
                              SessionNotFoundException
Set the config response for an entity/type combination. Note that setting the config response for any entity may cause a chain reaction of things to occur. For instance, agents may get updated with new measurements for entities which were affected by the configuration change.

Parameters:
id - ID of the object to set the repsonse fo
response - The response
type - One of ProductPlugin.TYPE_*
Throws:
SessionTimeoutException
SessionNotFoundException
javax.ejb.FinderException
InvalidConfigException
EncodingException
PermissionException
ConfigFetchException
AppdefEntityNotFoundException

setConfigResponse

public void setConfigResponse(AuthzSubject subject,
                              AppdefEntityID id,
                              ConfigResponse response,
                              java.lang.String type)
                       throws EncodingException,
                              javax.ejb.FinderException,
                              PermissionException,
                              InvalidConfigException,
                              ConfigFetchException,
                              AppdefEntityNotFoundException
Throws:
EncodingException
javax.ejb.FinderException
PermissionException
InvalidConfigException
ConfigFetchException
AppdefEntityNotFoundException

getVersion

public java.lang.String getVersion()
Gets the version number


getBuildNumber

public java.lang.String getBuildNumber()
Gets the build number, date, and type.


preload

public void preload()
Preload the 2nd level caches


clearCaches

public void clearCaches(int sessionId)
Clear out all the caches


findAttachments

public java.util.Collection findAttachments(int sessionId,
                                            AttachType type)
                                     throws SessionException
Find AttachmentDescriptors attached to the target type

Throws:
SessionException

findAttachments

public java.util.Collection findAttachments(int sessionId,
                                            AppdefEntityID ent,
                                            ViewResourceCategory cat)
                                     throws SessionException
Find AttachmentDescriptors attached to the target type

Throws:
SessionException

findAttachment

public AttachmentDescriptor findAttachment(int sessionId,
                                           java.lang.Integer descId)
                                    throws SessionException
Throws:
SessionException

findViewById

public View findViewById(int sessionId,
                         java.lang.Integer id)
Get an attachment view by ID


getOne

public static org.hyperic.hq.bizapp.shared.ProductBossLocal getOne()

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.