package eu.dnetlib.enabling.aas.nh;

import eu.dnetlib.enabling.aas.ctx.SecurityContext;
import eu.dnetlib.enabling.aas.ctx.SecurityContextContainerException;
import eu.dnetlib.enabling.aas.service.A2Exception;

/**
 * Maintaning ISSN notifications by updating/deleting security contexts in cache.
 * @author mhorst
 *
 */
public interface ISecurityContextNotificationManager {

	/**
	 * Updates securityContext with given profileContent.
	 * @param profileContent
	 * @throws A2Exception
	 */
	public void updateSecurityContext(String profileContent) throws A2Exception;
	
	/**
	 * Removes securityContext for given profileContent.
	 * @param profileContent
	 * @throws A2Exception
	 */
	public void deleteSecurityContext(String profileContent) throws A2Exception;
	

	/**
	 * Removes security context (also from cache) for given resourceId. Returns the last recorded state.
	 * @param resourceId
	 * @return SecurityContext
	 * @exception SecurityContextContainerException
	 */
	public SecurityContext deleteContextForResourceId(String resourceId) throws SecurityContextContainerException;
	
	
}
