info.magnolia.cms.core
Class AggregationState

java.lang.Object
  extended by info.magnolia.cms.core.AggregationState

public class AggregationState
extends java.lang.Object

Aggregates the necessary information to render content. Filled-in progressively by various filters.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Constructor Summary
AggregationState()
           
 
Method Summary
 java.lang.String getCharacterEncoding()
           
 Content getCurrentContent()
           
 java.lang.String getCurrentURI()
          Returns the URI of the current request, decoded and without the context path.
 java.lang.String getExtension()
           
 File getFile()
           
 java.lang.String getHandle()
           
 java.util.Locale getLocale()
          If the aggregation state local is not set explicitly the contexts locale is returned.
 Content getMainContent()
           
 java.lang.String getOriginalBrowserURI()
           
 java.lang.String getOriginalBrowserURL()
           
 java.lang.String getOriginalURI()
          Returns the original request URI, decoded and without the context path.
 java.lang.String getOriginalURL()
           
 java.lang.String getRepository()
           
 java.lang.String getSelector()
          Warning - this might change in the future - see MAGNOLIA-2343 for details.
 java.lang.String getTemplateName()
           
 boolean isPreviewMode()
           
 void resetURIs()
          The original URI/URL can only be set once.
 void setCharacterEncoding(java.lang.String characterEncoding)
           
 void setCurrentContent(Content currentContent)
           
 void setCurrentURI(java.lang.String currentURI)
           
 void setExtension(java.lang.String extension)
           
 void setFile(File file)
           
 void setHandle(java.lang.String handle)
           
 void setLocale(java.util.Locale locale)
           
 void setMainContent(Content mainContent)
           
 void setOriginalBrowserURI(java.lang.String originalBrowserURI)
           
 void setOriginalBrowserURL(java.lang.String originalBrowserURL)
           
 void setOriginalURI(java.lang.String originalURI)
           
 void setOriginalURL(java.lang.String originalURL)
           
 void setPreviewMode(boolean previewMode)
           
 void setRepository(java.lang.String repository)
           
 void setSelector(java.lang.String selector)
          Warning - this might change in the future - see MAGNOLIA-2343 for details. The provided selector value is decoded upon settings according to rules described in URLDecoder.decode(java.lang.String, java.lang.String)
 void setTemplateName(java.lang.String templateName)
           
protected  java.lang.String stripContextPathIfExists(java.lang.String uri)
          WARNING: If passing URI without context path but it starts with same text as the context path it will be stripped off as well!!!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationState

public AggregationState()
Method Detail

setOriginalURI

public void setOriginalURI(java.lang.String originalURI)

setOriginalBrowserURI

public void setOriginalBrowserURI(java.lang.String originalBrowserURI)

setCurrentURI

public void setCurrentURI(java.lang.String currentURI)

getCurrentURI

public java.lang.String getCurrentURI()
Returns the URI of the current request, decoded and without the context path. This URI might have been modified by various filters.


getCharacterEncoding

public java.lang.String getCharacterEncoding()

getOriginalURI

public java.lang.String getOriginalURI()
Returns the original request URI, decoded and without the context path. Can never be modified.


getOriginalURL

public java.lang.String getOriginalURL()

setOriginalURL

public void setOriginalURL(java.lang.String originalURL)

getOriginalBrowserURI

public java.lang.String getOriginalBrowserURI()

getOriginalBrowserURL

public java.lang.String getOriginalBrowserURL()

setOriginalBrowserURL

public void setOriginalBrowserURL(java.lang.String originalBrowserURL)

setCharacterEncoding

public void setCharacterEncoding(java.lang.String characterEncoding)

getExtension

public java.lang.String getExtension()

setExtension

public void setExtension(java.lang.String extension)

getFile

public File getFile()

setFile

public void setFile(File file)

getHandle

public java.lang.String getHandle()

setHandle

public void setHandle(java.lang.String handle)

getMainContent

public Content getMainContent()

setMainContent

public void setMainContent(Content mainContent)

getCurrentContent

public Content getCurrentContent()

setCurrentContent

public void setCurrentContent(Content currentContent)

getRepository

public java.lang.String getRepository()

setRepository

public void setRepository(java.lang.String repository)

getSelector

public java.lang.String getSelector()
Warning - this might change in the future - see MAGNOLIA-2343 for details.


setSelector

public void setSelector(java.lang.String selector)
Warning - this might change in the future - see MAGNOLIA-2343 for details. The provided selector value is decoded upon settings according to rules described in URLDecoder.decode(java.lang.String, java.lang.String)


getTemplateName

public java.lang.String getTemplateName()

setTemplateName

public void setTemplateName(java.lang.String templateName)

getLocale

public java.util.Locale getLocale()
If the aggregation state local is not set explicitly the contexts locale is returned.

Returns:
The aggregation state level locale, i.e. the locale that should be used for contents

setLocale

public void setLocale(java.util.Locale locale)
Parameters:
locale - The aggregation state level locale, i.e. the locale that should be used for contents

isPreviewMode

public boolean isPreviewMode()

setPreviewMode

public void setPreviewMode(boolean previewMode)

stripContextPathIfExists

protected java.lang.String stripContextPathIfExists(java.lang.String uri)
WARNING: If passing URI without context path but it starts with same text as the context path it will be stripped off as well!!!

Parameters:
uri - with contextPath (maybe)
Returns:
uri stripped of the prefix matching the contextPath

resetURIs

public void resetURIs()
The original URI/URL can only be set once. A call to this methods resets the original URI/URL and allows to set them freshly.



Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.