/**
 * IContainer.java
 * Created on May 13, 2008
 * (C) Copyright TANDBERG Television Ltd.
 */
package com.tandbergtv.watchpoint.pmm.entities;

import java.util.List;


/**
 * @author spuranik
 * 
 * This interface is referenced by the context to get its container(partner/service) info
 */
public interface IContainer {

	/**
	 * @return container's name which will be either Partner/Service name
	 */
	public String getContainerName();

	/**
	 * @return the type of the container (partner or service)
	 */
	public ContainerType getContainerType();

	/**
	 * @return id of the container
	 */
	public long getContainerId();
	

	/**
	 * Get the value for this property name from the container
	 * 
	 * @param propertyName
	 * @return
	 * 	the value of that field in the partner object
	 */
	public String getValue(String propertyName);
	
	/**
	 * @return lookupKey of the container
	 */
	public String getContainerLookupKey();
	
	/**
	 * 
	 * @return contextId of the container
	 */
	public long getContainerContextId();
	
	/**
	 * Gets all user defined properties associated with this container. 
	 * 
	 * @return
	 */
	List<ContainerProperty> getProperties();
	
	/**
	 * Sets the list of user defined properties for this container.
	 * 
	 * @param properties
	 */
	void setProperties(List<ContainerProperty> properties);
	
	/**
	 * Adds a property with the given name/value to this container. 
	 * 
	 * @param name
	 * @param value
	 */
	void addProperty(String name, String value);
	
	/**
	 * Removes the given property from the list of user defined properties for this container. 
	 * 
	 * @param name
	 */
	void removeProperty(String name);
	
	/**
	 * Deletes all properties associated with this container.
	 */
	void removeAllProperties();
}
