org.opengts.db.tables
Class User

java.lang.Object
  extended by org.opengts.dbtools.DBRecord<RT>
      extended by org.opengts.db.AccountRecord<RT>
          extended by org.opengts.db.UserRecord<User>
              extended by org.opengts.db.tables.User
All Implemented Interfaces:
UserInformation

public class User
extends UserRecord<User>
implements UserInformation


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 org.opengts.db.AccountRecord
createSystemAdminAccount, getAccount, getAccountDescription, getAccountID, getDisplayName, getFilteredID, getFilteredID, getIsActive, getNotes, GetSimpleLocalString, getSystemAdminAccount, getSystemAdminAccountID, hasAccount, hasSystemAdminAccountID, isAccountManager, isActive, isSystemAdmin, isSystemAdmin, isSystemAdminAccountID, isValidID, newField_accountID, newField_accountID, newField_displayName, newField_displayName, newField_isActive, newField_isActive, newField_notes, newField_notes, setAccount, setDisplayName, setIsActive, setNotes, setRuntimeDefaultValues
 
Methods inherited from class org.opengts.dbtools.DBRecord
_getFactory, _reload, addChangedNotification, addExcludedUpdateFields, adjustStringLength_1, adjustStringLength, appendFieldValues, clearChanged, clearError, clearExcludedUpdateFields, clearLastCaughtSQLException, equals, excludeFieldFromUpdate, excludeFieldFromUpdate, fireChangeNotification, geKeyValue, getCreationDateTime, getCreationMillis, getCreationTime, GetCurrentAccount, GetCurrentUser, getDefaultFieldValueKey, getDescription, getErrorDescription, getFactory, getFactory, getField, getFieldBoolean, getFieldDateTime, getFieldDouble, getFieldFloat, getFieldInt, getFieldLong, getFieldName, getFieldString, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getKeyValue, getLastCaughtSQLException, getLastUpdateAccount, getLastUpdateTime, getLastUpdateTime, getLastUpdateUser, getNextGroup, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getOptionalFieldValue, getRecordCount, getRecordCount, getRecordCount, getRecordCount, getRecordCount, getRecordKey, getRecords, getRecords, getTemporaryProperties, getValue, getVirtual, hasChanged, hasError, hasField, hasFieldValue, hasOptionalFieldValue, hasTemporaryProperties, insert, isFieldUnsigned, isLastCaughtSQLExceptionErrorCode, isOkToReload, isOkToSave, isValidating, isVirtual, lock, lockRead, lockWrite, newField_creationMillis, newField_creationTime, newField_creationTime, newField_description, newField_description, newField_lastUpdateAccount, newField_lastUpdateAccount, newField_lastUpdateTime, newField_lastUpdateUser, newField_lastUpdateUser, printXML, printXML, printXML, printXML, printXML, printXML, recordDidInsert, recordDidUpdate, recordWillInsert, recordWillUpdate, reload, reload, removeChangedNotification, save, select, select, select, setAllFieldValues, setAllFieldValues, setAllFieldValues, setAllFieldValues, setChanged, setChanged, setCreationMillis, setCreationTime, SetCurrentAccount, SetCurrentUser, setDescription, setError, setError, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setIgnoreInvalidFields, setKeyValue, setLastCaughtSQLException, setLastUpdateAccount, setLastUpdateTime, setLastUpdateUser, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setOptionalFieldValue, setValidating, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVirtual, toXML, toXML, toXML, toXML, toXML, unlock, update, update, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPTCOLS_AddressFieldInfo

public static final java.lang.String OPTCOLS_AddressFieldInfo
See Also:
Constant Field Values

OPTCOLS_ExtraFieldInfo

public static final java.lang.String OPTCOLS_ExtraFieldInfo
See Also:
Constant Field Values

USER_ADMIN

public static final java.lang.String USER_ADMIN
See Also:
Constant Field Values

BLANK_PASSWORD

public static final java.lang.String BLANK_PASSWORD
See Also:
Constant Field Values

_TABLE_NAME

public static final java.lang.String _TABLE_NAME
See Also:
Constant Field Values

FLD_userType

public static final java.lang.String FLD_userType
See Also:
Constant Field Values

FLD_roleID

public static final java.lang.String FLD_roleID
See Also:
Constant Field Values

FLD_password

public static final java.lang.String FLD_password
See Also:
Constant Field Values

FLD_gender

public static final java.lang.String FLD_gender
See Also:
Constant Field Values

FLD_notifyEmail

public static final java.lang.String FLD_notifyEmail
See Also:
Constant Field Values

FLD_contactName

public static final java.lang.String FLD_contactName
See Also:
Constant Field Values

FLD_contactPhone

public static final java.lang.String FLD_contactPhone
See Also:
Constant Field Values

FLD_contactEmail

public static final java.lang.String FLD_contactEmail
See Also:
Constant Field Values

FLD_timeZone

public static final java.lang.String FLD_timeZone
See Also:
Constant Field Values

FLD_speedUnits

public static final java.lang.String FLD_speedUnits
See Also:
Constant Field Values

FLD_distanceUnits

public static final java.lang.String FLD_distanceUnits
See Also:
Constant Field Values

FLD_firstLoginPageID

public static final java.lang.String FLD_firstLoginPageID
See Also:
Constant Field Values

FLD_preferredDeviceID

public static final java.lang.String FLD_preferredDeviceID
See Also:
Constant Field Values

FLD_maxAccessLevel

public static final java.lang.String FLD_maxAccessLevel
See Also:
Constant Field Values

FLD_passwdChangeTime

public static final java.lang.String FLD_passwdChangeTime
See Also:
Constant Field Values

FLD_passwdQueryTime

public static final java.lang.String FLD_passwdQueryTime
See Also:
Constant Field Values

FLD_lastLoginTime

public static final java.lang.String FLD_lastLoginTime
See Also:
Constant Field Values

FLD_addressLine1

public static final java.lang.String FLD_addressLine1
See Also:
Constant Field Values

FLD_addressLine2

public static final java.lang.String FLD_addressLine2
See Also:
Constant Field Values

FLD_addressLine3

public static final java.lang.String FLD_addressLine3
See Also:
Constant Field Values

FLD_addressCity

public static final java.lang.String FLD_addressCity
See Also:
Constant Field Values

FLD_addressState

public static final java.lang.String FLD_addressState
See Also:
Constant Field Values

FLD_addressPostalCode

public static final java.lang.String FLD_addressPostalCode
See Also:
Constant Field Values

FLD_addressCountry

public static final java.lang.String FLD_addressCountry
See Also:
Constant Field Values

FLD_officeLocation

public static final java.lang.String FLD_officeLocation
See Also:
Constant Field Values

AddressFieldInfo

public static final DBField[] AddressFieldInfo

FLD_customAttributes

public static final java.lang.String FLD_customAttributes
See Also:
Constant Field Values

ExtraFieldInfo

public static final DBField[] ExtraFieldInfo
Constructor Detail

User

public User()

User

public User(User.Key key)
Method Detail

getAdminUserID

public static java.lang.String getAdminUserID()
Gets the defined "admin" user id

Returns:
The defined "admin" user id

isAdminUser

public static boolean isAdminUser(java.lang.String userID)
Returns true if specified user is and "admin" user

Parameters:
userID - The userID to test
Returns:
True if the specified is an "admin" user

isAdminUser

public static boolean isAdminUser(User user)
Returns true if specified user is and "admin" user

Parameters:
user - The user to test
Returns:
True if the specified is an "admin" user

getUserName

public static java.lang.String getUserName(User user)
Gets the account/user name for the specified user.
(typically used for debug/logging purposes)

Parameters:
user - The user for which the account/user name is returned
Returns:
The account/user id/name

getGender

public static User.Gender getGender(User u)
Returns the defined Gender for the specified user.

Parameters:
u - The user from which the Gender will be obtained. If null, the default Gender will be returned.
Returns:
The Gender

TABLE_NAME

public static java.lang.String TABLE_NAME()

getFactory

public static DBFactory<User> getFactory()

getTableDescription

public static java.lang.String getTableDescription(java.util.Locale loc)

getUserType

public int getUserType()

setUserType

public void setUserType(int v)

getRole

public Role getRole()

getRoleID

public java.lang.String getRoleID()

setRoleID

public void setRoleID(java.lang.String v)

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String p)

getEncodedPassword

public java.lang.String getEncodedPassword()
Specified by:
getEncodedPassword in interface UserInformation

setEncodedPassword

public void setEncodedPassword(java.lang.String p)

getDecodedPassword

public java.lang.String getDecodedPassword(BasicPrivateLabel bpl)

setDecodedPassword

public void setDecodedPassword(BasicPrivateLabel bpl,
                               java.lang.String enteredPass)
Specified by:
setDecodedPassword in interface UserInformation

resetPassword

public java.lang.String resetPassword(BasicPrivateLabel bpl)

checkPassword

public boolean checkPassword(BasicPrivateLabel bpl,
                             java.lang.String enteredPass)
Specified by:
checkPassword in interface UserInformation

getGender

public int getGender()

setGender

public void setGender(int v)

setGender

public void setGender(User.Gender v)

setGender

public void setGender(java.lang.String v,
                      java.util.Locale locale)

getNotifyEmail

public java.lang.String getNotifyEmail()

setNotifyEmail

public void setNotifyEmail(java.lang.String v)

getContactName

public java.lang.String getContactName()
Specified by:
getContactName in interface UserInformation

setContactName

public void setContactName(java.lang.String v)
Specified by:
setContactName in interface UserInformation

getContactPhone

public java.lang.String getContactPhone()
Specified by:
getContactPhone in interface UserInformation

setContactPhone

public void setContactPhone(java.lang.String v)
Specified by:
setContactPhone in interface UserInformation

getContactEmail

public java.lang.String getContactEmail()
Specified by:
getContactEmail in interface UserInformation

setContactEmail

public void setContactEmail(java.lang.String v)
Specified by:
setContactEmail in interface UserInformation

getTimeZone

public java.util.TimeZone getTimeZone(java.util.TimeZone dft)
Gets the TimeZone instance for this user

Parameters:
dft - The default timezone if no timezone is defined for usr/account

getTimeZone

public java.lang.String getTimeZone()
Gets time zone for this user

Specified by:
getTimeZone in interface UserInformation

setTimeZone

public void setTimeZone(java.lang.String v)
Sets the timezone for this user

Specified by:
setTimeZone in interface UserInformation

getCurrentDateTime

public DateTime getCurrentDateTime()

getSpeedUnits

public int getSpeedUnits()

setSpeedUnits

public void setSpeedUnits(int v)

setSpeedUnits

public void setSpeedUnits(Account.SpeedUnits v)

setSpeedUnits

public void setSpeedUnits(java.lang.String v,
                          java.util.Locale locale)

getSpeedString

public java.lang.String getSpeedString(double speedKPH,
                                       boolean inclUnits,
                                       java.util.Locale locale)

getSpeedString

public java.lang.String getSpeedString(double speedKPH,
                                       java.lang.String format,
                                       boolean inclUnits,
                                       java.util.Locale locale)

getSpeedString

public java.lang.String getSpeedString(double speedKPH,
                                       java.lang.String format,
                                       Account.SpeedUnits speedUnitsEnum,
                                       boolean inclUnits,
                                       java.util.Locale locale)

getDistanceUnits

public int getDistanceUnits()

setDistanceUnits

public void setDistanceUnits(int v)

setDistanceUnits

public void setDistanceUnits(Account.DistanceUnits v)

setDistanceUnits

public void setDistanceUnits(java.lang.String v,
                             java.util.Locale locale)

getDistanceString

public java.lang.String getDistanceString(double distKM,
                                          boolean inclUnits,
                                          java.util.Locale locale)

getFirstLoginPageID

public java.lang.String getFirstLoginPageID()

setFirstLoginPageID

public void setFirstLoginPageID(java.lang.String v)

hasFirstLoginPageID

public boolean hasFirstLoginPageID()

getPreferredDeviceID

public java.lang.String getPreferredDeviceID()

setPreferredDeviceID

public void setPreferredDeviceID(java.lang.String v)

hasPreferredDeviceID

public boolean hasPreferredDeviceID()

getMaxAccessLevel

public int getMaxAccessLevel()

setMaxAccessLevel

public void setMaxAccessLevel(int v)

setMaxAccessLevel

public void setMaxAccessLevel(java.lang.String v)

setMaxAccessLevel

public void setMaxAccessLevel(AclEntry.AccessLevel v)

getPasswdChangeTime

public long getPasswdChangeTime()

setPasswdChangeTime

public void setPasswdChangeTime(long v)

hasPasswordExpired

public boolean hasPasswordExpired()

getPasswdQueryTime

public long getPasswdQueryTime()
Specified by:
getPasswdQueryTime in interface UserInformation

setPasswdQueryTime

public void setPasswdQueryTime(long v)
Specified by:
setPasswdQueryTime in interface UserInformation

getLastLoginTime

public long getLastLoginTime()
Specified by:
getLastLoginTime in interface UserInformation

setLastLoginTime

public void setLastLoginTime(long v)
Specified by:
setLastLoginTime in interface UserInformation

getAddressLine1

public java.lang.String getAddressLine1()

getAddressLine2

public java.lang.String getAddressLine2()

getAddressLine3

public java.lang.String getAddressLine3()

getAddressLines

public java.lang.String[] getAddressLines()

getAddressCity

public java.lang.String getAddressCity()

getAddressState

public java.lang.String getAddressState()

getAddressPostalCode

public java.lang.String getAddressPostalCode()

getAddressCountry

public java.lang.String getAddressCountry()

setAddressLine1

public void setAddressLine1(java.lang.String v)

setAddressLine2

public void setAddressLine2(java.lang.String v)

setAddressLine3

public void setAddressLine3(java.lang.String v)

setAddressLines

public void setAddressLines(java.lang.String[] lines)

setAddressCity

public void setAddressCity(java.lang.String v)

setAddressState

public void setAddressState(java.lang.String v)

setAddressPostalCode

public void setAddressPostalCode(java.lang.String v)

setAddressCountry

public void setAddressCountry(java.lang.String v)

getOfficeLocation

public java.lang.String getOfficeLocation()

setOfficeLocation

public void setOfficeLocation(java.lang.String v)

getCustomAttributes

public java.lang.String getCustomAttributes()

setCustomAttributes

public void setCustomAttributes(java.lang.String v)

getCustomAttributesRTP

public RTProperties getCustomAttributesRTP()

getCustomAttributeKeys

public java.util.Collection<java.lang.String> getCustomAttributeKeys()

getCustomAttribute

public java.lang.String getCustomAttribute(java.lang.String key)

setCustomAttribute

public java.lang.String setCustomAttribute(java.lang.String key,
                                           java.lang.String value)

setCreationDefaultValues

public void setCreationDefaultValues()
Description copied from class: DBRecord
Override to set default values

Overrides:
setCreationDefaultValues in class DBRecord<User>

isAdminUser

public boolean isAdminUser()

getDefaultDeviceAuthorization

public boolean getDefaultDeviceAuthorization()

_getGroupListSelect

protected static DBSelect _getGroupListSelect(java.lang.String acctId,
                                              java.lang.String userId,
                                              long limit)

getGroupsForUser

public static java.util.List<java.lang.String> getGroupsForUser(java.lang.String acctId,
                                                                java.lang.String userId)
                                                         throws DBException
Throws:
DBException

getGroupsForUser

public static java.util.List<java.lang.String> getGroupsForUser(java.lang.String acctId,
                                                                java.lang.String userId,
                                                                long limit)
                                                         throws DBException
Throws:
DBException

getDeviceGroups

public java.util.List<java.lang.String> getDeviceGroups(boolean refresh)
                                                 throws DBException
Throws:
DBException

isDeviceGroupAll

public boolean isDeviceGroupAll()
                         throws DBException
Throws:
DBException

setDeviceGroups

public boolean setDeviceGroups(java.lang.String[] groupList)

setDeviceGroups

public boolean setDeviceGroups(java.util.List<java.lang.String> groupList)

_setDeviceGroups

protected boolean _setDeviceGroups(java.util.Iterator<java.lang.String> groupListIter)

addDeviceGroup

public void addDeviceGroup(java.lang.String groupID)
                    throws DBException
Throws:
DBException

removeDeviceGroup

public void removeDeviceGroup(java.lang.String groupID)
                       throws DBException
Throws:
DBException

getAuthorizedDeviceIDs

public static OrderedSet<java.lang.String> getAuthorizedDeviceIDs(User user,
                                                                  Account account,
                                                                  boolean inclInactv)
                                                           throws DBException
Throws:
DBException

getAuthorizedDeviceIDs

public static OrderedSet<java.lang.String> getAuthorizedDeviceIDs(User user,
                                                                  java.lang.String accountID,
                                                                  boolean inclInactv)
                                                           throws DBException
Throws:
DBException

getAuthorizedDeviceIDs

protected OrderedSet<java.lang.String> getAuthorizedDeviceIDs(boolean inclInactv)
                                                       throws DBException
Throws:
DBException

isAuthorizedDevice

public boolean isAuthorizedDevice(java.lang.String deviceID)
                           throws DBException
Throws:
DBException

getDefaultDeviceID

public java.lang.String getDefaultDeviceID(boolean inclInactv)
                                    throws DBException
Throws:
DBException

getAclsForUser

public java.lang.String[] getAclsForUser()
                                  throws DBException
Throws:
DBException

toString

public java.lang.String toString()
Description copied from class: DBRecord
Returns a String representation of the DBRecordKey for this DBRecord

Overrides:
toString in class DBRecord<User>
Returns:
A String representation of the DBRecordKey for this DBRecord

exists

public static boolean exists(java.lang.String acctID,
                             java.lang.String userID)
                      throws DBException
Throws:
DBException

getUser

public static User getUser(Account account,
                           java.lang.String userID)
                    throws DBException
Throws:
DBException

getUser

public static User getUser(Account account,
                           java.lang.String userId,
                           boolean create)
                    throws DBException
Throws:
DBException

createNewUser

public static User createNewUser(Account account,
                                 java.lang.String userID,
                                 java.lang.String contactEmail,
                                 java.lang.String passwd)
                          throws DBException
Throws:
DBException

getUsersForAccount

public static java.lang.String[] getUsersForAccount(java.lang.String acctId)
                                             throws DBException
Throws:
DBException

getUsersForAccount

public static java.lang.String[] getUsersForAccount(java.lang.String acctId,
                                                    int userType)
                                             throws DBException
Throws:
DBException

getUserIDs

public static java.lang.String[] getUserIDs(DBSelect<User> dsel)
                                     throws DBException
Throws:
DBException

getUserForContactEmail

public static User getUserForContactEmail(java.lang.String acctId,
                                          java.lang.String emailAddr)
                                   throws DBException
Throws:
DBException

getUsersForContactEmail

public static java.util.List<User> getUsersForContactEmail(java.lang.String acctId,
                                                           java.lang.String emailAddr)
                                                    throws DBException
Throws:
DBException

_getUsersForRoleSelect

protected static DBSelect<User> _getUsersForRoleSelect(java.lang.String acctID,
                                                       java.lang.String roleID,
                                                       long limit)

hasUserIDsForRole

public static boolean hasUserIDsForRole(java.lang.String acctID,
                                        java.lang.String roleID)
                                 throws DBException
Throws:
DBException

getUserIDsForRole

public static java.util.List<java.lang.String> getUserIDsForRole(java.lang.String acctID,
                                                                 java.lang.String roleID)
                                                          throws DBException
Throws:
DBException

countUserIDsForRole

public static long countUserIDsForRole(java.lang.String acctID,
                                       java.lang.String roleID)
                                throws DBException
Throws:
DBException

getUserIDsForRole

public static java.util.List<java.lang.String> getUserIDsForRole(java.lang.String acctID,
                                                                 java.lang.String roleID,
                                                                 long limit)
                                                          throws DBException
Throws:
DBException

main

public static void main(java.lang.String[] args)