org.paneris.user.model
Class User

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by org.paneris.util.ExtendedHash
              extended by org.paneris.jal.model.DDRecord
                  extended by org.paneris.user.model.User
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class User
extends DDRecord

A User.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.paneris.jal.model.DDRecord
connMgr, database, dataCache, debug, metaData
 
Constructor Summary
User(java.lang.String db)
          Constructor
User(java.lang.String db, java.lang.Integer record)
          Constructor
User(java.lang.String db, java.sql.ResultSet rs)
          Constructor
 
Method Summary
 void announce(int boardid, java.lang.String mess)
          Announce this user to a messageboard.
static java.lang.String checkLoggedIn(java.lang.String resourceType, java.lang.String resource, java.lang.String db, org.webmacro.servlet.WebContext context, java.lang.String message)
           
static java.lang.String checkLoggedIn(java.lang.String resourceType, java.lang.String resource, java.lang.String db, org.webmacro.servlet.WebContext context, java.lang.String message, boolean force)
           
static java.lang.String checkLoggedIn(java.lang.String resourceType, java.lang.String resource, java.lang.String db, org.webmacro.servlet.WebContext context, java.lang.String message, boolean force, java.lang.String wmtemplate)
          Checks whether a user has access rights for a particular resource.
static java.lang.String checkLoggedIn(java.lang.String resourceType, java.lang.String resource, org.webmacro.servlet.WebContext context, java.lang.String message)
          check if we are logged in,
static java.lang.String checkLoggedIn(java.lang.String resourceType, java.lang.String resource, org.webmacro.servlet.WebContext context, java.lang.String message, boolean force)
           
static java.lang.String checkLoggedInForParentRecord(DDRecord record, org.webmacro.servlet.WebContext context, java.lang.String message)
          Check if we are logged in for the table and record we are trying to edit, this is done by looking at the record for fields that lookup directly to a this users user record.
static java.lang.String checkLoggedInForRecord(DDRecord record, org.webmacro.servlet.WebContext context, java.lang.String message)
          Check if we are logged in by the table and record we are trying to edit.
 boolean checkPassword(java.lang.String c)
           
 void generateDetails()
          generates a unique login id and a random password for this user also set the username to the password if it is blank
 void generateId()
           
 java.lang.Integer getId()
           
static User getInstance(org.webmacro.servlet.WebContext context)
           
static User getInstance(org.webmacro.servlet.WebContext context, java.lang.String db)
           
static java.lang.String getLoginPage(org.webmacro.servlet.WebContext context, java.lang.String message)
           
static java.lang.String getLoginPage(org.webmacro.servlet.WebContext context, java.lang.String db, java.lang.String message)
           
static java.lang.String getLoginPage(org.webmacro.servlet.WebContext context, java.lang.String db, java.lang.String message, java.lang.String wmtemplate)
           
static User getSystemUser(java.lang.String db)
           
 boolean isAdministrator()
           
 boolean isLoggedOn()
           
 User refresh(org.webmacro.servlet.WebContext context)
           
 void setLoggedOn(boolean value)
           
static void setReturnURL(org.webmacro.servlet.WebContext context)
           
 
Methods inherited from class org.paneris.jal.model.DDRecord
appendFieldValue, delete, get, getChildren, getField, getFieldValue, getLinksToThis, getLinksToThis, getMetaData, getOrderedChildren, getProblems, getResultSet, init, isDuplicated, setFieldValue, setFieldValue, setFromDefaults, setFromForm, setFromForm, setFromForm, write, write
 
Methods inherited from class org.paneris.util.ExtendedHash
clear, elements, joinKeys, keys, put, remove
 
Methods inherited from class java.util.Hashtable
clone, contains, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, putAll, rehash, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

User

public User(java.lang.String db,
            java.sql.ResultSet rs)
     throws java.lang.Exception
Constructor

Throws:
java.lang.Exception

User

public User(java.lang.String db)
     throws java.lang.Exception
Constructor

Throws:
java.lang.Exception

User

public User(java.lang.String db,
            java.lang.Integer record)
     throws java.lang.Exception
Constructor

Throws:
java.lang.Exception
Method Detail

getInstance

public static User getInstance(org.webmacro.servlet.WebContext context)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getInstance

public static User getInstance(org.webmacro.servlet.WebContext context,
                               java.lang.String db)
                        throws java.lang.Exception
Throws:
java.lang.Exception

refresh

public User refresh(org.webmacro.servlet.WebContext context)
             throws java.lang.Exception
Throws:
java.lang.Exception

getLoginPage

public static java.lang.String getLoginPage(org.webmacro.servlet.WebContext context,
                                            java.lang.String message)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getLoginPage

public static java.lang.String getLoginPage(org.webmacro.servlet.WebContext context,
                                            java.lang.String db,
                                            java.lang.String message)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getLoginPage

public static java.lang.String getLoginPage(org.webmacro.servlet.WebContext context,
                                            java.lang.String db,
                                            java.lang.String message,
                                            java.lang.String wmtemplate)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

checkLoggedInForParentRecord

public static java.lang.String checkLoggedInForParentRecord(DDRecord record,
                                                            org.webmacro.servlet.WebContext context,
                                                            java.lang.String message)
                                                     throws java.lang.Exception
Check if we are logged in for the table and record we are trying to edit, this is done by looking at the record for fields that lookup directly to a this users user record.

Throws:
java.lang.Exception

checkLoggedInForRecord

public static java.lang.String checkLoggedInForRecord(DDRecord record,
                                                      org.webmacro.servlet.WebContext context,
                                                      java.lang.String message)
                                               throws java.lang.Exception
Check if we are logged in by the table and record we are trying to edit.

Throws:
java.lang.Exception

checkLoggedIn

public static java.lang.String checkLoggedIn(java.lang.String resourceType,
                                             java.lang.String resource,
                                             org.webmacro.servlet.WebContext context,
                                             java.lang.String message)
                                      throws java.lang.Exception
check if we are logged in,

Throws:
java.lang.Exception

checkLoggedIn

public static java.lang.String checkLoggedIn(java.lang.String resourceType,
                                             java.lang.String resource,
                                             java.lang.String db,
                                             org.webmacro.servlet.WebContext context,
                                             java.lang.String message)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

checkLoggedIn

public static java.lang.String checkLoggedIn(java.lang.String resourceType,
                                             java.lang.String resource,
                                             org.webmacro.servlet.WebContext context,
                                             java.lang.String message,
                                             boolean force)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

checkLoggedIn

public static java.lang.String checkLoggedIn(java.lang.String resourceType,
                                             java.lang.String resource,
                                             java.lang.String db,
                                             org.webmacro.servlet.WebContext context,
                                             java.lang.String message,
                                             boolean force)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

checkLoggedIn

public static java.lang.String checkLoggedIn(java.lang.String resourceType,
                                             java.lang.String resource,
                                             java.lang.String db,
                                             org.webmacro.servlet.WebContext context,
                                             java.lang.String message,
                                             boolean force,
                                             java.lang.String wmtemplate)
                                      throws java.lang.Exception
Checks whether a user has access rights for a particular resource.

Returns:
the template to use for a login page, if the user needs to log on; null if the user is logged on, or there are no entries for the resource in the database (or anything goes wrong, such as not giving a valid db name!)
Throws:
java.lang.Exception

setReturnURL

public static void setReturnURL(org.webmacro.servlet.WebContext context)

setLoggedOn

public void setLoggedOn(boolean value)

isLoggedOn

public boolean isLoggedOn()

isAdministrator

public boolean isAdministrator()

getId

public java.lang.Integer getId()

checkPassword

public boolean checkPassword(java.lang.String c)
                      throws java.lang.Exception
Throws:
java.lang.Exception

generateDetails

public void generateDetails()
generates a unique login id and a random password for this user also set the username to the password if it is blank


generateId

public void generateId()
                throws java.lang.Exception
Throws:
java.lang.Exception

getSystemUser

public static User getSystemUser(java.lang.String db)

announce

public void announce(int boardid,
                     java.lang.String mess)
              throws java.lang.Exception
Announce this user to a messageboard.

Throws:
java.lang.Exception


Copyright © 2000-2008 PanEris. All Rights Reserved.