001    package org.hackystat.telemetry.analyzer.configuration;
002    
003    import org.hackystat.sensorbase.resource.users.jaxb.User;
004    
005    /**
006     * Base class for information holders of telemetry objects such as Charts,  
007     * Y-Axes, Reports, and Streams.
008     * 
009     * @author (Cedric) Qin Zhang
010     */
011    public abstract class TelemetryDefinitionInfo {
012    
013      private User owner;
014      private ShareScope shareScope;
015      private String fullDefinitionString;
016    
017      /**
018       * Constructs this instance.
019       * 
020       * @param fullDefinitionString The definition string.
021       * @param owner The owner of this definition.
022       * @param shareScope The share scope of this definition.
023       */
024      protected TelemetryDefinitionInfo(String fullDefinitionString, User owner, 
025          ShareScope shareScope) {
026        this.owner = owner;
027        this.shareScope = shareScope;
028        this.fullDefinitionString = fullDefinitionString;
029      }
030      
031      /**
032       * Gets the name of this telemetry definition.
033       * 
034       * @return The name.
035       */
036      public abstract String getName();
037      
038      /**
039       * Gets telemetry definition type.
040       * 
041       * @return Telemetry definition type.
042       */
043      public abstract TelemetryDefinitionType getType();
044      
045      /**
046       * Gets the owner of this definition.
047       * 
048       * @return The owner.
049       */
050      public User getOwner() {
051        return this.owner;
052      }
053    
054      /**
055       * Gets the share scope of this definition.
056       * 
057       * @return The share scope.
058       */
059      public ShareScope getShareScope() {
060        return this.shareScope;
061      }
062    
063      /**
064       * Gets complete definition string.
065       * 
066       * @return The definition string.
067       */
068      public String getDefinitionString() {
069        return this.fullDefinitionString;
070      }
071    }