public class AppUser extends DataObject implements java.security.Principal, Owned
AppUserNameFinder objects.| Modifier and Type | Field and Description |
|---|---|
static Feature |
PERSON_HISTORY_FEATURE |
static java.lang.String |
UPDATED_TIME |
DEBUG, recordMAX_IDENTIFIER| Constructor and Description |
|---|
AppUser(AppUserFactory factory,
Repository.Record res) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIndexTable(Table tab)
|
boolean |
allowEmail() |
boolean |
canLogin()
Is this user allowed to login applications should override this method to
implement the necessary logic for this.
|
boolean |
canReregister()
Return true if the account is not permitted to login but a forgotten password
request will re-register the user.
|
boolean |
checkStateRole(java.lang.String role) |
java.lang.String |
getEmail()
get the Email address for this AppUser if known.
|
AppUserFactory |
getFactory() |
java.lang.String |
getIdentifier(int max_length)
Generate Identifier with advisory max length.
|
java.util.Date |
getLastTimeDetailsUpdated() |
java.lang.String |
getLogName()
return name and SU identity if it exists.
|
java.lang.String |
getName()
get the presentation name of the user
By default this looks for a
Composite that implements NameComposite
then falls back to the default realm name. |
java.lang.String |
getRealmName(java.lang.String realm) |
java.lang.String |
getSortName()
Version of getName where the String sort order matches the
presentation order.
|
void |
historyTerminate() |
void |
historyUpdate() |
void |
markDetailsUpdated() |
java.util.Date |
nextRequiredUpdate()
Get the next date that personal details are required to be updated
|
<X> void |
notifyChange(java.lang.String field,
java.lang.String extra,
X prev,
X curr)
Extension point for when updates to person state may need to be
notified to external parties.
|
protected void |
post_commit(boolean changed)
Extension point called at end of commit
|
protected void |
pre_commit(boolean dirty)
Extension point called at start of commit.
|
void |
reRegister()
Re-register a retired account
|
void |
setEmail(java.lang.String email)
change email address and commit change.
|
void |
setEmailsAllowed(boolean value) |
void |
setRealmName(java.lang.String realm,
java.lang.String name) |
boolean |
warnRequiredUpdate() |
addToMap, addToMap, addToMap, commit, delete, empty, equals, formUpdate, getContext, getDatabaseService, getFactoryTag, getID, getIdentifier, getLogger, getMap, getMap, getOwningFactory, getRecord, getRecord, getRecord, getSQLContext, getUniqueIdName, hashCode, isLocked, lock, postCreate, release, setContents, setDirty, setMap, toStringpublic static final java.lang.String UPDATED_TIME
public static final Feature PERSON_HISTORY_FEATURE
public AppUser(AppUserFactory factory, Repository.Record res)
public AppUserFactory getFactory()
getFactory in interface Ownedpublic boolean canLogin()
AppUserFactory.getCanLoginFilter(),
canReregister()public boolean canReregister()
public void reRegister()
public java.lang.String getRealmName(java.lang.String realm)
public java.lang.String getEmail()
public boolean allowEmail()
public void setEmailsAllowed(boolean value)
public java.lang.String getIdentifier(int max_length)
IdentifiedgetIdentifier in interface IdentifiedgetIdentifier in class DataObjectmax_length - advisory max lengthpublic java.lang.String getName()
Composite that implements NameComposite
then falls back to the default realm name.
This method can also be overridden to directly generate a more friendly presentation namegetName in interface java.security.Principalpublic final java.lang.String getSortName()
public void setRealmName(java.lang.String realm,
java.lang.String name)
public void setEmail(java.lang.String email)
throws DataFault
email - DataFaultpublic java.util.Date getLastTimeDetailsUpdated()
public java.util.Date nextRequiredUpdate()
public boolean warnRequiredUpdate()
public void markDetailsUpdated()
protected void pre_commit(boolean dirty)
throws DataFault
DataObjectpre_commit in class DataObjectdirty - is record known to be modified.DataFaultprotected void post_commit(boolean changed)
throws DataFault
DataObjectpost_commit in class DataObjectchanged - record was changed by commit.DataFaultpublic java.lang.String getLogName()
req - Request objectpublic boolean checkStateRole(java.lang.String role)
role - public <X> void notifyChange(java.lang.String field,
java.lang.String extra,
X prev,
X curr)
X - value typefield - type of updateextra - text of updateprev - previous valuecurr - relacement valuepublic void historyUpdate()
public void historyTerminate()
public void addIndexTable(Table tab)
tab - AppUserFactory.getPersonTable(SessionService, uk.ac.ed.epcc.webapp.jdbc.filter.BaseFilter)