CFEngine API

org.recommender.clients.console
Class User

java.lang.Object
  |
  +--org.recommender.clients.console.User
All Implemented Interfaces:
java.io.Serializable

public class User
extends java.lang.Object
implements java.io.Serializable

Describes the user info for the CF Engine.

Author:
Sameer Kadam, Irwin Yoon, Jon Herlocker
See Also:
Serialized Form

Constructor Summary
User(int id)
          Constructor when a server-side id exists, but there isn't a client-side user name
User(int id, java.lang.String userName)
          Use this constructor if have all the information.
User(java.lang.String userName)
          Only use this constructor if don't have the userID available.
 
Method Summary
 int getID()
          Accessor, get userID.
 java.lang.String getUserName()
          Accessor, get userName.
 void setID(int id)
          Call this method as soon as the user id is assigned.
 java.lang.String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

User

public User(int id,
            java.lang.String userName)
Use this constructor if have all the information.

Parameters:
id -
userName -

User

public User(int id)
Constructor when a server-side id exists, but there isn't a client-side user name

Parameters:
id - The cfengine server-side userid

User

public User(java.lang.String userName)
Only use this constructor if don't have the userID available. This usually occurs before the user has been added to the database. IMPORTANT: you should call setID as soon as you get the userID This is typically done after the user has been added to the database and the user id is assigned.

Parameters:
userName -
Method Detail

setID

public void setID(int id)
Call this method as soon as the user id is assigned. This should be called if you used the constructor that did not contain the userid.

Parameters:
id -

getID

public int getID()
Accessor, get userID.

Returns:
this.id

getUserName

public java.lang.String getUserName()
Accessor, get userName.

Returns:
this.userName

toString

public java.lang.String toString()
toString

Overrides:
toString in class java.lang.Object

CFEngine API

Copyright © 2003 - Oregon State University www.orst.edu