org.hackystat.telemetry.analyzer.configuration
Class TelemetryDefinitionManager

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.configuration.TelemetryDefinitionManager
Direct Known Subclasses:
NonPersistentTelemetryDefinitionManager, PersistentTelemetryDefinitionManager

public abstract class TelemetryDefinitionManager
extends java.lang.Object

Provides the base class associated with the persistent and non-persistent Telemetry definition managers.

Author:
(Cedric) Qin Zhang

Constructor Summary
TelemetryDefinitionManager()
           
 
Method Summary
abstract  void add(TelemetryDefinitionInfo defInfo)
          Adds information about a definition.
abstract  TelemetryDefinitionInfo get(org.hackystat.sensorbase.resource.users.jaxb.User owner, java.lang.String name, boolean includeShared, TelemetryDefinitionType type)
          Gets the telemetry definition information by name.
abstract  java.util.Collection<TelemetryDefinitionInfo> getAll(org.hackystat.sensorbase.resource.users.jaxb.User owner, boolean includeShared, TelemetryDefinitionType type)
          Gets all telemetry definitions that this user has access to.
abstract  java.util.List<TelemetryDefinition> getDefinitions()
          Returns the list of TelemetryDefinitions associated with this manager.
abstract  void remove(org.hackystat.sensorbase.resource.users.jaxb.User owner, java.lang.String name, TelemetryDefinitionType type)
          Deletes a telemetry object definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelemetryDefinitionManager

public TelemetryDefinitionManager()
Method Detail

get

public abstract TelemetryDefinitionInfo get(org.hackystat.sensorbase.resource.users.jaxb.User owner,
                                            java.lang.String name,
                                            boolean includeShared,
                                            TelemetryDefinitionType type)
Gets the telemetry definition information by name.

Parameters:
owner - The owner under which to find the telemetry definition object.
name - The name of the telemetry definition.
includeShared - If true, then those telemetry definitions owned by other users, but is shared will also be returned.
type - The definition type.
Returns:
The object if found, or null.

getAll

public abstract java.util.Collection<TelemetryDefinitionInfo> getAll(org.hackystat.sensorbase.resource.users.jaxb.User owner,
                                                                     boolean includeShared,
                                                                     TelemetryDefinitionType type)
Gets all telemetry definitions that this user has access to.

Parameters:
owner - The owner of the telemetry definitions returned.
includeShared - If true, then those telemetry definitions owned by other users, but is shared will also be returned.
type - The definition type.
Returns:
A collection of found objects.

add

public abstract void add(TelemetryDefinitionInfo defInfo)
                  throws TelemetryConfigurationException
Adds information about a definition.

Parameters:
defInfo - Information about the definition to be added.
Throws:
TelemetryConfigurationException - If there is duplicated definition.

getDefinitions

public abstract java.util.List<TelemetryDefinition> getDefinitions()
Returns the list of TelemetryDefinitions associated with this manager.

Returns:
The list of telemetry definitions.

remove

public abstract void remove(org.hackystat.sensorbase.resource.users.jaxb.User owner,
                            java.lang.String name,
                            TelemetryDefinitionType type)
Deletes a telemetry object definition. Does nothing if the definition does not exist.

Parameters:
owner - The owner of the definition.
name - The name of the definition.
type - The definition type.