/* ======================================================================
   Parts Copyright 2006 University of Leeds, Oxford University, University of the Highlands and Islands.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

====================================================================== */

package org.bodington.server.realm;

import java.io.File;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.util.Enumeration;
import java.util.Vector;
import org.bodington.database.PrimaryKey;
import org.bodington.server.BuildingServerException;
import org.bodington.server.BuildingSession;
import org.bodington.util.PasswordGenerator;

public interface UserManagementSession extends BuildingSession

	{
	public void setPasswordGeneratorClass( String pgen_name )
		throws BuildingServerException;
	
	public void setAliasName( String name )
		throws BuildingServerException;
	
	public void setTypeName( String type )
		throws BuildingServerException;
		
	public String createUsers( BufferedReader reader, PrintWriter writer )
		throws BuildingServerException;

	public Vector findPermittedAliasIds()
		throws BuildingServerException;
	
	public String nameOfPermittedAlias( PrimaryKey alias_id )
		throws BuildingServerException;
	
	public Vector categoriesOfPermittedAlias( PrimaryKey alias_id )
		throws BuildingServerException;

	public void setUserPassword( PrimaryKey uid, String p )
		throws BuildingServerException;

	public String resetUserName( PrimaryKey uid )
		throws BuildingServerException;
		
	public String resetUserPassword( PrimaryKey uid )
		throws BuildingServerException;
		
	public String addUserCertificate( PrimaryKey uid, File cert_file )
		throws BuildingServerException;
	
        public String removeAllStudentPasswords()
		throws BuildingServerException;
        
	public String resetNullStudentPasswords()
		throws BuildingServerException;

	public String resetAllStudentPasswords()
		throws BuildingServerException;

	public void addUsersToGroups( BufferedReader reader, PrintWriter writer )
		throws BuildingServerException;
	}
	
