/************************************************
* Columbia University CS Department
* Network Security Lab
*
* Open and Survivable Embedded Systems (OASES)
*
* Structured Policy Command Language (SPCL)
*
*
* This software is provided as is without any
* warranty or guarantee of merchantibility
* or fitness for a particular purpose. This
* software is released under the terms of the
* GNU General Public License (GPL).
*
* Last updated: May 8, 2003
*
***********************************************/

package spcl.data;

import java.util.*;

/**
 * An object representing a system in the network.
 * It could have a background thread to notify
 * the real object of log or notify side effects.
 * Here we merely provide a cache for that info.
 *
 * @author locasto@cs.columbia.edu
 *
*/
public class SystemObject{

	private String url;
	private String name;
	private Hashtable variables = new Hashtable();
	private Hashtable actions = new Hashtable();

	public SystemObject( String n ){
	  this.name = n;
	}
	
	public String getName(){
	  return name;
	}

	public void addVariable( Variable v ){
		variables.put( v.getName(), v );
	}

	public Variable getVariable( String vid ){
		return ((Variable)variables.get( vid ));
	}

	public void addAction( Action a ){
		actions.put( a.getName(), a );
	}
	
	public Action getAction( String n ){
		return ((Action)actions.get( n ));
	}


}
