public class AggregationState extends Object
Constructor and Description |
---|
AggregationState() |
Modifier and Type | Method and Description |
---|---|
Channel |
getChannel() |
String |
getCharacterEncoding() |
javax.jcr.Node |
getCurrentContentNode() |
String |
getCurrentURI() |
String |
getExtension() |
File |
getFile() |
String |
getHandle() |
Locale |
getLocale()
If the aggregation state local is not set explicitly the contexts locale is returned.
|
javax.jcr.Node |
getMainContentNode() |
String |
getOriginalBrowserURI() |
String |
getOriginalBrowserURL() |
String |
getOriginalURI()
Returns the original request URI, decoded and without the context path.
|
String |
getOriginalURL() |
String |
getQueryString()
Returns the original request query string.
|
String |
getRepository() |
String |
getSelector()
A selector is the part between the first
SelectorUtil.SELECTOR_DELIMITER and the extension of an URI. |
String[] |
getSelectors() |
String |
getTemplateName() |
String |
getUriPrefix() |
boolean |
isPreviewMode() |
void |
resetURIs()
The original URI/URL can only be set once.
|
void |
setChannel(Channel channel) |
void |
setCharacterEncoding(String characterEncoding) |
void |
setCurrentContentNode(javax.jcr.Node currentContentNode) |
void |
setCurrentURI(String currentURI) |
void |
setExtension(String extension) |
void |
setFile(File file) |
void |
setHandle(String handle) |
void |
setLocale(Locale locale) |
void |
setMainContentNode(javax.jcr.Node mainContentNode) |
void |
setOriginalBrowserURI(String originalBrowserURI) |
void |
setOriginalBrowserURL(String originalBrowserURL) |
void |
setOriginalURI(String originalURI) |
void |
setOriginalURL(String originalURL) |
void |
setPreviewMode(boolean previewMode) |
void |
setQueryString(String queryString) |
void |
setRepository(String repository) |
void |
setSelector(String selector)
Warning - this might change in the future - see MAGNOLIA-2343 for details.
|
void |
setTemplateName(String templateName) |
void |
setUriPrefix(String uriPrefix) |
protected String |
stripContextPathIfExists(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!!!
|
public void setOriginalURI(String originalURI)
public void setOriginalBrowserURI(String originalBrowserURI)
public void setCurrentURI(String currentURI)
public void setQueryString(String queryString)
public String getQueryString()
public String getCurrentURI()
public String getCharacterEncoding()
public String getOriginalURI()
public String getOriginalURL()
public void setOriginalURL(String originalURL)
public String getOriginalBrowserURI()
public String getOriginalBrowserURL()
public void setOriginalBrowserURL(String originalBrowserURL)
public void setCharacterEncoding(String characterEncoding)
public String getExtension()
public void setExtension(String extension)
public File getFile()
public void setFile(File file)
public String getUriPrefix()
public void setUriPrefix(String uriPrefix)
public String getHandle()
public void setHandle(String handle)
public javax.jcr.Node getMainContentNode()
public void setMainContentNode(javax.jcr.Node mainContentNode)
public javax.jcr.Node getCurrentContentNode()
public void setCurrentContentNode(javax.jcr.Node currentContentNode)
public String getRepository()
public void setRepository(String repository)
public String getSelector()
SelectorUtil.SELECTOR_DELIMITER
and the extension of an URI.
I.e. given a URI like http://myserver/mypage~x~foo=bar~.html
the entire selector is ~x~foo=bar~
. A selector can be split in turn into several
selectors separated from each other by the SelectorUtil.SELECTOR_DELIMITER
. In the above example, single selectors are x and foo=bar.
The latter is a name=value
selector which is set in the MgnlContext as an attribute with scope Context.LOCAL_SCOPE
. You can retrieve its value via MgnlContext.getAttribute("foo")
.
You can get and iterate over a full selector with the getSelectors()
method.
Warning - this might change in the future - see MAGNOLIA-2343 for details.
public void setSelector(String selector)
URLDecoder.decode(java.lang.String, java.lang.String)
public String getTemplateName()
public void setTemplateName(String templateName)
public Locale getLocale()
public void setLocale(Locale locale)
locale
- The aggregation state level locale, i.e. the locale that should be used for contentspublic boolean isPreviewMode()
public void setPreviewMode(boolean previewMode)
public Channel getChannel()
public void setChannel(Channel channel)
protected String stripContextPathIfExists(String uri)
uri
- with contextPath (maybe)public void resetURIs()
public String[] getSelectors()
http://www.magnolia-cms.com/node~value1~value2~.html?someparam=booo
, the entire selector is ~value1~value2~
, whereas the
single selectors are value1
and value2
. Selectors are delimited by SelectorUtil.SELECTOR_DELIMITER
.
Warning - this might change in the future - see MAGNOLIA-2343 for details.
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.