org.hackystat.telemetry.analyzer.configuration
Class ShareScope

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.configuration.ShareScope

public class ShareScope
extends java.lang.Object

The level of sharing associated with a telemetry chart or report definition. The share scope can be global, project or private (not shared).

V8 Notes: Initially, all scope will be global. This is an enumerated type and really should be implemented that way.

Author:
(Cedric) Qin Zhang

Method Summary
 boolean equals(java.lang.Object obj)
          Tests whether this instance equals another instance.
static ShareScope getGlobalShareScope()
          Gets the global share scope.
static ShareScope getPrivateShareScope()
          Gets the private share scope.
 org.hackystat.sensorbase.resource.projects.jaxb.Project getProject()
          Gets the project if the the share scope is project.
static ShareScope getProjectShareScope(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
          Gets the project share scope.
 int hashCode()
          Gets the hash code.
 boolean isGlobal()
          Checks whether is share scope is global.
 boolean isPrivate()
          Checks whether is share scope is private.
 boolean isProject()
          Checks whether is share scope is project.
 java.lang.String serializeToString()
          Serialized this instance to a string.
 java.lang.String toString()
          Gets the string representation of this instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getGlobalShareScope

public static ShareScope getGlobalShareScope()
Gets the global share scope.

Returns:
The global share scope.

getProjectShareScope

public static ShareScope getProjectShareScope(org.hackystat.sensorbase.resource.projects.jaxb.Project project)
Gets the project share scope.

Parameters:
project - The project.
Returns:
The project share scope. Always Global in V8.

getPrivateShareScope

public static ShareScope getPrivateShareScope()
Gets the private share scope.

Returns:
The private share scope.

getProject

public org.hackystat.sensorbase.resource.projects.jaxb.Project getProject()
                                                                   throws TelemetryConfigurationException
Gets the project if the the share scope is project.

Returns:
The project.
Throws:
TelemetryConfigurationException - If the share scope is not project.

isGlobal

public boolean isGlobal()
Checks whether is share scope is global.

Returns:
True if share scope is global.

isProject

public boolean isProject()
Checks whether is share scope is project.

Returns:
True if share scope is project.

isPrivate

public boolean isPrivate()
Checks whether is share scope is private.

Returns:
True if share scope is private.

toString

public java.lang.String toString()
Gets the string representation of this instance.

Overrides:
toString in class java.lang.Object
Returns:
The string representation.

serializeToString

public java.lang.String serializeToString()
Serialized this instance to a string. Note that this string may not be user readable.

Returns:
The serialized form.

equals

public boolean equals(java.lang.Object obj)
Tests whether this instance equals another instance.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Another instance.
Returns:
True if they are equal.

hashCode

public int hashCode()
Gets the hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.