semanticwfs  Version 0.1.0.0
User Class Reference

Represents a user who may log in to the system. More...

Collaboration diagram for User:

Public Member Functions

 User ()
 Empty constructor to gradually fill the user object. More...
 
 User (String name, String password, UserType level)
 Constructor for this class. More...
 
String getName ()
 Gets the name of the user. More...
 
String getUuid ()
 Gets the uuid of the user. More...
 
void setUuid (String uuid)
 Sets the UUID of the user. More...
 
void setName (String name)
 Sets the name of the user. More...
 
String getPasswordHash ()
 Gets the password hash of the user. More...
 
void setPasswordHash (String passwordHash)
 Sets the password hash of the user. More...
 
UserType getUserlevel ()
 Gets the user level of the user. More...
 
void setUserlevel (UserType userlevel)
 Sets the user level of the user. More...
 
String toString ()
 

Public Attributes

String authToken
 An auth token which has been given to this user to authenticate for web services. More...
 

Private Attributes

String name
 The name of the user. More...
 
String passwordHash
 The password hash used for authentification. More...
 
UserType userlevel
 The authorization level given to this user. More...
 
String uuid
 The current UUID assigned to this user. More...
 

Detailed Description

Represents a user who may log in to the system.

Constructor & Destructor Documentation

◆ User() [1/2]

User ( )

Empty constructor to gradually fill the user object.

29  {
30 
31  }

◆ User() [2/2]

User ( String  name,
String  password,
UserType  level 
)

Constructor for this class.

Parameters
nameThe user name
passwordThe password assigned to the user
levelthe user level
39  {
40  this.name=name;
41  this.passwordHash=password;
42  this.userlevel=level;
43  this.uuid=UUID.randomUUID().toString();
44  this.authToken=UUID.randomUUID().toString();
45  }
String passwordHash
The password hash used for authentification.
Definition: User.java:15
String uuid
The current UUID assigned to this user.
Definition: User.java:21
String name
The name of the user.
Definition: User.java:12
UserType userlevel
The authorization level given to this user.
Definition: User.java:18
String authToken
An auth token which has been given to this user to authenticate for web services.
Definition: User.java:24

References User.name, and UserType.toString().

Member Function Documentation

◆ getName()

String getName ( )

Gets the name of the user.

Returns
The name as String
51  {
52  return name;
53  }

References User.name.

Referenced by UserManagementConnection.UserHandler.startElement(), and UserManagementConnection.usersToHTML().

◆ getPasswordHash()

String getPasswordHash ( )

Gets the password hash of the user.

Returns
The password hash as String
84  {
85  return passwordHash;
86  }

References User.passwordHash.

◆ getUserlevel()

UserType getUserlevel ( )

Gets the user level of the user.

Returns
The userlevel as a Usertype
100  {
101  return userlevel;
102  }

References User.userlevel.

Referenced by WebService.addEndpoint(), WebService.addFeatureType(), WebService.saveFeatureTypes(), and UserManagementConnection.usersToHTML().

◆ getUuid()

String getUuid ( )

Gets the uuid of the user.

Returns
The uuid as String
59  {
60  return uuid;
61  }

References User.uuid.

◆ setName()

void setName ( String  name)

Sets the name of the user.

Parameters
nameThe name as String
76  {
77  this.name = name;
78  }

References User.name.

Referenced by UserManagementConnection.addUser(), UserManagementConnection.UserHandler.startElement(), and UserManagementConnection.updateUser().

◆ setPasswordHash()

void setPasswordHash ( String  passwordHash)

Sets the password hash of the user.

Parameters
passwordHashThe passwordHash as String
92  {
94  }

References User.passwordHash.

Referenced by UserManagementConnection.addUser(), UserManagementConnection.UserHandler.startElement(), and UserManagementConnection.updateUser().

◆ setUserlevel()

void setUserlevel ( UserType  userlevel)

Sets the user level of the user.

Parameters
userlevelThe userlevel as UserType
108  {
109  this.userlevel = userlevel;
110  }

References User.userlevel.

Referenced by UserManagementConnection.addUser(), UserManagementConnection.UserHandler.startElement(), and UserManagementConnection.updateUser().

◆ setUuid()

void setUuid ( String  uuid)

Sets the UUID of the user.

Parameters
uuidThe uuid as String
68  {
69  this.uuid = uuid;
70  }

References User.uuid.

Referenced by UserManagementConnection.login(), and UserManagementConnection.UserHandler.startElement().

◆ toString()

String toString ( )
113  {
114  return "Name: "+this.name+" - Level: "+userlevel;
115  }

References User.userlevel.

Referenced by WebService.getFeatureTypes(), and UserManagementConnection.usersToHTML().

Member Data Documentation

◆ authToken

String authToken

An auth token which has been given to this user to authenticate for web services.

Referenced by WebService.login().

◆ name

String name
private

The name of the user.

Referenced by User.getName(), User.setName(), and User.User().

◆ passwordHash

String passwordHash
private

The password hash used for authentification.

Referenced by User.getPasswordHash(), and User.setPasswordHash().

◆ userlevel

UserType userlevel
private

The authorization level given to this user.

Referenced by User.getUserlevel(), User.setUserlevel(), and User.toString().

◆ uuid

String uuid
private

The current UUID assigned to this user.

Referenced by User.getUuid(), and User.setUuid().