Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

## org.hyperic.hq.measurement.server.session
Class TemplateManagerEJBImpl

    java.lang.Object
      org.hyperic.hq.measurement.server.session.SessionEJB
          org.hyperic.hq.measurement.server.session.TemplateManagerEJBImpl

All Implemented Interfaces:
  java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

    public class TemplateManagerEJBImpl

extends SessionEJB
implements javax.ejb.SessionBean

The TemplateManagerEJB class is a stateless session bean that can be used to interact with Template EJB's

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.hyperic.hq.measurement.server.session.SessionEJB
`_mpm, DATASOURCE_NAME`

Constructor Summary
`TemplateManagerEJBImpl()`

Method Summary
`void` | `createTemplates(java.lang.String pluginName, java.util.Map toAdd)` Add new measurement templates for a plugin.
`void` | `ejbActivate()`
`void` | `ejbCreate()`
`void` | `ejbPassivate()`
`void` | `ejbPostCreate()`
`void` | `ejbRemove()`
`java.lang.Integer[]` | `findTemplateIds(java.lang.String type)` Look up a measurement template IDs for a monitorable type.
`java.util.List` | `findTemplates(AuthzSubject user, PageInfo pInfo, java.lang.Boolean defaultOn)` Get all the templates.
`java.util.List` | `findTemplates(java.lang.String type, long filters, java.lang.String keyword)` Look up a measurement templates for a monitorable type and filtered by categories and keyword.
`java.util.List` | `findTemplates(java.lang.String type, java.lang.String cat, java.lang.Integer[] excludeIds, PageControl pc)` Look up a measurement templates for a monitorable type and category.
`java.util.List` | `findTemplatesByMonitorableType(AuthzSubject user, PageInfo pInfo, java.lang.String type, java.lang.Boolean defaultOn)` Get all templates for a given MonitorableType
`MonitorableType` | `getMonitorableType(java.lang.String pluginName, TypeInfo info)` Get the MonitorableType id, creating it if it does not exist.
`static org.hyperic.hq.measurement.shared.TemplateManagerLocal` | `getOne()`
`MeasurementTemplate` | `getTemplate(java.lang.Integer id)` Get a MeasurementTemplate
`java.util.List` | `getTemplates(java.lang.Integer[] ids, PageControl pc)` Look up a measurement templates for an array of template IDs
`java.util.List` | `getTemplates(java.util.List ids)` Look up measurement templates for an array of template IDs
`void` | `setDesignated(MeasurementTemplate tmpl, boolean designated)`
`void` | `setDesignatedTemplates(java.lang.String mType, java.lang.Integer[] desigIds)` Set the measurement templates to be "designated" for a monitorable type.
`void` | `setSessionContext(javax.ejb.SessionContext ctx)`
`void` | `setTemplateEnabledByDefault(AuthzSubject subject, java.lang.Integer[] templIds, boolean on)` Make metrics disabled by default for a list of meas.
`void` | `updateTemplateDefaultInterval(AuthzSubject subject, java.lang.Integer[] templIds, long interval)` Update the default interval for a list of meas.
`java.util.Map` | `updateTemplates(java.lang.String pluginName, TypeInfo ownerEntity, MonitorableType monitorableType, MeasurementInfo[] tmpls)` Update measurement templates for a given entity.

Methods inherited from class org.hyperic.hq.measurement.server.session.SessionEJB
`checkDeletePermission, checkModifyPermission, checkTimeArguments, deleteMetricProblems, getAgent, getAgent, getAgentMan, getAuthzSubjectManager, getAvailabilityDataDAO, getBaselineDAO, getCategoryDAO, getDataMan, getInitialContext, getMeasurementDAO, getMeasurementTemplateDAO, getMetricProblemDAO, getMonitorableTypeDAO, getMPM, getProductMan, getResource, getScheduleRevNumDAO, getSRNManager, getTemplateMan`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TemplateManagerEJBImpl

    public TemplateManagerEJBImpl()

Method Detail

### getTemplate

    public MeasurementTemplate getTemplate(java.lang.Integer id)

  Get a MeasurementTemplate

### getTemplates

    public java.util.List getTemplates(java.util.List ids)

  Look up measurement templates for an array of template IDs

### getTemplates

    public java.util.List getTemplates(java.lang.Integer[] ids,
                                       PageControl pc)
                                throws TemplateNotFoundException

  Look up a measurement templates for an array of template IDs

  Returns:
    a MeasurementTemplate value
  Throws:
    `javax.ejb.FinderException` - if no measurement templates are found.
    `TemplateNotFoundException`

