Package org.bedework.eventreg.bus
Class SessionManager
- java.lang.Object
-
- org.bedework.eventreg.bus.SessionManager
-
- All Implemented Interfaces:
org.bedework.util.logging.Logged
public class SessionManager extends Object implements org.bedework.util.logging.Logged
- Author:
- douglm
-
-
Constructor Summary
Constructors Constructor Description SessionManager()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn
-
-
-
-
Constructor Detail
-
SessionManager
public SessionManager() throws EventregException- Throws:
EventregException
-
-
Method Detail
-
getSysInfo
public EventregSvcMBean getSysInfo() throws EventregException
- Throws:
EventregException
-
getChangeManager
public ChangeManager getChangeManager()
- Returns:
- the change log manager
-
setEventregDb
public void setEventregDb(EventregDb db) throws Throwable
- Parameters:
db- - object to handle db transactions.- Throws:
Throwable
-
closeDb
public boolean closeDb()
- Returns:
- false if something failed on close - probably a commit error
-
queueRequest
public boolean queueRequest(EventregRequest request) throws Throwable
- Parameters:
request- to add to queue- Returns:
- true if queued
- Throws:
Throwable
-
setCurrentUser
public void setCurrentUser(String val)
- Parameters:
val-
-
getCurrentUser
public String getCurrentUser()
- Returns:
- current authenticated user
-
resetCurrentCalsuite
public void resetCurrentCalsuite()
-
setCurrentCalsuite
public void setCurrentCalsuite(String val)
- Parameters:
val- href
-
getCurrentCalsuite
public String getCurrentCalsuite()
- Returns:
- current authenticated user
-
getCurrentFormName
public String getCurrentFormName()
-
getAdminUser
public boolean getAdminUser() throws Throwable- Returns:
- true if current user is an administrator
- Throws:
Throwable
-
flushCurrEvent
public void flushCurrEvent()
-
getCurrEvent
public Event getCurrEvent() throws Throwable
Get the current event. If we haven't yet retrieved it we retrieve the event specified by the request href parameter.- Returns:
- event
- Throws:
Throwable
-
getCurrEmail
public String getCurrEmail() throws Throwable
Get the current email.- Returns:
- email addr
- Throws:
Throwable
-
getCurrEvent
public Event getCurrEvent(String href) throws Throwable
Get the current event. If we haven't yet retrieved it we retrieve the event specified by the href parameter.- Returns:
- event
- Throws:
Throwable
-
getChanges
public List<Change> getChanges(String ts) throws Throwable
- Parameters:
ts-- Returns:
- changes
- Throws:
Throwable
-
addRegistration
public void addRegistration(Registration r) throws Throwable
- Parameters:
r-- Throws:
Throwable
-
removeRegistration
public void removeRegistration(Registration reg) throws Throwable
- Parameters:
reg-- Throws:
Throwable
-
updateRegistration
public void updateRegistration(Registration reg) throws Throwable
- Parameters:
reg-- Throws:
Throwable
-
getRegistrationsByUser
public List<Registration> getRegistrationsByUser(String user) throws Throwable
- Parameters:
user-- Returns:
- list of registrations
- Throws:
Throwable
-
getRegistrationById
public Registration getRegistrationById(long id) throws Throwable
- Parameters:
id-- Returns:
- referenced registration
- Throws:
Throwable
-
getAllRegistrations
public List<Registration> getAllRegistrations() throws Throwable
- Returns:
- all the current registrations
- Throws:
Throwable
-
getWaiting
public List<Registration> getWaiting(String href) throws Throwable
- Parameters:
href-- Returns:
- all the current waiting registrations for the event
- Throws:
Throwable
-
getRegistrationsByHref
public List<Registration> getRegistrationsByHref(String href) throws Throwable
- Parameters:
href-- Returns:
- list of registrations
- Throws:
Throwable
-
getRegistration
public Registration getRegistration() throws Throwable
- Returns:
- registration or null
- Throws:
Throwable
-
getIsRegistered
public boolean getIsRegistered() throws Throwable- Returns:
- true if current user is registered for current event
- Throws:
Throwable
-
getIsWaiting
public boolean getIsWaiting() throws Throwable- Returns:
- true if current user is on waiting list for current event
- Throws:
Throwable
-
getRegistrationFull
public boolean getRegistrationFull()
- Returns:
- true if current registration is full
-
setRegistrationFull
public void setRegistrationFull(boolean val)
- Parameters:
val-
-
getRegistrantCount
public long getRegistrantCount() throws Throwable- Returns:
- count of registration entries
- Throws:
Throwable
-
getRegTicketCount
public long getRegTicketCount() throws Throwable- Returns:
- count of tickets allocated as "registered" or "hold"
- Throws:
Throwable
-
getWaitingTicketCount
public long getWaitingTicketCount() throws Throwable- Returns:
- count of tickets allocated as "waiting"
- Throws:
Throwable
-
getTicketCount
public long getTicketCount() throws Throwable- Returns:
- count of all tickets (registered, waiting, etc)
- Throws:
Throwable
-
getUserTicketCount
public long getUserTicketCount() throws Throwable- Returns:
- count of tickets allocated to user for event
- Throws:
Throwable
-
getDeadlinePassed
public boolean getDeadlinePassed()
- Returns:
- true if deadline passed
-
setDeadlinePassed
public void setDeadlinePassed(boolean val)
- Parameters:
val-
-
getMessage
public String getMessage()
- Returns:
- current message string
-
setMessage
public void setMessage(String message)
- Parameters:
message-
-
retrieveEvent
public Event retrieveEvent(String href) throws Throwable
- Parameters:
href- of event- Returns:
- event
- Throws:
Throwable
-
retrieveEvent
public Event retrieveEvent(Registration reg) throws Throwable
- Parameters:
reg-- Returns:
- event referenced by registration
- Throws:
Throwable
-
logout
public void logout()
-
getReq
public Request getReq()
- Returns:
- incoming request util object
-
getNextRegistrationId
public Long getNextRegistrationId() throws Throwable
- Returns:
- next id
- Throws:
Throwable
-
getLogger
public org.bedework.util.logging.BwLogger getLogger()
- Specified by:
getLoggerin interfaceorg.bedework.util.logging.Logged
-
-