org.benow.web.security
Class InvitationModule

java.lang.Object
  extended by org.benow.security.SecureObject
      extended by org.benow.repository.util.PersistentObjectImpl
          extended by org.benow.repository.mapping.JSQLObject
              extended by org.benow.repository.security.UserModuleImpl
                  extended by org.benow.web.security.InvitationModule
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, org.benow.java.config.Configurable, org.benow.repository.util.PersistentObject, org.benow.security.user.UserModule

public class InvitationModule
extends org.benow.repository.security.UserModuleImpl

Tracks invitation information.

Author:
andy
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.benow.repository.mapping.JSQLObject
org.benow.repository.mapping.JSQLObject.XSQLVersionDesc, org.benow.repository.mapping.JSQLObject.XSQLVersioned
 
Field Summary
static org.benow.java.config.entry.BooleanConfigurationEntry CFG_INVITATIONS_ENABLED
           
 boolean enabled
           
static int INVITATIONS_UNLIMITED
           
static boolean invitationsEnabled
           
 
Fields inherited from class org.benow.repository.security.UserModuleImpl
log, user
 
Fields inherited from class org.benow.repository.util.PersistentObjectImpl
conn, recycled
 
Fields inherited from class org.benow.security.SecureObject
admin
 
Fields inherited from interface org.benow.repository.util.PersistentObject
FIELD_NAME_KEY
 
Constructor Summary
protected InvitationModule()
           
  InvitationModule(org.benow.security.user.User user)
           
 
Method Summary
 java.util.Date getInvitationDate()
           
 org.benow.security.user.User getInviter()
           
 java.lang.String getInviteURI()
           
 int getRemainingInvitations()
          Gets the remaining number of invitations this user can make.
 java.util.Date lastInvitationDate()
           
 void onInvite(org.benow.security.user.User user)
           
 void onInvitedJoin(org.benow.security.user.User user)
           
 void setInvited()
           
 void setInviteURI(java.lang.String uri)
           
 boolean wasInvited()
           
 
Methods inherited from class org.benow.repository.security.UserModuleImpl
allowDuringConfiguration, getClassDisplayName, getConfigURI, getDisplayName, getOwner, getPosition, getUser, getXMLNodeName, isComplete, setOwner
 
Methods inherited from class org.benow.repository.mapping.JSQLObject
fetchExpectedField, fetchField, fetchFieldQuiet, forgetField, isFetched, isLocked, lock, refetchFieldQuiet, setFetched
 
Methods inherited from class org.benow.repository.util.PersistentObjectImpl
compareTo, doIsTransient, equals, getKey, isTransient, recycle, remove, remove, repositoryAfterLoad, repositoryAfterPersist, repositoryAfterTransient, repositoryBeforePersist, repositoryBeforeTransient, setKey, toString, update, update
 
Methods inherited from class org.benow.security.SecureObject
assertOnePermission, assertPermission, assertPermission, declarePermission, declareViewPermission, declareViewPermission
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INVITATIONS_UNLIMITED

public static final int INVITATIONS_UNLIMITED
See Also:
Constant Field Values

CFG_INVITATIONS_ENABLED

public static final org.benow.java.config.entry.BooleanConfigurationEntry CFG_INVITATIONS_ENABLED

invitationsEnabled

public static final boolean invitationsEnabled

enabled

public boolean enabled
Constructor Detail

InvitationModule

protected InvitationModule()

InvitationModule

public InvitationModule(org.benow.security.user.User user)
Method Detail

getInviter

public org.benow.security.user.User getInviter()
Returns:
the user who invited this user, if any

getRemainingInvitations

public int getRemainingInvitations()
Gets the remaining number of invitations this user can make.

getInvitationDate

public java.util.Date getInvitationDate()
Returns:
the date when this user was invited, or null if not invited.

lastInvitationDate

public java.util.Date lastInvitationDate()
Returns:
the last time an invitation was made.

onInvite

public void onInvite(org.benow.security.user.User user)

onInvitedJoin

public void onInvitedJoin(org.benow.security.user.User user)

wasInvited

public boolean wasInvited()
Returns:
true if this user was invited (via SecurityAdministrator.invite())
See Also:
SecurityAdministrator

setInvited

public void setInvited()

setInviteURI

public void setInviteURI(java.lang.String uri)

getInviteURI

public java.lang.String getInviteURI()