|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.dbtools.DBRecord<RT> org.opengts.db.AccountRecord<RT> org.opengts.db.UserRecord<User> org.opengts.db.tables.User
public class User
Nested Class Summary | |
---|---|
static class |
User.Gender
|
static class |
User.Key
|
static class |
User.UserType
|
Nested classes/interfaces inherited from class org.opengts.db.UserRecord |
---|
UserRecord.UserKey<RT extends DBRecord> |
Nested classes/interfaces inherited from class org.opengts.db.AccountRecord |
---|
AccountRecord.AccountKey<RT extends DBRecord> |
Nested classes/interfaces inherited from class org.opengts.dbtools.DBRecord |
---|
DBRecord.DBChangeListener |
Field Summary | |
---|---|
static java.lang.String |
_TABLE_NAME
|
static DBField[] |
AddressFieldInfo
|
static java.lang.String |
BLANK_PASSWORD
|
static DBField[] |
ExtraFieldInfo
|
static java.lang.String |
FLD_addressCity
|
static java.lang.String |
FLD_addressCountry
|
static java.lang.String |
FLD_addressLine1
|
static java.lang.String |
FLD_addressLine2
|
static java.lang.String |
FLD_addressLine3
|
static java.lang.String |
FLD_addressPostalCode
|
static java.lang.String |
FLD_addressState
|
static java.lang.String |
FLD_contactEmail
|
static java.lang.String |
FLD_contactName
|
static java.lang.String |
FLD_contactPhone
|
static java.lang.String |
FLD_customAttributes
|
static java.lang.String |
FLD_distanceUnits
|
static java.lang.String |
FLD_firstLoginPageID
|
static java.lang.String |
FLD_gender
|
static java.lang.String |
FLD_lastLoginTime
|
static java.lang.String |
FLD_maxAccessLevel
|
static java.lang.String |
FLD_notifyEmail
|
static java.lang.String |
FLD_officeLocation
|
static java.lang.String |
FLD_passwdChangeTime
|
static java.lang.String |
FLD_passwdQueryTime
|
static java.lang.String |
FLD_password
|
static java.lang.String |
FLD_preferredDeviceID
|
static java.lang.String |
FLD_roleID
|
static java.lang.String |
FLD_speedUnits
|
static java.lang.String |
FLD_timeZone
|
static java.lang.String |
FLD_userType
|
static java.lang.String |
OPTCOLS_AddressFieldInfo
|
static java.lang.String |
OPTCOLS_ExtraFieldInfo
|
static java.lang.String |
USER_ADMIN
|
Fields inherited from class org.opengts.db.UserRecord |
---|
FLD_userID |
Fields inherited from class org.opengts.db.AccountRecord |
---|
FLD_accountID, FLD_displayName, FLD_isActive, FLD_notes |
Fields inherited from class org.opengts.dbtools.DBRecord |
---|
errorDescription, excludedUpdateFields, FLD_creationMillis, FLD_creationTime, FLD_description, FLD_lastUpdateAccount, FLD_lastUpdateTime, FLD_lastUpdateUser, hasError, ID_SIZE, isValidating, lastSQLException, NOTIFY_GROUP, PSEUDO_FIELD_CHAR, tempProps |
Constructor Summary | |
---|---|
User()
|
|
User(User.Key key)
|
Method Summary | |
---|---|
protected static DBSelect |
_getGroupListSelect(java.lang.String acctId,
java.lang.String userId,
long limit)
|
protected static DBSelect<User> |
_getUsersForRoleSelect(java.lang.String acctID,
java.lang.String roleID,
long limit)
|
protected boolean |
_setDeviceGroups(java.util.Iterator<java.lang.String> groupListIter)
|
void |
addDeviceGroup(java.lang.String groupID)
|
boolean |
checkPassword(BasicPrivateLabel bpl,
java.lang.String enteredPass)
|
static long |
countUserIDsForRole(java.lang.String acctID,
java.lang.String roleID)
|
static User |
createNewUser(Account account,
java.lang.String userID,
java.lang.String contactEmail,
java.lang.String passwd)
|
static boolean |
exists(java.lang.String acctID,
java.lang.String userID)
|
java.lang.String[] |
getAclsForUser()
|
java.lang.String |
getAddressCity()
|
java.lang.String |
getAddressCountry()
|
java.lang.String |
getAddressLine1()
|
java.lang.String |
getAddressLine2()
|
java.lang.String |
getAddressLine3()
|
java.lang.String[] |
getAddressLines()
|
java.lang.String |
getAddressPostalCode()
|
java.lang.String |
getAddressState()
|
static java.lang.String |
getAdminUserID()
Gets the defined "admin" user id |
protected OrderedSet<java.lang.String> |
getAuthorizedDeviceIDs(boolean inclInactv)
|
static OrderedSet<java.lang.String> |
getAuthorizedDeviceIDs(User user,
Account account,
boolean inclInactv)
|
static OrderedSet<java.lang.String> |
getAuthorizedDeviceIDs(User user,
java.lang.String accountID,
boolean inclInactv)
|
java.lang.String |
getContactEmail()
|
java.lang.String |
getContactName()
|
java.lang.String |
getContactPhone()
|
DateTime |
getCurrentDateTime()
|
java.lang.String |
getCustomAttribute(java.lang.String key)
|
java.util.Collection<java.lang.String> |
getCustomAttributeKeys()
|
java.lang.String |
getCustomAttributes()
|
RTProperties |
getCustomAttributesRTP()
|
java.lang.String |
getDecodedPassword(BasicPrivateLabel bpl)
|
boolean |
getDefaultDeviceAuthorization()
|
java.lang.String |
getDefaultDeviceID(boolean inclInactv)
|
java.util.List<java.lang.String> |
getDeviceGroups(boolean refresh)
|
java.lang.String |
getDistanceString(double distKM,
boolean inclUnits,
java.util.Locale locale)
|
int |
getDistanceUnits()
|
java.lang.String |
getEncodedPassword()
|
static DBFactory<User> |
getFactory()
|
java.lang.String |
getFirstLoginPageID()
|
int |
getGender()
|
static User.Gender |
getGender(User u)
Returns the defined Gender for the specified user. |
static java.util.List<java.lang.String> |
getGroupsForUser(java.lang.String acctId,
java.lang.String userId)
|
static java.util.List<java.lang.String> |
getGroupsForUser(java.lang.String acctId,
java.lang.String userId,
long limit)
|
long |
getLastLoginTime()
|
int |
getMaxAccessLevel()
|
java.lang.String |
getNotifyEmail()
|
java.lang.String |
getOfficeLocation()
|
long |
getPasswdChangeTime()
|
long |
getPasswdQueryTime()
|
java.lang.String |
getPassword()
|
java.lang.String |
getPreferredDeviceID()
|
Role |
getRole()
|
java.lang.String |
getRoleID()
|
java.lang.String |
getSpeedString(double speedKPH,
boolean inclUnits,
java.util.Locale locale)
|
java.lang.String |
getSpeedString(double speedKPH,
java.lang.String format,
Account.SpeedUnits speedUnitsEnum,
boolean inclUnits,
java.util.Locale locale)
|
java.lang.String |
getSpeedString(double speedKPH,
java.lang.String format,
boolean inclUnits,
java.util.Locale locale)
|
int |
getSpeedUnits()
|
static java.lang.String |
getTableDescription(java.util.Locale loc)
|
java.lang.String |
getTimeZone()
Gets time zone for this user |
java.util.TimeZone |
getTimeZone(java.util.TimeZone dft)
Gets the TimeZone instance for this user |
static User |
getUser(Account account,
java.lang.String userID)
|
static User |
getUser(Account account,
java.lang.String userId,
boolean create)
|
static User |
getUserForContactEmail(java.lang.String acctId,
java.lang.String emailAddr)
|
static java.lang.String[] |
getUserIDs(DBSelect<User> dsel)
|
static java.util.List<java.lang.String> |
getUserIDsForRole(java.lang.String acctID,
java.lang.String roleID)
|
static java.util.List<java.lang.String> |
getUserIDsForRole(java.lang.String acctID,
java.lang.String roleID,
long limit)
|
static java.lang.String |
getUserName(User user)
Gets the account/user name for the specified user. |
static java.lang.String[] |
getUsersForAccount(java.lang.String acctId)
|
static java.lang.String[] |
getUsersForAccount(java.lang.String acctId,
int userType)
|
static java.util.List<User> |
getUsersForContactEmail(java.lang.String acctId,
java.lang.String emailAddr)
|
int |
getUserType()
|
boolean |
hasFirstLoginPageID()
|
boolean |
hasPasswordExpired()
|
boolean |
hasPreferredDeviceID()
|
static boolean |
hasUserIDsForRole(java.lang.String acctID,
java.lang.String roleID)
|
boolean |
isAdminUser()
|
static boolean |
isAdminUser(java.lang.String userID)
Returns true if specified user is and "admin" user |
static boolean |
isAdminUser(User user)
Returns true if specified user is and "admin" user |
boolean |
isAuthorizedDevice(java.lang.String deviceID)
|
boolean |
isDeviceGroupAll()
|
static void |
main(java.lang.String[] args)
|
void |
removeDeviceGroup(java.lang.String groupID)
|
java.lang.String |
resetPassword(BasicPrivateLabel bpl)
|
void |
setAddressCity(java.lang.String v)
|
void |
setAddressCountry(java.lang.String v)
|
void |
setAddressLine1(java.lang.String v)
|
void |
setAddressLine2(java.lang.String v)
|
void |
setAddressLine3(java.lang.String v)
|
void |
setAddressLines(java.lang.String[] lines)
|
void |
setAddressPostalCode(java.lang.String v)
|
void |
setAddressState(java.lang.String v)
|
void |
setContactEmail(java.lang.String v)
|
void |
setContactName(java.lang.String v)
|
void |
setContactPhone(java.lang.String v)
|
void |
setCreationDefaultValues()
Override to set default values |
java.lang.String |
setCustomAttribute(java.lang.String key,
java.lang.String value)
|
void |
setCustomAttributes(java.lang.String v)
|
void |
setDecodedPassword(BasicPrivateLabel bpl,
java.lang.String enteredPass)
|
boolean |
setDeviceGroups(java.util.List<java.lang.String> groupList)
|
boolean |
setDeviceGroups(java.lang.String[] groupList)
|
void |
setDistanceUnits(Account.DistanceUnits v)
|
void |
setDistanceUnits(int v)
|
void |
setDistanceUnits(java.lang.String v,
java.util.Locale locale)
|
void |
setEncodedPassword(java.lang.String p)
|
void |
setFirstLoginPageID(java.lang.String v)
|
void |
setGender(int v)
|
void |
setGender(java.lang.String v,
java.util.Locale locale)
|
void |
setGender(User.Gender v)
|
void |
setLastLoginTime(long v)
|
void |
setMaxAccessLevel(AclEntry.AccessLevel v)
|
void |
setMaxAccessLevel(int v)
|
void |
setMaxAccessLevel(java.lang.String v)
|
void |
setNotifyEmail(java.lang.String v)
|
void |
setOfficeLocation(java.lang.String v)
|
void |
setPasswdChangeTime(long v)
|
void |
setPasswdQueryTime(long v)
|
void |
setPassword(java.lang.String p)
|
void |
setPreferredDeviceID(java.lang.String v)
|
void |
setRoleID(java.lang.String v)
|
void |
setSpeedUnits(Account.SpeedUnits v)
|
void |
setSpeedUnits(int v)
|
void |
setSpeedUnits(java.lang.String v,
java.util.Locale locale)
|
void |
setTimeZone(java.lang.String v)
Sets the timezone for this user |
void |
setUserType(int v)
|
static java.lang.String |
TABLE_NAME()
|
java.lang.String |
toString()
Returns a String representation of the DBRecordKey for this DBRecord |
Methods inherited from class org.opengts.db.UserRecord |
---|
getUser, getUserDescription, getUserID, newField_userID, setUser |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OPTCOLS_AddressFieldInfo
public static final java.lang.String OPTCOLS_ExtraFieldInfo
public static final java.lang.String USER_ADMIN
public static final java.lang.String BLANK_PASSWORD
public static final java.lang.String _TABLE_NAME
public static final java.lang.String FLD_userType
public static final java.lang.String FLD_roleID
public static final java.lang.String FLD_password
public static final java.lang.String FLD_gender
public static final java.lang.String FLD_notifyEmail
public static final java.lang.String FLD_contactName
public static final java.lang.String FLD_contactPhone
public static final java.lang.String FLD_contactEmail
public static final java.lang.String FLD_timeZone
public static final java.lang.String FLD_speedUnits
public static final java.lang.String FLD_distanceUnits
public static final java.lang.String FLD_firstLoginPageID
public static final java.lang.String FLD_preferredDeviceID
public static final java.lang.String FLD_maxAccessLevel
public static final java.lang.String FLD_passwdChangeTime
public static final java.lang.String FLD_passwdQueryTime
public static final java.lang.String FLD_lastLoginTime
public static final java.lang.String FLD_addressLine1
public static final java.lang.String FLD_addressLine2
public static final java.lang.String FLD_addressLine3
public static final java.lang.String FLD_addressCity
public static final java.lang.String FLD_addressState
public static final java.lang.String FLD_addressPostalCode
public static final java.lang.String FLD_addressCountry
public static final java.lang.String FLD_officeLocation
public static final DBField[] AddressFieldInfo
public static final java.lang.String FLD_customAttributes
public static final DBField[] ExtraFieldInfo
Constructor Detail |
---|
public User()
public User(User.Key key)
Method Detail |
---|
public static java.lang.String getAdminUserID()
public static boolean isAdminUser(java.lang.String userID)
userID
- The userID to test
public static boolean isAdminUser(User user)
user
- The user to test
public static java.lang.String getUserName(User user)
user
- The user for which the account/user name is returned
public static User.Gender getGender(User u)
u
- The user from which the Gender will be obtained.
If null, the default Gender will be returned.
public static java.lang.String TABLE_NAME()
public static DBFactory<User> getFactory()
public static java.lang.String getTableDescription(java.util.Locale loc)
public int getUserType()
public void setUserType(int v)
public Role getRole()
public java.lang.String getRoleID()
public void setRoleID(java.lang.String v)
public java.lang.String getPassword()
public void setPassword(java.lang.String p)
public java.lang.String getEncodedPassword()
getEncodedPassword
in interface UserInformation
public void setEncodedPassword(java.lang.String p)
public java.lang.String getDecodedPassword(BasicPrivateLabel bpl)
public void setDecodedPassword(BasicPrivateLabel bpl, java.lang.String enteredPass)
setDecodedPassword
in interface UserInformation
public java.lang.String resetPassword(BasicPrivateLabel bpl)
public boolean checkPassword(BasicPrivateLabel bpl, java.lang.String enteredPass)
checkPassword
in interface UserInformation
public int getGender()
public void setGender(int v)
public void setGender(User.Gender v)
public void setGender(java.lang.String v, java.util.Locale locale)
public java.lang.String getNotifyEmail()
public void setNotifyEmail(java.lang.String v)
public java.lang.String getContactName()
getContactName
in interface UserInformation
public void setContactName(java.lang.String v)
setContactName
in interface UserInformation
public java.lang.String getContactPhone()
getContactPhone
in interface UserInformation
public void setContactPhone(java.lang.String v)
setContactPhone
in interface UserInformation
public java.lang.String getContactEmail()
getContactEmail
in interface UserInformation
public void setContactEmail(java.lang.String v)
setContactEmail
in interface UserInformation
public java.util.TimeZone getTimeZone(java.util.TimeZone dft)
dft
- The default timezone if no timezone is defined for usr/accountpublic java.lang.String getTimeZone()
getTimeZone
in interface UserInformation
public void setTimeZone(java.lang.String v)
setTimeZone
in interface UserInformation
public DateTime getCurrentDateTime()
public int getSpeedUnits()
public void setSpeedUnits(int v)
public void setSpeedUnits(Account.SpeedUnits v)
public void setSpeedUnits(java.lang.String v, java.util.Locale locale)
public java.lang.String getSpeedString(double speedKPH, boolean inclUnits, java.util.Locale locale)
public java.lang.String getSpeedString(double speedKPH, java.lang.String format, boolean inclUnits, java.util.Locale locale)
public java.lang.String getSpeedString(double speedKPH, java.lang.String format, Account.SpeedUnits speedUnitsEnum, boolean inclUnits, java.util.Locale locale)
public int getDistanceUnits()
public void setDistanceUnits(int v)
public void setDistanceUnits(Account.DistanceUnits v)
public void setDistanceUnits(java.lang.String v, java.util.Locale locale)
public java.lang.String getDistanceString(double distKM, boolean inclUnits, java.util.Locale locale)
public java.lang.String getFirstLoginPageID()
public void setFirstLoginPageID(java.lang.String v)
public boolean hasFirstLoginPageID()
public java.lang.String getPreferredDeviceID()
public void setPreferredDeviceID(java.lang.String v)
public boolean hasPreferredDeviceID()
public int getMaxAccessLevel()
public void setMaxAccessLevel(int v)
public void setMaxAccessLevel(java.lang.String v)
public void setMaxAccessLevel(AclEntry.AccessLevel v)
public long getPasswdChangeTime()
public void setPasswdChangeTime(long v)
public boolean hasPasswordExpired()
public long getPasswdQueryTime()
getPasswdQueryTime
in interface UserInformation
public void setPasswdQueryTime(long v)
setPasswdQueryTime
in interface UserInformation
public long getLastLoginTime()
getLastLoginTime
in interface UserInformation
public void setLastLoginTime(long v)
setLastLoginTime
in interface UserInformation
public java.lang.String getAddressLine1()
public java.lang.String getAddressLine2()
public java.lang.String getAddressLine3()
public java.lang.String[] getAddressLines()
public java.lang.String getAddressCity()
public java.lang.String getAddressState()
public java.lang.String getAddressPostalCode()
public java.lang.String getAddressCountry()
public void setAddressLine1(java.lang.String v)
public void setAddressLine2(java.lang.String v)
public void setAddressLine3(java.lang.String v)
public void setAddressLines(java.lang.String[] lines)
public void setAddressCity(java.lang.String v)
public void setAddressState(java.lang.String v)
public void setAddressPostalCode(java.lang.String v)
public void setAddressCountry(java.lang.String v)
public java.lang.String getOfficeLocation()
public void setOfficeLocation(java.lang.String v)
public java.lang.String getCustomAttributes()
public void setCustomAttributes(java.lang.String v)
public RTProperties getCustomAttributesRTP()
public java.util.Collection<java.lang.String> getCustomAttributeKeys()
public java.lang.String getCustomAttribute(java.lang.String key)
public java.lang.String setCustomAttribute(java.lang.String key, java.lang.String value)
public void setCreationDefaultValues()
DBRecord
setCreationDefaultValues
in class DBRecord<User>
public boolean isAdminUser()
public boolean getDefaultDeviceAuthorization()
protected static DBSelect _getGroupListSelect(java.lang.String acctId, java.lang.String userId, long limit)
public static java.util.List<java.lang.String> getGroupsForUser(java.lang.String acctId, java.lang.String userId) throws DBException
DBException
public static java.util.List<java.lang.String> getGroupsForUser(java.lang.String acctId, java.lang.String userId, long limit) throws DBException
DBException
public java.util.List<java.lang.String> getDeviceGroups(boolean refresh) throws DBException
DBException
public boolean isDeviceGroupAll() throws DBException
DBException
public boolean setDeviceGroups(java.lang.String[] groupList)
public boolean setDeviceGroups(java.util.List<java.lang.String> groupList)
protected boolean _setDeviceGroups(java.util.Iterator<java.lang.String> groupListIter)
public void addDeviceGroup(java.lang.String groupID) throws DBException
DBException
public void removeDeviceGroup(java.lang.String groupID) throws DBException
DBException
public static OrderedSet<java.lang.String> getAuthorizedDeviceIDs(User user, Account account, boolean inclInactv) throws DBException
DBException
public static OrderedSet<java.lang.String> getAuthorizedDeviceIDs(User user, java.lang.String accountID, boolean inclInactv) throws DBException
DBException
protected OrderedSet<java.lang.String> getAuthorizedDeviceIDs(boolean inclInactv) throws DBException
DBException
public boolean isAuthorizedDevice(java.lang.String deviceID) throws DBException
DBException
public java.lang.String getDefaultDeviceID(boolean inclInactv) throws DBException
DBException
public java.lang.String[] getAclsForUser() throws DBException
DBException
public java.lang.String toString()
DBRecord
toString
in class DBRecord<User>
public static boolean exists(java.lang.String acctID, java.lang.String userID) throws DBException
DBException
public static User getUser(Account account, java.lang.String userID) throws DBException
DBException
public static User getUser(Account account, java.lang.String userId, boolean create) throws DBException
DBException
public static User createNewUser(Account account, java.lang.String userID, java.lang.String contactEmail, java.lang.String passwd) throws DBException
DBException
public static java.lang.String[] getUsersForAccount(java.lang.String acctId) throws DBException
DBException
public static java.lang.String[] getUsersForAccount(java.lang.String acctId, int userType) throws DBException
DBException
public static java.lang.String[] getUserIDs(DBSelect<User> dsel) throws DBException
DBException
public static User getUserForContactEmail(java.lang.String acctId, java.lang.String emailAddr) throws DBException
DBException
public static java.util.List<User> getUsersForContactEmail(java.lang.String acctId, java.lang.String emailAddr) throws DBException
DBException
protected static DBSelect<User> _getUsersForRoleSelect(java.lang.String acctID, java.lang.String roleID, long limit)
public static boolean hasUserIDsForRole(java.lang.String acctID, java.lang.String roleID) throws DBException
DBException
public static java.util.List<java.lang.String> getUserIDsForRole(java.lang.String acctID, java.lang.String roleID) throws DBException
DBException
public static long countUserIDsForRole(java.lang.String acctID, java.lang.String roleID) throws DBException
DBException
public static java.util.List<java.lang.String> getUserIDsForRole(java.lang.String acctID, java.lang.String roleID, long limit) throws DBException
DBException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |