001 package org.hackystat.sensorshell.command; 002 003 import org.hackystat.sensorshell.SensorShellProperties; 004 import org.hackystat.sensorshell.SingleSensorShell; 005 006 /** 007 * A class providing access to information useful for all Command instances. 008 * @author Philip Johnson 009 */ 010 public class Command { 011 012 /** The sensorshell. */ 013 protected SingleSensorShell shell; 014 /** The SensorProperties. */ 015 protected SensorShellProperties properties; 016 /** The sensorbase host. */ 017 protected String host; 018 /** The client email. */ 019 protected String email; 020 /** The client password. */ 021 protected String password; 022 /** The line separator. */ 023 protected String cr = System.getProperty("line.separator"); 024 025 /** 026 * Constructs a Command instance. Only subclasses call this method. 027 * @param shell The sensorshell. 028 * @param properties The properties. 029 */ 030 public Command(SingleSensorShell shell, SensorShellProperties properties) { 031 this.shell = shell; 032 this.properties = properties; 033 this.host = properties.getSensorBaseHost(); 034 this.email = properties.getSensorBaseUser(); 035 this.password = properties.getSensorBasePassword(); 036 } 037 }