|
||||||||||
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(String moduleId,
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(String pluginType,
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 |
Object |
get(String key)
Get the property named by key or null if the property does not exist or is not set. |
String |
getAbsoluteServerURL()
Get the absolute URL to the portal server |
Object |
getAttribute(String s)
|
Enumeration |
getAttributeNames()
|
com.gentics.portalnode.auth.AuthenticationSystem |
getAuthenticationSystem()
returns the AuthenticationSystem used for this portal Instance. |
Collection |
getAvailableDatasources()
Get a collection of the ids of all available datasources |
Collection |
getAvailableDatasources(Class datasourceClass)
Get a collection of the ids of all available datasources (of the specified type) |
Collection |
getAvailableImps()
get a collection of available imps (their ids) |
boolean |
getBooleanModuleParameter(String name)
|
Enumeration |
getContainerRuntimeOptions()
|
Datasource |
getDatasource()
returns default datasource which is the first found datasource of a specific type. |
Datasource |
getDatasource(String id)
|
EventBroker |
getEventBroker()
Get the event broker. |
FileUploadProvider |
getFileUploadProvider()
|
com.gentics.portalnode.formatter.FormatterManager |
getFormatterManager()
|
GenticsImpInterface |
getImp(Class impClass)
Get the (first available) imp of the given class. |
GenticsImpInterface |
getImp(String impId)
get the imp with given id from its dungeon. |
String |
getInitParameter(String s)
|
Enumeration |
getInitParameterNames()
|
int |
getIntegerModuleParameter(String name)
|
Language |
getLanguage()
get the current portal language |
List |
getListOfObjectsModuleParameter(String name)
|
int |
getMajorVersion()
|
String |
getMimeType(String s)
|
int |
getMinorVersion()
|
String |
getModuleId()
get the module id |
com.gentics.portalnode.module.ModuleParameter |
getModuleParameter(String key)
Return a module parameter - for a convenient way to retrieve the value as string see getStringModuleParameter(String) |
Map |
getModuleParameterMap()
|
Iterator |
getModuleParameterNames()
Deprecated. this method will be removed in the future |
javax.portlet.PortletRequestDispatcher |
getNamedDispatcher(String s)
|
Node |
getNodeModuleParameter(String name)
get a module parameter of type node |
String |
getPLink(String contentId)
get a plink to the content with given contentid |
String |
getPNodeCode()
|
Object |
getPortalParameter(String parameterKey)
Helper method to access portal parameters |
Properties |
getPortalProperties()
Returns all Configuration Properties from the Portal |
PropertySetter |
getPortalPropertySetter()
get a property setter for setting portal properties |
PropertyResolver |
getPortalResolver()
|
String |
getPortletContextName()
|
Object |
getProperty(String key)
Get the property named by key or null if the property does not exist or is not set. |
HashMap |
getPropertyNames()
|
String |
getRealPath(String s)
|
javax.portlet.PortletRequestDispatcher |
getRequestDispatcher(String s)
|
URL |
getResource(String s)
|
InputStream |
getResourceAsStream(String s)
|
Set |
getResourcePaths(String s)
|
Rule |
getRuleModuleParameter(String name)
|
org.quartz.Scheduler |
getScheduler()
get the scheduler for timed jobs |
String |
getServerInfo()
|
String |
getStringModuleParameter(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(String key)
get a localized string. |
I18nString |
i18n(String key,
String languageId)
get a localized string in the given language |
void |
log(String s)
|
void |
log(String s,
Throwable throwable)
|
void |
overwritePNode(String overWriteString,
GenticsPortlet module)
|
void |
removeAttribute(String s)
|
Object |
resolvePortalProperty(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(String s,
Object o)
|
void |
setLanguage(String language)
|
void |
setModuleParameter(String name,
Object value)
|
void |
setPortalProperty(String propertyPath,
Object value)
sets the portal property identified via propertyPath to a certain value provided |
void |
setRenderParameters(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(String moduleId, String moduleType, javax.servlet.ServletContext servletContext)
moduleId
- id of the modulemoduleType
- type of the moduleservletContext
- underlying servlet contextMethod Detail |
---|
public EventBroker getEventBroker()
public String getServerInfo()
getServerInfo
in interface javax.portlet.PortletContext
public javax.portlet.PortletRequestDispatcher getRequestDispatcher(String s)
getRequestDispatcher
in interface javax.portlet.PortletContext
public javax.portlet.PortletRequestDispatcher getNamedDispatcher(String s)
getNamedDispatcher
in interface javax.portlet.PortletContext
public InputStream getResourceAsStream(String s)
getResourceAsStream
in interface javax.portlet.PortletContext
public int getMajorVersion()
getMajorVersion
in interface javax.portlet.PortletContext
public int getMinorVersion()
getMinorVersion
in interface javax.portlet.PortletContext
public String getMimeType(String s)
getMimeType
in interface javax.portlet.PortletContext
public String getRealPath(String s)
getRealPath
in interface javax.portlet.PortletContext
public Set getResourcePaths(String s)
getResourcePaths
in interface javax.portlet.PortletContext
public URL getResource(String s) throws MalformedURLException
getResource
in interface javax.portlet.PortletContext
MalformedURLException
public Object getAttribute(String s)
getAttribute
in interface javax.portlet.PortletContext
public Enumeration getAttributeNames()
getAttributeNames
in interface javax.portlet.PortletContext
public String getInitParameter(String s)
getInitParameter
in interface javax.portlet.PortletContext
public Enumeration getInitParameterNames()
getInitParameterNames
in interface javax.portlet.PortletContext
public void log(String s)
log
in interface javax.portlet.PortletContext
public void log(String s, Throwable throwable)
log
in interface javax.portlet.PortletContext
public void removeAttribute(String s)
removeAttribute
in interface javax.portlet.PortletContext
public void setAttribute(String s, Object o)
setAttribute
in interface javax.portlet.PortletContext
public String getPortletContextName()
getPortletContextName
in interface javax.portlet.PortletContext
public String getModuleId()
public void setRenderParameters(Map parameters)
parameters
- public com.gentics.portalnode.module.ModuleParameter getModuleParameter(String key)
getStringModuleParameter(String)
public Map getModuleParameterMap()
public Iterator getModuleParameterNames()
public List getListOfObjectsModuleParameter(String name)
public String getStringModuleParameter(String name)
public Rule getRuleModuleParameter(String name)
public boolean getBooleanModuleParameter(String name)
public int getIntegerModuleParameter(String name)
public Node getNodeModuleParameter(String name)
name
- name of the module parameter
public void setModuleParameter(String name, Object value)
public GenticsUser getUser()
public RuleTree createPortalRuleTree()
public Object resolvePortalProperty(String propertyPath) throws UnknownPropertyException
propertyPath
- to identify the property
UnknownPropertyException
- if the property path leads straight to nowherepublic PropertySetter getPortalPropertySetter()
public void setPortalProperty(String propertyPath, 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(String id)
public Datasource getDatasource()
public Collection getAvailableDatasources()
public Collection getAvailableDatasources(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 HashMap getPropertyNames()
public Object getProperty(String key)
Resolvable
Resolvable.get(String)
.
getProperty
in interface Resolvable
key
- key of the property
public Object get(String key)
Resolvable
get
in interface Resolvable
key
- key of the property
public boolean canResolve()
Resolvable
Resolvable.getProperty(String)
or Resolvable.get(String)
will return null.
canResolve
in interface Resolvable
public PropertyResolver getPortalResolver()
public GenticsPlugin createPlugin(String pluginType, 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 String getPNodeCode()
public void overwritePNode(String overWriteString, GenticsPortlet module) throws SAXException
SAXException
public 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 Properties getPortalProperties()
public com.gentics.portalnode.formatter.FormatterManager getFormatterManager()
public GenticsImpInterface getImp(String impId)
returnImp(GenticsImpInterface)
after usage
impId
- id of the imp to get
public GenticsImpInterface getImp(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(String language)
public I18nString i18n(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(String key, String languageId)
key
- the key of the i18n item.languageId
- language id
public Collection getAvailableImps()
public Language getLanguage()
public String getPLink(String contentId)
contentId
- id of the content to link to
public org.quartz.Scheduler getScheduler()
public com.gentics.portalnode.auth.AuthenticationSystem getAuthenticationSystem()
public String getAbsoluteServerURL()
public Object getPortalParameter(String parameterKey)
parameterKey
- key of the portal parameter
public Enumeration getContainerRuntimeOptions()
getContainerRuntimeOptions
in interface javax.portlet.PortletContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |