pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.service.request
Class ServiceRequestImplConfig

java.lang.Object
  extended by org.torweg.pulse.configuration.Configuration
      extended by org.torweg.pulse.service.request.ServiceRequestImplConfig
All Implemented Interfaces:
java.io.Serializable

public class ServiceRequestImplConfig
extends Configuration

is the object implementation of the ServiceRequestImpl configuration.

Version:
$Revision: 1874 $
Author:
Thomas Weber
See Also:
Serialized Form

Nested Class Summary
static class ServiceRequestImplConfig.FileUploadConfig
          the file upload configuration.
static class ServiceRequestImplConfig.LocaleManagerConfiguration
          the configuration of the locale manager.
static class ServiceRequestImplConfig.SpiderConfiguration
          represents a spider configuration.
 
Constructor Summary
ServiceRequestImplConfig()
          default constructor.
 
Method Summary
 long getFileUploadMaxSize()
           
 java.io.File getFileUploadTempDir()
           
 long getIntelliCacheMaxAge()
          returns the maximum age for a dynamic page cached using IntelliCache to be considered for 304 Not Modified responses upon a stateless ServiceSession.
 LocaleManager getLocaleManager()
           
protected  ServiceRequestImplConfig.LocaleManagerConfiguration getLocalManagerConfiguration()
           
 ServiceRequest.SessionMode getSessionUseCookiesOnly()
          indicates whether the session shall be used with URL based session IDs and Cookies or with Cookies only.
 java.lang.String getSpiderName(ServiceRequest req)
          returns the name of the visiting spider or an empty string, if the request is not from a spider.
 boolean isSpider(javax.servlet.http.HttpServletRequest httpRequest)
          checks whether the given request is from a search engine spider.
 boolean isSpider(ServiceRequest request)
          checks whether the given request is from a search engine spider.
 
Methods inherited from class org.torweg.pulse.configuration.Configuration
getBundle, isBundleConfiguration, isModified, setBundle, setConfigFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceRequestImplConfig

public ServiceRequestImplConfig()
default constructor.

Method Detail

isSpider

public final boolean isSpider(ServiceRequest request)
checks whether the given request is from a search engine spider.

The search engine filter is used for this decision.

Parameters:
request - the current request
Returns:
true, if and only if, the user-agent contains one of the filter strings. Otherwise false.

isSpider

public final boolean isSpider(javax.servlet.http.HttpServletRequest httpRequest)
checks whether the given request is from a search engine spider.

The search engine filter is used for this decision.

Parameters:
httpRequest - the current request
Returns:
true, if and only if, the user-agent contains one of the filter strings. Otherwise false.

getSpiderName

public final java.lang.String getSpiderName(ServiceRequest req)
returns the name of the visiting spider or an empty string, if the request is not from a spider.

Parameters:
req - the current request
Returns:
the name of the visiting spider or an empty string, if the request is not from a spider

getSessionUseCookiesOnly

public final ServiceRequest.SessionMode getSessionUseCookiesOnly()
indicates whether the session shall be used with URL based session IDs and Cookies or with Cookies only.

Returns:
true, if only cookie based sessions are to be used

getLocaleManager

public final LocaleManager getLocaleManager()
Returns:
returns the locale manager.

getFileUploadMaxSize

public final long getFileUploadMaxSize()
Returns:
Returns the fileUploadMaxSize.

getFileUploadTempDir

public final java.io.File getFileUploadTempDir()
Returns:
Returns the fileUploadTempDir.

getIntelliCacheMaxAge

public final long getIntelliCacheMaxAge()
returns the maximum age for a dynamic page cached using IntelliCache to be considered for 304 Not Modified responses upon a stateless ServiceSession.

Returns:
the maximum age in milliseconds

getLocalManagerConfiguration

protected final ServiceRequestImplConfig.LocaleManagerConfiguration getLocalManagerConfiguration()
Returns:
the locale manager configureation