imcode.server
Class DefaultImcmsServices

java.lang.Object
  extended by imcode.server.DefaultImcmsServices
All Implemented Interfaces:
ImcmsServices

public final class DefaultImcmsServices
extends java.lang.Object
implements ImcmsServices


Constructor Summary
DefaultImcmsServices(org.springframework.web.context.WebApplicationContext webApplicationContext, com.imcode.db.Database database, java.util.Properties props, LocalizedMessageProvider localizedMessageProvider, CachingFileLoader fileLoader, DefaultProcedureExecutor procedureExecutor)
          Contructs an DefaultImcmsServices object.
 
Method Summary
 java.lang.String getAdminTemplate(java.lang.String adminTemplateName, UserDomainObject user, java.util.List tagsWithReplacements)
          Parse doc replace variables with data , use template
 java.lang.String[][] getAllDocumentTypes(java.lang.String langPrefixStr)
          Returns an array with with all the documenttypes stored in the database the array consists of pairs of id:, value.
 CategoryMapper getCategoryMapper()
           
 Config getConfig()
           
 com.imcode.db.Database getDatabase()
           
 java.text.Collator getDefaultLanguageCollator()
           
 int getDocType(int meta_id)
          get doctype
 DocumentMapper getDocumentMapper()
           
 CachingFileLoader getFileCache()
           
 ImcmsAuthenticatorAndUserAndRoleMapper getImcmsAuthenticatorAndUserAndRoleMapper()
           
 java.io.File getIncludePath()
           
 java.security.KeyStore getKeyStore()
           
 LanguageMapper getLanguageMapper()
           
 LocalizedMessageProvider getLocalizedMessageProvider()
           
 ProcedureExecutor getProcedureExecutor()
           
 java.io.File getRealContextPath()
           
 RoleGetter getRoleGetter()
           
 int getSessionCounter()
           
 java.util.Date getSessionCounterDate()
          Get session counter date.
 java.lang.String getSessionCounterDateAsString()
           
 SMTP getSMTP()
           
 java.lang.Object getSpringBean(java.lang.String beanName)
           
 SystemData getSystemData()
           
 java.lang.String getTemplateFromDirectory(java.lang.String adminTemplateName, UserDomainObject user, java.util.List variables, java.lang.String directory)
          Parse doc replace variables with data , use template
 TemplateMapper getTemplateMapper()
           
 org.apache.velocity.VelocityContext getVelocityContext(UserDomainObject user)
           
 org.apache.velocity.app.VelocityEngine getVelocityEngine(UserDomainObject user)
           
 org.springframework.web.context.WebApplicationContext getWebApplicationContext()
          Spring framework integration.
 void incrementSessionCounter()
           
 void parsePage(ParserParameters paramsToParse, java.io.Writer writer)
           
 void setSessionCounter(int value)
          Set session counter.
 void setSessionCounterDate(java.util.Date date)
          Set session counter date.
 void setSystemData(SystemData sd)
           
 void updateMainLog(java.lang.String event)
           
 UserDomainObject verifyUser(java.lang.String login, java.lang.String password)
          Verify a Internet/Intranet user.
 UserDomainObject verifyUserByIpOrDefault(java.lang.String remoteAddr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultImcmsServices

public DefaultImcmsServices(org.springframework.web.context.WebApplicationContext webApplicationContext,
                            com.imcode.db.Database database,
                            java.util.Properties props,
                            LocalizedMessageProvider localizedMessageProvider,
                            CachingFileLoader fileLoader,
                            DefaultProcedureExecutor procedureExecutor)
Contructs an DefaultImcmsServices object.

Method Detail

getSessionCounter

public int getSessionCounter()
Specified by:
getSessionCounter in interface ImcmsServices

getSessionCounterDateAsString

public java.lang.String getSessionCounterDateAsString()
Specified by:
getSessionCounterDateAsString in interface ImcmsServices

verifyUserByIpOrDefault

public UserDomainObject verifyUserByIpOrDefault(java.lang.String remoteAddr)
Specified by:
verifyUserByIpOrDefault in interface ImcmsServices

getLocalizedMessageProvider

public LocalizedMessageProvider getLocalizedMessageProvider()
Specified by:
getLocalizedMessageProvider in interface ImcmsServices

verifyUser

public UserDomainObject verifyUser(java.lang.String login,
                                   java.lang.String password)
Description copied from interface: ImcmsServices
Verify a Internet/Intranet user. Data from any SQL Database.

Specified by:
verifyUser in interface ImcmsServices

incrementSessionCounter

public void incrementSessionCounter()
Specified by:
incrementSessionCounter in interface ImcmsServices

parsePage

public void parsePage(ParserParameters paramsToParse,
                      java.io.Writer writer)
               throws java.io.IOException
Specified by:
parsePage in interface ImcmsServices
Throws:
java.io.IOException

updateMainLog

public void updateMainLog(java.lang.String event)
Specified by:
updateMainLog in interface ImcmsServices

getDocumentMapper

public DocumentMapper getDocumentMapper()
Specified by:
getDocumentMapper in interface ImcmsServices

getTemplateMapper

public TemplateMapper getTemplateMapper()
Specified by:
getTemplateMapper in interface ImcmsServices

getSMTP

public SMTP getSMTP()
Specified by:
getSMTP in interface ImcmsServices

getImcmsAuthenticatorAndUserAndRoleMapper

public ImcmsAuthenticatorAndUserAndRoleMapper getImcmsAuthenticatorAndUserAndRoleMapper()
Specified by:
getImcmsAuthenticatorAndUserAndRoleMapper in interface ImcmsServices

getAdminTemplate

public java.lang.String getAdminTemplate(java.lang.String adminTemplateName,
                                         UserDomainObject user,
                                         java.util.List tagsWithReplacements)
Parse doc replace variables with data , use template

Specified by:
getAdminTemplate in interface ImcmsServices

getTemplateFromDirectory

public java.lang.String getTemplateFromDirectory(java.lang.String adminTemplateName,
                                                 UserDomainObject user,
                                                 java.util.List variables,
                                                 java.lang.String directory)
Parse doc replace variables with data , use template

Specified by:
getTemplateFromDirectory in interface ImcmsServices

getVelocityEngine

public org.apache.velocity.app.VelocityEngine getVelocityEngine(UserDomainObject user)
Specified by:
getVelocityEngine in interface ImcmsServices

getVelocityContext

public org.apache.velocity.VelocityContext getVelocityContext(UserDomainObject user)
Specified by:
getVelocityContext in interface ImcmsServices

getConfig

public Config getConfig()
Specified by:
getConfig in interface ImcmsServices

getRealContextPath

public java.io.File getRealContextPath()

getKeyStore

public java.security.KeyStore getKeyStore()
Specified by:
getKeyStore in interface ImcmsServices

setSessionCounter

public void setSessionCounter(int value)
Set session counter.

Specified by:
setSessionCounter in interface ImcmsServices

setSessionCounterDate

public void setSessionCounterDate(java.util.Date date)
Set session counter date.

Specified by:
setSessionCounterDate in interface ImcmsServices

getSessionCounterDate

public java.util.Date getSessionCounterDate()
Get session counter date.

Specified by:
getSessionCounterDate in interface ImcmsServices

getDocType

public int getDocType(int meta_id)
get doctype

Specified by:
getDocType in interface ImcmsServices

getSystemData

public SystemData getSystemData()
Specified by:
getSystemData in interface ImcmsServices

setSystemData

public void setSystemData(SystemData sd)
Specified by:
setSystemData in interface ImcmsServices

getAllDocumentTypes

public java.lang.String[][] getAllDocumentTypes(java.lang.String langPrefixStr)
Returns an array with with all the documenttypes stored in the database the array consists of pairs of id:, value. Suitable for parsing into select boxes etc.

Specified by:
getAllDocumentTypes in interface ImcmsServices

getIncludePath

public java.io.File getIncludePath()
Specified by:
getIncludePath in interface ImcmsServices

getDefaultLanguageCollator

public java.text.Collator getDefaultLanguageCollator()
Specified by:
getDefaultLanguageCollator in interface ImcmsServices

getDatabase

public com.imcode.db.Database getDatabase()
Specified by:
getDatabase in interface ImcmsServices

getCategoryMapper

public CategoryMapper getCategoryMapper()
Specified by:
getCategoryMapper in interface ImcmsServices

getLanguageMapper

public LanguageMapper getLanguageMapper()
Specified by:
getLanguageMapper in interface ImcmsServices

getFileCache

public CachingFileLoader getFileCache()
Specified by:
getFileCache in interface ImcmsServices

getRoleGetter

public RoleGetter getRoleGetter()
Specified by:
getRoleGetter in interface ImcmsServices

getProcedureExecutor

public ProcedureExecutor getProcedureExecutor()
Specified by:
getProcedureExecutor in interface ImcmsServices

getWebApplicationContext

public org.springframework.web.context.WebApplicationContext getWebApplicationContext()
Description copied from interface: ImcmsServices
Spring framework integration. Latter this will be refactored out.

Specified by:
getWebApplicationContext in interface ImcmsServices

getSpringBean

public java.lang.Object getSpringBean(java.lang.String beanName)
Specified by:
getSpringBean in interface ImcmsServices