### findTemplates

    public java.util.List findTemplates(AuthzSubject user,
                                        PageInfo pInfo,
                                        java.lang.Boolean defaultOn)
                                 throws PermissionException

  Get all the templates. Must be superuser to execute.

  Parameters:
    `pInfo` - must contain a sort field of type `MeasurementTemplateSortField`
    `defaultOn` - If non-null, return templates with defaultOn == defaultOn
  Returns:
    a list of `MeasurementTemplate`s
  Throws:
    `PermissionException`

### findTemplatesByMonitorableType

    public java.util.List findTemplatesByMonitorableType(AuthzSubject user,
                                                         PageInfo pInfo,
                                                         java.lang.String type,
                                                         java.lang.Boolean defaultOn)
                                                  throws PermissionException

  Get all templates for a given MonitorableType

  Parameters:
    `pInfo` - must contain a sort field of type `MeasurementTemplateSortField`
    `defaultOn` - If non-null, return templates with defaultOn == defaultOn
  Returns:
    a list of `MeasurementTemplate`s
  Throws:
    `PermissionException`

### findTemplates

    public java.util.List findTemplates(java.lang.String type,
                                        java.lang.String cat,
                                        java.lang.Integer[] excludeIds,
                                        PageControl pc)

  Look up a measurement templates for a monitorable type and category.

  Returns:
    a MeasurementTemplate value

### findTemplates

    public java.util.List findTemplates(java.lang.String type,
                                        long filters,
                                        java.lang.String keyword)

  Look up a measurement templates for a monitorable type and filtered by categories and keyword.

  Returns:
    a MeasurementTemplate value

### findTemplateIds

    public java.lang.Integer[] findTemplateIds(java.lang.String type)

  Look up a measurement template IDs for a monitorable type.

  Returns:
    an array of ID values

### updateTemplateDefaultInterval

    public void updateTemplateDefaultInterval(AuthzSubject subject,
                                              java.lang.Integer[] templIds,
                                              long interval)

  Update the default interval for a list of meas. templates

  Parameters:
    `templIds` - - a list of integer template ids
    `interval` - - the interval of collection to set to

### setTemplateEnabledByDefault

    public void setTemplateEnabledByDefault(AuthzSubject subject,
                                            java.lang.Integer[] templIds,
                                            boolean on)

  Make metrics disabled by default for a list of meas. templates

  Parameters:
    `templIds` - - a list of integer template ids

### getMonitorableType

    public MonitorableType getMonitorableType(java.lang.String pluginName,
                                              TypeInfo info)

  Get the MonitorableType id, creating it if it does not exist.

### updateTemplates

    public java.util.Map updateTemplates(java.lang.String pluginName,
                                         TypeInfo ownerEntity,
                                         MonitorableType monitorableType,
                                         MeasurementInfo[] tmpls)
                                  throws javax.ejb.CreateException,
                                         javax.ejb.RemoveException

  Update measurement templates for a given entity. This still needs some refactoring.

  Returns:
    A map of measurement info's that are new and will need to be created.
  Throws:
    `javax.ejb.CreateException`
    `javax.ejb.RemoveException`

### createTemplates

    public void createTemplates(java.lang.String pluginName,
                                java.util.Map toAdd)
                         throws javax.ejb.CreateException

  Add new measurement templates for a plugin. This does a batch style insert, and expects a map of maps indexed by the monitorable type id.

  Throws:
    `javax.ejb.CreateException`

### setDesignated

    public void setDesignated(MeasurementTemplate tmpl,
                              boolean designated)

### setDesignatedTemplates

    public void setDesignatedTemplates(java.lang.String mType,
                                       java.lang.Integer[] desigIds)

  Set the measurement templates to be "designated" for a monitorable type.

### getOne

    public static org.hyperic.hq.measurement.shared.TemplateManagerLocal getOne()

### ejbCreate

    public void ejbCreate()
                   throws javax.ejb.CreateException

  Throws:
    `javax.ejb.CreateException`

### ejbPostCreate

    public void ejbPostCreate()

### ejbActivate

    public void ejbActivate()

  Specified by:
    `ejbActivate` in interface `javax.ejb.SessionBean`

### ejbPassivate

    public void ejbPassivate()

  Specified by:
    `ejbPassivate` in interface `javax.ejb.SessionBean`

### ejbRemove

    public void ejbRemove()

  Specified by:
    `ejbRemove` in interface `javax.ejb.SessionBean`

### setSessionContext

    public void setSessionContext(javax.ejb.SessionContext ctx)

  Specified by:
    `setSessionContext` in interface `javax.ejb.SessionBean`

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

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