|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.telemetry.analyzer.configuration.TelemetryDefinitionInfoRepository
class TelemetryDefinitionInfoRepository
The manager for TelemetryDefinitionInfo
objects.
Warning: This class is NOT thread-safe.
V8 Notes: If/when we decide to provide project-level sharing, we need to enforce the condition that only one instance of a name can exist for a given project. Right now it appears that multiple users can create telemetry definitions with the same name with project scope.
I wonder why this class is not thread safe. Perhaps synchronization occurs at a higher level.
Constructor Summary | |
---|---|
TelemetryDefinitionInfoRepository()
|
Method Summary | |
---|---|
(package private) void |
add(TelemetryDefinitionInfo telemetryDefInfo)
Adds a telemetry definition to this in-memory repository. |
(package private) boolean |
exists(java.lang.String telemetryDefinitionName)
Goes through all users, and checks whether there is a definition by name. |
(package private) TelemetryDefinitionInfo |
find(org.hackystat.sensorbase.resource.users.jaxb.User owner,
java.lang.String name,
boolean includeShared)
Find the telemetry definition object by name. |
(package private) java.util.Collection<TelemetryDefinitionInfo> |
findAll(org.hackystat.sensorbase.resource.users.jaxb.User owner,
boolean includesShared)
Gets a list of telemetry definitions that this user has access to. |
(package private) void |
remove(org.hackystat.sensorbase.resource.users.jaxb.User owner,
java.lang.String telemetryDefinitionName)
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 |
---|
TelemetryDefinitionInfoRepository()
Method Detail |
---|
TelemetryDefinitionInfo find(org.hackystat.sensorbase.resource.users.jaxb.User owner, java.lang.String name, boolean includeShared)
Important Note that it's possible that there are multiple definitions with the same name (all have project level sharing, but owned by different users). In this case, any one of the definitions might be returned. The only guarantee is that if there are definitions in the project share scope and global share scope with the same name, the one in project share scope will be returned.
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.
TelemetryDefInfo
object if found, or null.java.util.Collection<TelemetryDefinitionInfo> findAll(org.hackystat.sensorbase.resource.users.jaxb.User owner, boolean includesShared)
owner
- The owner of the telemetry definitions returned.includesShared
- If true, then those telemetry definitions owned by
other users, but is shared will also be returned.
TelemetryDefInfo
objects.void add(TelemetryDefinitionInfo telemetryDefInfo) throws TelemetryConfigurationException
telemetryDefInfo
- Information about the definition to be added.
TelemetryConfigurationException
- If there is duplicated definition.boolean exists(java.lang.String telemetryDefinitionName)
telemetryDefinitionName
- The definition name.
void remove(org.hackystat.sensorbase.resource.users.jaxb.User owner, java.lang.String telemetryDefinitionName)
owner
- The owner of the definition.telemetryDefinitionName
- The name of the definition.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |