|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bibalex.daf.entities.AdminModuleBase org.bibalex.daf.entities.User
public class User
Field Summary | |
---|---|
private int |
canRedirectJob
|
private int |
canSelectJob
|
private DBConnection |
conn
|
private int |
id
|
private java.util.HashMap |
permissionMap
|
private int |
Role_ID
|
private boolean |
userAnyPhase
|
private boolean |
userIsActive
|
private boolean |
userisLDAP
|
private int |
userMaxJobs
|
private java.lang.String |
userName
|
private java.lang.String |
userPassword
|
Constructor Summary | |
---|---|
User()
Class Constructor |
|
User(DataTable table)
|
|
User(int userID)
|
Method Summary | |
---|---|
OperationInfo |
add()
Add new User |
static OperationInfo |
DBAuthenticate(java.lang.String userName,
java.lang.String password)
Authenticate Users over DB |
OperationInfo |
delete()
delete User |
OperationInfo |
deleteCascade()
delete User in cascade |
static OperationInfo |
getAnyPhaseUsers()
select Users can works in any phase |
OperationInfo |
getAssignedJobs()
get assigned jobs to this user |
static OperationInfo |
getByID(int recID)
select User |
static OperationInfo |
getByName(java.lang.String userName)
select User by name |
OperationInfo |
getCollections()
select User's collections |
OperationInfo |
getHistory()
select Users history |
int |
getID()
Gets the User ID. |
OperationInfo |
getJobs()
|
OperationInfo |
getPermissions()
select Users Permissions |
OperationInfo |
getPhases()
select User's phases |
OperationInfo |
getPhasesSpecial()
|
OperationInfo |
getRates(int jobType,
int[] usersIDs,
java.util.Date fromDate,
java.util.Date toDate,
int booksLevel)
|
OperationInfo |
getRatesAllJobs(int jobType,
int userID,
java.util.Date fromDate,
java.util.Date toDate)
Return the user rates for all jobs done by the user in all phases |
OperationInfo |
getRatesRedoJobs(int jobType,
int userID,
java.util.Date fromDate,
java.util.Date toDate)
Return number of jobs that is re-done(the user did this job before) by the user in each phase |
OperationInfo |
getRole()
Gets the roles associated with the user. |
OperationInfo |
getStartedJobs()
Load All started jobs for User |
boolean |
getUserAnyPhase()
get User Any phase value |
boolean |
getUserIsActive()
get User IsActive value |
boolean |
getUserIsLDAP()
Gets user IsLDAP value |
int |
getUserMaxJobs()
get User Max Jobs |
java.lang.String |
getUserName()
get User Name |
java.lang.String |
getUserPassword()
get User PWD |
OperationInfo |
getUserRateJobs(int jobType,
int phaseID,
java.util.Date fromDate,
java.util.Date toDate,
int booksLevel)
|
int |
getUserRole_ID()
get User Role |
OperationInfo |
hasAdminAccess()
check if user has a admin access |
OperationInfo |
hasArchiveAccess()
check if user has a Archive access |
OperationInfo |
hasCheckInAccess()
check if user has a CheckIn access |
static OperationInfo |
hasPermission(int userID,
int permissionID)
check if user has a specific permission |
boolean |
hasPermission(java.lang.String permission)
Used to check if the user has the specified permission string |
static OperationInfo |
hasPermissionString(int userID,
java.lang.String permission)
check if user has a specific permission |
OperationInfo |
hasPhaseManagerAccess()
check if user has a Phase Manager access |
OperationInfo |
hasReportAccess()
check if user has a Report access |
static boolean |
LDAPAuthenticate(java.lang.String Uname,
java.lang.String UPWD)
Authenticate user over LDAP |
static OperationInfo |
loadAll()
Load all Users |
static OperationInfo |
loadAllActive()
Load Active Users |
static OperationInfo |
loadAllGUI()
Load Users for GUI |
void |
loadPermissions()
Load the permissions of the authenticated user from the DB |
static OperationInfo |
NameDBAuthenticate(java.lang.String userName)
Authenticate Users over DB using UserName |
void |
setFieldsFromDataTable(DataTable table)
|
void |
setID(int userID)
Sets the user ID. |
void |
setUserAnyPhase(boolean Value)
set User AnyPhase Value |
void |
setUserIsActive(boolean Value)
set User Max jobs Value |
void |
setUserIsLDAP(boolean Value)
set User IsLDAP value |
void |
setUserMaxjobs(int Value)
set User IsActive Value |
void |
setUserName(java.lang.String Value)
set User Name |
void |
setUserPassWord(java.lang.String Value)
set User PWD |
void |
setUserRole(int Value)
set User Role |
java.lang.String |
toString()
Returns the string representation of this object. |
OperationInfo |
update()
update User |
OperationInfo |
updatePhases(java.lang.Object[] phasesIDs)
Updates current User allowed phases. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private DBConnection conn
private int id
private java.lang.String userName
private java.lang.String userPassword
private boolean userAnyPhase
private boolean userisLDAP
private int userMaxJobs
private boolean userIsActive
private int Role_ID
private int canSelectJob
private int canRedirectJob
private java.util.HashMap permissionMap
Constructor Detail |
---|
public User()
public User(int userID) throws java.lang.Exception
java.lang.Exception
public User(DataTable table) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void setFieldsFromDataTable(DataTable table)
public static OperationInfo loadAll()
public static OperationInfo loadAllActive()
public OperationInfo getStartedJobs()
public static OperationInfo getByID(int recID)
recID
- is the record to be selected
public static OperationInfo loadAllGUI()
public static OperationInfo getByName(java.lang.String userName)
userName
- is the user name
public static OperationInfo getAnyPhaseUsers()
public static OperationInfo DBAuthenticate(java.lang.String userName, java.lang.String password)
userName
- is User Namepassword
- is User Password
public static OperationInfo NameDBAuthenticate(java.lang.String userName)
userName
- is User Name
public static boolean LDAPAuthenticate(java.lang.String Uname, java.lang.String UPWD)
Uname
- is the User nameUPWD
- is the User password
public static OperationInfo hasPermission(int userID, int permissionID)
userID
- is User IDpermissionID
- is Permission ID
public static OperationInfo hasPermissionString(int userID, java.lang.String permission)
userID
- is User IDpermission
- is Permission name
public OperationInfo add()
add
in class AdminModuleBase
public OperationInfo getAssignedJobs()
public OperationInfo getJobs()
public OperationInfo delete()
delete
in class AdminModuleBase
public OperationInfo deleteCascade()
public OperationInfo update()
update
in class AdminModuleBase
public OperationInfo getRole()
public OperationInfo getHistory()
public OperationInfo getPermissions()
public OperationInfo hasAdminAccess()
public OperationInfo hasCheckInAccess()
public OperationInfo hasPhaseManagerAccess()
public OperationInfo hasReportAccess()
public OperationInfo hasArchiveAccess()
public OperationInfo getPhases()
public OperationInfo getPhasesSpecial()
public OperationInfo updatePhases(java.lang.Object[] phasesIDs)
phasesIDs
- Phase IDs to be attached to the current User int[] casted as Object[]
public OperationInfo getRates(int jobType, int[] usersIDs, java.util.Date fromDate, java.util.Date toDate, int booksLevel)
public OperationInfo getRatesAllJobs(int jobType, int userID, java.util.Date fromDate, java.util.Date toDate)
jobType
- userID
- fromDate
- toDate
- booksLevel
-
public OperationInfo getRatesRedoJobs(int jobType, int userID, java.util.Date fromDate, java.util.Date toDate)
jobType
- userID
- fromDate
- toDate
- booksLevel
-
public OperationInfo getCollections()
public OperationInfo getUserRateJobs(int jobType, int phaseID, java.util.Date fromDate, java.util.Date toDate, int booksLevel)
public void setID(int userID)
userID
- The ID of the userpublic void setUserName(java.lang.String Value)
Value
- is the User Namepublic void setUserPassWord(java.lang.String Value)
Value
- is the User PWDpublic void setUserAnyPhase(boolean Value)
Value
- is the AnyPhase Value (1 if user work in any phase, 0 otherwise)public void setUserIsLDAP(boolean Value)
Value
- The IsLDAP valuepublic void setUserMaxjobs(int Value)
Value
- is the IsActive Value (1 for active user, 0 otherwise)public void setUserIsActive(boolean Value)
Value
- is the Max jobs Valuepublic void setUserRole(int Value)
Value
- is the Role Valuepublic int getID()
public java.lang.String getUserName()
public java.lang.String getUserPassword()
public boolean getUserAnyPhase()
public boolean getUserIsLDAP()
public int getUserMaxJobs()
public boolean getUserIsActive()
public int getUserRole_ID()
public java.lang.String toString()
toString
in class java.lang.Object
public void loadPermissions() throws java.lang.Exception
java.lang.Exception
public boolean hasPermission(java.lang.String permission)
permission
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |