Class semper.certappl.SemperUser
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.certappl.SemperUser

java.lang.Object
   |
   +----semper.certappl.SemperUser

public class SemperUser
extends Object
This class represents a SEMPER user with his/her 6 attributes. Class SemperUser is used in basic trials in which a pre-registered user should authentify him/herself against SEMPER CA server.

Constructor Index

 o SemperUser()
Constructor of SemperUser class.
 o SemperUser(SemperUser)
Constructor of SemperUser class.
 o SemperUser(String, String, String, String, String, String)
Constructor of SemperUser class.

Method Index

 o getCommonName()
Retrieve user's common name
 o getCountry()
Retrieve user's country
 o getLocality()
Retrieve user's locality, for example city
 o getOrgName()
Retrieve user's organisation name
 o getPassword()
Retrieve user's password
 o getSurname()
Retrieve user's surname
 o isEqual(SemperUser)
This method check the list in order to find a mentioned user in a certail list.
 o readObject(RandomAccessFile)
Reads from a random acces file
 o setCommonName(String)
Set the user's common name in the corresponding list.
 o setCountry(String)
Set the user's country in the corresponding list.
 o setLocality(String)
Set the user's locality in the corresponding list.
 o setOrgName(String)
Set the user's organisation name in the corresponding list.
 o setPassword(String)
Set the user's password in the corresponding list.
 o setSurname(String)
Set the user's surname in the corresponding list.
 o writeObject(RandomAccessFile, String, String, String, String, String, String)
Writes the object to a string in a file.

Constructors

 o SemperUser
  public SemperUser()
Constructor of SemperUser class. Create an empty SemperUser
 o SemperUser
  public SemperUser(String sname,
                    String cname,
                    String organisation,
                    String locality,
                    String country,
                    String pw)
Constructor of SemperUser class. Create a SemperUser with following 6 attributes.
Parameters:
sname - = surname of the user
cname - = common name of the user
organisation - = organisation the user works at
locality - = city in which the user's company is
country - = country
pw - = password
See Also:
UserList
 o SemperUser
  public SemperUser(SemperUser suser)
Constructor of SemperUser class. Create a SemperUser which contains the same info that the parameter suser has
Parameters:
suser - is the SemperUser which should be copied.

Methods

 o getSurname
  public String getSurname()
Retrieve user's surname
 o getCommonName
  public String getCommonName()
Retrieve user's common name
 o getOrgName
  public String getOrgName()
Retrieve user's organisation name
 o getLocality
  public String getLocality()
Retrieve user's locality, for example city
 o getCountry
  public String getCountry()
Retrieve user's country
 o getPassword
  public String getPassword()
Retrieve user's password
 o setSurname
  public void setSurname(String sname)
Set the user's surname in the corresponding list.
Parameters:
: - sname = user's surname.
 o setCommonName
  public void setCommonName(String cname)
Set the user's common name in the corresponding list.
Parameters:
: - cname = user's common name.
 o setOrgName
  public void setOrgName(String organisation)
Set the user's organisation name in the corresponding list.
Parameters:
: - organisation = user's organisation name.
 o setLocality
  public void setLocality(String locality)
Set the user's locality in the corresponding list.
Parameters:
: - locality = user's locality.
 o setCountry
  public void setCountry(String country)
Set the user's country in the corresponding list.
Parameters:
: - country = user's country.
 o setPassword
  public void setPassword(String pw)
Set the user's password in the corresponding list. Should be entered through TINGUIN.
Parameters:
: - pw = user's password.
 o isEqual
  public boolean isEqual(SemperUser suser)
This method check the list in order to find a mentioned user in a certail list. It is used in certification application. With the help of this method and its return value a CA could issue aregistration/certificate.
Parameters:
: - suser = SemperUser which should be find in the list.
Returns:
equalityFlag which certifies that a mentioned user does exist in th elist.
 o writeObject
  public String writeObject(RandomAccessFile file,
                            String sname,
                            String cname,
                            String orgname,
                            String locality,
                            String country,
                            String pw) throws IOException
Writes the object to a string in a file.
Parameters:
file - = File the returned string should be written into.
sname - = User's Surname
cname - = User's Common Name
orgname - = User's Organisation Name
locality - = User's Locality
country - = User's Country
pw - = User's Password
Returns:
_string = String including 6 above mentioned user's attributes
Throws: IOException
if write failed.
See Also:
readObject
 o readObject
  public void readObject(RandomAccessFile file) throws IOException
Reads from a random acces file
Parameters:
file - = Random access file objects should be read from.
Throws: IOException
when readObject failes.
See Also:
writeObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index