com.mizar.faces.javax.application
Class ApplicationConstants

java.lang.Object
  extended by com.mizar.faces.javax.application.ApplicationConstants

public class ApplicationConstants
extends java.lang.Object

A collection of Application scoped constants most often set in the faces-config.xml file.


Field Summary
protected  org.apache.commons.logging.Log _Logger
           
 
Constructor Summary
ApplicationConstants()
           
 
Method Summary
 void addSession(java.lang.String sessionId, User user)
           
 int checkSequences()
           
 long getActiveSessions()
           
 java.lang.String getBannerHeadline()
           
 java.lang.Boolean getBannerHeadlineExists()
           
 java.lang.Boolean getCheckSequences()
           
 java.lang.String getContextRoot()
           
static ApplicationConstants getCurrentInstance()
           
 java.util.HashMap<java.lang.String,java.lang.String> getEventHandlerNames()
          This method is called by getEventHandlers on first reference to populate the eventHandlers HashMap.
 java.util.HashMap<java.lang.String,AjaxHandler> getEventHandlers()
           
 java.lang.String getHomePageHeadline()
           
 java.lang.Boolean getHomePageHeadlineExists()
           
 java.lang.String getHtmlNoteFolder()
           
 java.lang.String getLegalStatement()
           
 java.lang.String getMailOutServer()
           
 java.lang.String getMailOutServerPort()
           
 java.lang.String getMailSender()
           
 java.lang.String getMailSenderName()
           
 java.lang.String getMailSenderPassword()
           
 java.lang.String getMapViewerDataSource()
           
 java.lang.String getMapviewerUrl()
           
 long getMaxSessions()
           
 java.util.List<java.util.Map.Entry<java.lang.String,User>> getSessionList()
           
 java.util.HashMap<java.lang.String,User> getSessions()
           
 java.util.ArrayList<java.lang.String> getSkinFamilies()
           uses a member of this list to define the current skin family.
 java.util.Date getStartDate()
           
 java.lang.String getSystemUser()
           
 java.lang.Boolean getUseMdsysTables()
           
 java.lang.String getUserAdminEmail()
           
 boolean isRecordLoginAttempts()
           
 boolean isTrace()
          This is not used as much as it should be.
 boolean isUseEmailasUserName()
           
 void removeSession(java.lang.String sessionId)
           
 void setBannerHeadline(java.lang.String bannerHeadline)
          The bannerHeadline can be optionally placed on each page to provide short notices to userList.
 void setCheckSequences(java.lang.Boolean checkSequences)
           
 void setEventHandlerNames(java.util.HashMap<java.lang.String,java.lang.String> eventHandlers)
           
 void setHomePageHeadline(java.lang.String homePageHeadline)
          The homePageHeadline can be optionally displayed on the Home Page to provide notices to userList.
 void setHtmlNoteFolder(java.lang.String newhtmlNoteFolder)
          Defaults to /htmlNotes
 void setLegalStatement(java.lang.String legalStatement)
           
 void setMailOutServer(java.lang.String mailOutServer)
           
 void setMailOutServerPort(java.lang.String mailOutServerPort)
           
 void setMailSender(java.lang.String mailSender)
           
 void setMailSenderName(java.lang.String mailSenderName)
           
 void setMailSenderPassword(java.lang.String mailSenderPassword)
           
 void setMapViewerDataSource(java.lang.String mapViewerDataSource)
           
 void setMapviewerUrl(java.lang.String mapviewerUrl)
           
 void setMaxSessions(long maxSessions)
          Defaults to Long.MAX_VALUE;
 void setRecordLoginAttempts(boolean recordLoginAttempts)
           
 void setSkinFamilies(java.util.ArrayList<java.lang.String> skinFamilies)
           
 void setTrace(boolean debug)
           
 void setUseEmailasUserName(boolean useEmailasUserName)
           
 void setUseMdsysTables(java.lang.Boolean useMdsysTables)
           
 void setUserAdminEmail(java.lang.String userAdminEmail)
           
static boolean traceIsTrue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_Logger

protected org.apache.commons.logging.Log _Logger
Constructor Detail

ApplicationConstants

public ApplicationConstants()
Method Detail

getCurrentInstance

public static ApplicationConstants getCurrentInstance()

checkSequences

public int checkSequences()

setHtmlNoteFolder

public void setHtmlNoteFolder(java.lang.String newhtmlNoteFolder)
Defaults to /htmlNotes

Parameters:
newhtmlNoteFolder -

getHtmlNoteFolder

public java.lang.String getHtmlNoteFolder()
Returns:
the folder where htmlNotes are found. Used by ADFUtils.launchHtmlNoteDialog(String, String, UIComponent) in the MizarADFRichFaces project. This technique is likely obsolete in the RichFaces environment as we have better ways of launching dialog boxes from Javascript.

getStartDate

public java.util.Date getStartDate()
Returns:
the Date the application was started

setMailOutServer

public void setMailOutServer(java.lang.String mailOutServer)
Parameters:
mailOutServer - the outgoing mailserver; set in faces-config.xml

getMailOutServer

public java.lang.String getMailOutServer()
Returns:
the outgoing mail server

setMailOutServerPort

public void setMailOutServerPort(java.lang.String mailOutServerPort)
Parameters:
mailOutServerPort - the outgoing mail server port; defaults to 25 may be overridden in faces-config.xml

getMailOutServerPort

public java.lang.String getMailOutServerPort()
Returns:
the outgoing mail server port

setMailSender

public void setMailSender(java.lang.String mailSender)
Parameters:
mailSender - the mail fromEmail address; set in faces-config.xml

getMailSender

public java.lang.String getMailSender()
Returns:
the fromEmail address associated with automatically generated mail

setMailSenderPassword

public void setMailSenderPassword(java.lang.String mailSenderPassword)
Parameters:
mailSenderPassword - password of the mail fromEmail

getMailSenderPassword

public java.lang.String getMailSenderPassword()

setMailSenderName

public void setMailSenderName(java.lang.String mailSenderName)
Parameters:
mailSenderName - the personal name to associate with mailSender

getMailSenderName

public java.lang.String getMailSenderName()
Returns:
the personal name, a single blank if not defined.

setMaxSessions

public void setMaxSessions(long maxSessions)
Defaults to Long.MAX_VALUE;

Parameters:
maxSessions - a maximum number of sessions to allow before refusing logons or guest entries; set in faces-config.xml

getMaxSessions

public long getMaxSessions()
Returns:
the maximum number of sessions to allow before refusing logons or guest entries

setHomePageHeadline

public void setHomePageHeadline(java.lang.String homePageHeadline)
The homePageHeadline can be optionally displayed on the Home Page to provide notices to userList. It might be several lines long.

Parameters:
homePageHeadline - HTML or plain text

getHomePageHeadline

public java.lang.String getHomePageHeadline()
Returns:
the Home Page Headline

getHomePageHeadlineExists

public java.lang.Boolean getHomePageHeadlineExists()

setBannerHeadline

public void setBannerHeadline(java.lang.String bannerHeadline)
The bannerHeadline can be optionally placed on each page to provide short notices to userList. It should be a single line.

Parameters:
bannerHeadline - HTML or plain text

getBannerHeadline

public java.lang.String getBannerHeadline()
Returns:
the Banner Headline

getBannerHeadlineExists

public java.lang.Boolean getBannerHeadlineExists()

setSkinFamilies

public void setSkinFamilies(java.util.ArrayList<java.lang.String> skinFamilies)
Parameters:
skinFamilies - a List of allowable skins

getSkinFamilies

public java.util.ArrayList<java.lang.String> getSkinFamilies()
uses a member of this list to define the current skin family.

Returns:
a List of allowable skins
See Also:
com.mizar.javax.faces.session.SessionConstants#getSkinFamily()

getActiveSessions

public long getActiveSessions()

addSession

public void addSession(java.lang.String sessionId,
                       User user)

removeSession

public void removeSession(java.lang.String sessionId)

getSessionList

public java.util.List<java.util.Map.Entry<java.lang.String,User>> getSessionList()

getSessions

public java.util.HashMap<java.lang.String,User> getSessions()

setTrace

public void setTrace(boolean debug)
Parameters:
debug -

isTrace

public boolean isTrace()
This is not used as much as it should be. It is designed to facilitate debugging.

Returns:
the current trace status.

traceIsTrue

public static boolean traceIsTrue()
Returns:
ApplicationConstants.getCurrentInstance().isTrace()

setRecordLoginAttempts

public void setRecordLoginAttempts(boolean recordLoginAttempts)
Parameters:
recordLoginAttempts - set in faces-config.xml

isRecordLoginAttempts

public boolean isRecordLoginAttempts()
Returns:
true if logins are being recorded in the database

setEventHandlerNames

public void setEventHandlerNames(java.util.HashMap<java.lang.String,java.lang.String> eventHandlers)
Parameters:
eventHandlers - set by a faces-config.xml Example:
   <managed-property>
     <property-name>eventHandlerNames</property-name>
     <map-entries>
       <key-class>java.lang.String</key-class>
       <value-class>java.lang.String</value-class>
       <map-entry><key>AddToParcelTable</key><value>us.cuyahogacounty.cegisportal.callback.ParcelQuickPickHandler</value></map-entry>
       <map-entry><key>SearchArea</key><value>com.mizar.ajax.servlet.SearchAreaHandler</value></map-entry>
     </map-entries>
   </managed-property>
 

getEventHandlerNames

public java.util.HashMap<java.lang.String,java.lang.String> getEventHandlerNames()
This method is called by getEventHandlers on first reference to populate the eventHandlers HashMap.

Returns:
a HashMap of request-keys and fully qualified handler class names

getEventHandlers

public java.util.HashMap<java.lang.String,AjaxHandler> getEventHandlers()
Returns:
the hash map of Ajax handlers registered in the faces-config.xml file
See Also:
com.mizar.ajax.AjaxPhaseListener

setUserAdminEmail

public void setUserAdminEmail(java.lang.String userAdminEmail)

getUserAdminEmail

public java.lang.String getUserAdminEmail()

getContextRoot

public java.lang.String getContextRoot()

setCheckSequences

public void setCheckSequences(java.lang.Boolean checkSequences)

getCheckSequences

public java.lang.Boolean getCheckSequences()

setLegalStatement

public void setLegalStatement(java.lang.String legalStatement)

getLegalStatement

public java.lang.String getLegalStatement()

setMapviewerUrl

public void setMapviewerUrl(java.lang.String mapviewerUrl)

getMapviewerUrl

public java.lang.String getMapviewerUrl()

setMapViewerDataSource

public void setMapViewerDataSource(java.lang.String mapViewerDataSource)

getMapViewerDataSource

public java.lang.String getMapViewerDataSource()

setUseMdsysTables

public void setUseMdsysTables(java.lang.Boolean useMdsysTables)

getUseMdsysTables

public java.lang.Boolean getUseMdsysTables()

getSystemUser

public java.lang.String getSystemUser()

setUseEmailasUserName

public void setUseEmailasUserName(boolean useEmailasUserName)

isUseEmailasUserName

public boolean isUseEmailasUserName()