|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gentics.api.portalnode.portlet.GenticsPortletContext
public class GenticsPortletContext
Implementation of the PortletContext. Adds specific functionality that Gentics portlets can use.
| Field Summary | |
|---|---|
protected javax.servlet.ServletContext |
servletContext
servlet context this portlet context builds on |
| Constructor Summary | |
|---|---|
protected |
GenticsPortletContext(java.lang.String moduleId,
java.lang.String moduleType,
javax.servlet.ServletContext servletContext)
Create an instance of the GenticsPortletContext. |
| Method Summary | |
|---|---|
boolean |
canResolve()
Check whether the resolvable is capable of resolving properties right now. |
javax.portlet.PortletURL |
createActionURL()
Deprecated. actionURLs must be created using the RenderResponse (according to portlet specification 1.0 JSR 168). actionURLs created with this method will not hold to correct/total information |
GenticsPlugin |
createPlugin(java.lang.String pluginType,
java.lang.String parameterPrefix,
javax.portlet.PortletConfig portletConfig)
create and initialize an instance of a plugin (defined by its pluginType) |
RuleTree |
createPortalRuleTree()
|
javax.portlet.PortletURL |
createRenderURL()
Deprecated. renderURLs must be created using the RenderResponse (according to portlet specification 1.0 JSR 168). renderURLs created with this method will not hold to correct/total information |
java.lang.Object |
get(java.lang.String key)
Get the property named by key or null if the property does not exist or is not set. |
java.lang.String |
getAbsoluteServerURL()
Get the absolute URL to the portal server |
java.lang.Object |
getAttribute(java.lang.String s)
|
java.util.Enumeration |
getAttributeNames()
|
com.gentics.portalnode.auth.AuthenticationSystem |
getAuthenticationSystem()
returns the AuthenticationSystem used for this portal Instance. |
java.util.Collection |
getAvailableDatasources()
Get a collection of the ids of all available datasources |
java.util.Collection |
getAvailableDatasources(java.lang.Class datasourceClass)
Get a collection of the ids of all available datasources (of the specified type) |
java.util.Collection |
getAvailableImps()
get a collection of available imps (their ids) |
boolean |
getBooleanModuleParameter(java.lang.String name)
|
java.util.Enumeration |
getContainerRuntimeOptions()
|
Datasource |
getDatasource()
returns default datasource which is the first found datasource of a specific type. |
Datasource |
getDatasource(java.lang.String id)
|
EventBroker |
getEventBroker()
Get the event broker. |
FileUploadProvider |
getFileUploadProvider()
|
com.gentics.portalnode.formatter.FormatterManager |
getFormatterManager()
|
GenticsImpInterface |
getImp(java.lang.Class impClass)
Get the (first available) imp of the given class. |
GenticsImpInterface |
getImp(java.lang.String impId)
get the imp with given id from its dungeon. |
java.lang.String |
getInitParameter(java.lang.String s)
|
java.util.Enumeration |
getInitParameterNames()
|
int |
getIntegerModuleParameter(java.lang.String name)
|
Language |
getLanguage()
get the current portal language |
java.util.List |
getListOfObjectsModuleParameter(java.lang.String name)
|
int |
getMajorVersion()
|
java.lang.String |
getMimeType(java.lang.String s)
|
int |
getMinorVersion()
|
java.lang.String |
getModuleId()
get the module id |
com.gentics.portalnode.module.ModuleParameter |
getModuleParameter(java.lang.String key)
Return a module parameter - for a convenient way to retrieve the value as string see getStringModuleParameter(String) |
java.util.Map |
getModuleParameterMap()
|
java.util.Iterator |
getModuleParameterNames()
Deprecated. this method will be removed in the future |
javax.portlet.PortletRequestDispatcher |
getNamedDispatcher(java.lang.String s)
|
org.w3c.dom.Node |
getNodeModuleParameter(java.lang.String name)
get a module parameter of type node |
java.lang.String |
getPLink(java.lang.String contentId)
get a plink to the content with given contentid |
java.lang.String |
getPNodeCode()
|
java.lang.Object |
getPortalParameter(java.lang.String parameterKey)
Helper method to access portal parameters |
java.util.Properties |
getPortalProperties()
Returns all Configuration Properties from the Portal |
PropertySetter |
getPortalPropertySetter()
get a property setter for setting portal properties |
PropertyResolver |
getPortalResolver()
|
java.lang.String |
getPortletContextName()
|
java.lang.Object |
getProperty(java.lang.String key)
Get the property named by key or null if the property does not exist or is not set. |
java.util.HashMap |
getPropertyNames()
|
java.lang.String |
getRealPath(java.lang.String s)
|
javax.portlet.PortletRequestDispatcher |
getRequestDispatcher(java.lang.String s)
|
java.net.URL |
getResource(java.lang.String s)
|
java.io.InputStream |
getResourceAsStream(java.lang.String s)
|
java.util.Set |
getResourcePaths(java.lang.String s)
|
Rule |
getRuleModuleParameter(java.lang.String name)
|
org.quartz.Scheduler |
getScheduler()
get the scheduler for timed jobs |
java.lang.String |
getServerInfo()
|
java.lang.String |
getStringModuleParameter(java.lang.String name)
Returns a module parameter (= pnode parameter) as string if available (null otherwise). |
TemplateProcessor |
getTemplateProcessor(GenticsPortlet portlet,
javax.portlet.PortletConfig portletConfig)
Get an instance of a template processor. |
TemplateProcessor |
getTemplateProcessor(GenticsPortlet module,
javax.portlet.PortletConfig portletConfig,
javax.portlet.RenderRequest renderRequest,
javax.portlet.RenderResponse renderResponse)
Deprecated. use getTemplateProcessor(GenticsPortlet, PortletConfig) instead. |
GenticsUser |
getUser()
|
I18nString |
i18n(java.lang.String key)
get a localized string. |
I18nString |
i18n(java.lang.String key,
java.lang.String languageId)
get a localized string in the given language |
void |
log(java.lang.String s)
|
void |
log(java.lang.String s,
java.lang.Throwable throwable)
|
void |
overwritePNode(java.lang.String overWriteString,
GenticsPortlet module)
|
void |
removeAttribute(java.lang.String s)
|
java.lang.Object |
resolvePortalProperty(java.lang.String propertyPath)
resolve a property from the GenticsPortletContext via a path provided |
void |
returnFileUploadProvider(FileUploadProvider fileUploadProvider)
|
void |
returnImp(GenticsImpInterface imp)
release the captured imp to its dungeon |
void |
returnTemplateProcessor(TemplateProcessor templateProcessor)
return the template processor |
void |
setAttribute(java.lang.String s,
java.lang.Object o)
|
void |
setLanguage(java.lang.String language)
|
void |
setModuleParameter(java.lang.String name,
java.lang.Object value)
|
void |
setPortalProperty(java.lang.String propertyPath,
java.lang.Object value)
sets the portal property identified via propertyPath to a certain value provided |
void |
setRenderParameters(java.util.Map parameters)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.servlet.ServletContext servletContext
| Constructor Detail |
|---|
protected GenticsPortletContext(java.lang.String moduleId,
java.lang.String moduleType,
javax.servlet.ServletContext servletContext)
moduleId - id of the modulemoduleType - type of the moduleservletContext - underlying servlet context| Method Detail |
|---|
public EventBroker getEventBroker()
public java.lang.String getServerInfo()
getServerInfo in interface javax.portlet.PortletContextpublic javax.portlet.PortletRequestDispatcher getRequestDispatcher(java.lang.String s)
getRequestDispatcher in interface javax.portlet.PortletContextpublic javax.portlet.PortletRequestDispatcher getNamedDispatcher(java.lang.String s)
getNamedDispatcher in interface javax.portlet.PortletContextpublic java.io.InputStream getResourceAsStream(java.lang.String s)
getResourceAsStream in interface javax.portlet.PortletContextpublic int getMajorVersion()
getMajorVersion in interface javax.portlet.PortletContextpublic int getMinorVersion()
getMinorVersion in interface javax.portlet.PortletContextpublic java.lang.String getMimeType(java.lang.String s)
getMimeType in interface javax.portlet.PortletContextpublic java.lang.String getRealPath(java.lang.String s)
getRealPath in interface javax.portlet.PortletContextpublic java.util.Set getResourcePaths(java.lang.String s)
getResourcePaths in interface javax.portlet.PortletContext
public java.net.URL getResource(java.lang.String s)
throws java.net.MalformedURLException
getResource in interface javax.portlet.PortletContextjava.net.MalformedURLExceptionpublic java.lang.Object getAttribute(java.lang.String s)
getAttribute in interface javax.portlet.PortletContextpublic java.util.Enumeration getAttributeNames()
getAttributeNames in interface javax.portlet.PortletContextpublic java.lang.String getInitParameter(java.lang.String s)
getInitParameter in interface javax.portlet.PortletContextpublic java.util.Enumeration getInitParameterNames()
getInitParameterNames in interface javax.portlet.PortletContextpublic void log(java.lang.String s)
log in interface javax.portlet.PortletContext
public void log(java.lang.String s,
java.lang.Throwable throwable)
log in interface javax.portlet.PortletContextpublic void removeAttribute(java.lang.String s)
removeAttribute in interface javax.portlet.PortletContext
public void setAttribute(java.lang.String s,
java.lang.Object o)
setAttribute in interface javax.portlet.PortletContextpublic java.lang.String getPortletContextName()
getPortletContextName in interface javax.portlet.PortletContextpublic java.lang.String getModuleId()
public void setRenderParameters(java.util.Map parameters)
parameters - public com.gentics.portalnode.module.ModuleParameter getModuleParameter(java.lang.String key)
getStringModuleParameter(String)
public java.util.Map getModuleParameterMap()
public java.util.Iterator getModuleParameterNames()
public java.util.List getListOfObjectsModuleParameter(java.lang.String name)
public java.lang.String getStringModuleParameter(java.lang.String name)
public Rule getRuleModuleParameter(java.lang.String name)
public boolean getBooleanModuleParameter(java.lang.String name)
public int getIntegerModuleParameter(java.lang.String name)
public org.w3c.dom.Node getNodeModuleParameter(java.lang.String name)
name - name of the module parameter
public void setModuleParameter(java.lang.String name,
java.lang.Object value)
public GenticsUser getUser()
public RuleTree createPortalRuleTree()
public java.lang.Object resolvePortalProperty(java.lang.String propertyPath)
throws UnknownPropertyException
propertyPath - to identify the property
UnknownPropertyException - if the property path leads straight to nowherepublic PropertySetter getPortalPropertySetter()
public void setPortalProperty(java.lang.String propertyPath,
java.lang.Object value)
throws InsufficientPrivilegesException,
UnknownPropertyException
propertyPath - to identify the portal propertyvalue - to be set
InsufficientPrivilegesException - if property may not be set due to privilege restrictions
UnknownPropertyException - if the property is not knownpublic Datasource getDatasource(java.lang.String id)
public Datasource getDatasource()
public java.util.Collection getAvailableDatasources()
public java.util.Collection getAvailableDatasources(java.lang.Class datasourceClass)
datasourceClass - class/interface the datasource implementation must implenent/extend or null for all datasources
public javax.portlet.PortletURL createActionURL()
public javax.portlet.PortletURL createRenderURL()
public java.util.HashMap getPropertyNames()
public java.lang.Object getProperty(java.lang.String key)
ResolvableResolvable.get(String).
getProperty in interface Resolvablekey - key of the property
public java.lang.Object get(java.lang.String key)
Resolvable
get in interface Resolvablekey - key of the property
public boolean canResolve()
ResolvableResolvable.getProperty(String) or Resolvable.get(String) will return null.
canResolve in interface Resolvablepublic PropertyResolver getPortalResolver()
public GenticsPlugin createPlugin(java.lang.String pluginType,
java.lang.String parameterPrefix,
javax.portlet.PortletConfig portletConfig)
pluginType - type of the pluginparameterPrefix - prefix of the module parameters which configure
the pluginportletConfig - portlet config from the module of this context
public java.lang.String getPNodeCode()
public void overwritePNode(java.lang.String overWriteString,
GenticsPortlet module)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic void returnFileUploadProvider(FileUploadProvider fileUploadProvider)
fileUploadProvider - public FileUploadProvider getFileUploadProvider()
public TemplateProcessor getTemplateProcessor(GenticsPortlet portlet,
javax.portlet.PortletConfig portletConfig)
returnTemplateProcessor(TemplateProcessor)
after usage.
portlet - portlet instanceportletConfig - portlet configuration
public TemplateProcessor getTemplateProcessor(GenticsPortlet module,
javax.portlet.PortletConfig portletConfig,
javax.portlet.RenderRequest renderRequest,
javax.portlet.RenderResponse renderResponse)
getTemplateProcessor(GenticsPortlet, PortletConfig) instead.
module - moduleportletConfig - portlet configurationrenderRequest - render requestrenderResponse - render response
public void returnTemplateProcessor(TemplateProcessor templateProcessor)
templateProcessor - template process that is not longer usedpublic final java.util.Properties getPortalProperties()
public com.gentics.portalnode.formatter.FormatterManager getFormatterManager()
public GenticsImpInterface getImp(java.lang.String impId)
returnImp(GenticsImpInterface)after usage
impId - id of the imp to get
public GenticsImpInterface getImp(java.lang.Class impClass)
returnImp(GenticsImpInterface) after usage.
impClass - class of the imp
public void returnImp(GenticsImpInterface imp)
imp - imp happily returning to its dungeonpublic void setLanguage(java.lang.String language)
public I18nString i18n(java.lang.String key)
key - the key of the i18n item. the syntax is [a-z0-9.]+, and will
generate a warning if violated.
public I18nString i18n(java.lang.String key,
java.lang.String languageId)
key - the key of the i18n item.languageId - language id
public java.util.Collection getAvailableImps()
public Language getLanguage()
public java.lang.String getPLink(java.lang.String contentId)
contentId - id of the content to link to
public org.quartz.Scheduler getScheduler()
public com.gentics.portalnode.auth.AuthenticationSystem getAuthenticationSystem()
public java.lang.String getAbsoluteServerURL()
public java.lang.Object getPortalParameter(java.lang.String parameterKey)
parameterKey - key of the portal parameter
public java.util.Enumeration getContainerRuntimeOptions()
getContainerRuntimeOptions in interface javax.portlet.PortletContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||