All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rathravane.clerk.access.AccessManager Maven / Gradle / Ivy

Go to download

A framework for user identification, authentication, and access control.

There is a newer version: 1.2.0
Show newest version
package com.rathravane.clerk.access;

import java.util.Set;

import com.rathravane.clerk.exceptions.IamGroupExists;
import com.rathravane.clerk.exceptions.IamIdentityDoesNotExist;
import com.rathravane.clerk.exceptions.IamSvcException;
import com.rathravane.clerk.identity.Group;

public interface AccessManager extends AccessDb
{
	/**
	 * Create a group
	 * @param groupDesc
	 * @return a new group with the given name
	 * @throws IamSvcException
	 */
	G createGroup ( String groupDesc ) throws IamSvcException;

	/**
	 * Create a group with a given group ID
	 * @param groupId
	 * @param groupDesc
	 * @return
	 * @throws IamSvcException
	 */
	G createGroup ( String groupId, String groupDesc ) throws IamGroupExists, IamSvcException;

	/**
	 * Add a user to a given group
	 * @param groupId
	 * @param userId
	 * @throws IamSvcException
	 * @throws IamIdentityDoesNotExist 
	 */
	void addUserToGroup ( String groupId, String userId ) throws IamSvcException, IamIdentityDoesNotExist;

	/**
	 * Remove a user from a given group
	 * @param groupId
	 * @param userId
	 * @throws IamSvcException
	 * @throws IamIdentityDoesNotExist 
	 */
	void removeUserFromGroup ( String groupId, String userId ) throws IamSvcException, IamIdentityDoesNotExist;

	/**
	 * Find out which groups a user is a member of.
	 * @param userId
	 * @return a set of 0 or more group IDs
	 * @throws IamSvcException
	 * @throws IamIdentityDoesNotExist 
	 */
	Set getUsersGroups ( String userId ) throws IamSvcException, IamIdentityDoesNotExist;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy