package eu.dnetlib.enabling.aas.admin;

import java.io.OutputStream;

import eu.dnetlib.enabling.aas.service.A2Exception;


/**
 * Administration service for managing AAS.
 * @author mhorst
 *
 */
public interface IAdministrationService {

	/**
	 * Invalidates all security policies.
	 * Reloads them from IS, source files etc.
	 */
	public void invalidatePolicies();
	
	/**
	 * Fetches content of all security policies into stream.
	 * @param out, output stream
	 */
	public void dumpPolicies(OutputStream out);
	
	/**
	 * Fetches content of all security profiles into stream.
	 * @param out output stream
	 * @throws A2Exception
	 */
	public void dumpSecProfs(OutputStream out) throws A2Exception;
	
	/**
	 * Fetches content of all buffered security contexts into stream.
	 * @param output stream
	 * @throws A2Exception 
	 */
	public void dumpBufferedSecCtxs(OutputStream out) throws A2Exception;
	
	/**
	 * Fetches content of all security contexts stored in IS into stream.
	 * @param output stream
	 * @throws A2Exception 
	 */
	public void dumpISSecCtxs(OutputStream out) throws A2Exception;
	
	/**
	 * Invalidates security contexts in cache.
	 */
	public void invalidateSecCtxs();
	
	/**
	 * Invalidates security profiles in cache.
	 */
	public void invalidateSecProfs();
	
	/**
	 * Removes all security contexts from cache, auxmap and IS. 
	 * @throws A2Exception 
	 */
	public void dropSecCtxs() throws A2Exception;
}
