|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IApplicationContext
Defines a set of methods to retrieve information about the application environment.
There is one context per server application (web application), so the class can be used as a place to share global application data.
Method Summary | |
---|---|
void |
addEntryPointHandler(IPentahoSystemEntryPoint entryPoint)
Adds an entry point handler. |
void |
addExitPointHandler(IPentahoSystemExitPoint exitPoint)
Adds an exit point handler. |
File |
createTempFile(IPentahoSession session,
String prefix,
String extension,
boolean trackFile)
Creates a temporary file in the system/tmp solutions folder |
File |
createTempFile(IPentahoSession session,
String prefix,
String extension,
File parentDir,
boolean trackFile)
Creates a temporary file in the specified parent folder and optionally tracks it for deletion on session termination |
String |
getApplicationPath(String path)
Returns the path to the web application or standalone application. |
String |
getBaseUrl()
Deprecated. Returns a URL to the server application, up to and including the context. The URL that is returned is derived from the server context, and thus will include the protocol, host name, port, and application context root. |
Object |
getContext()
|
String |
getFileOutputPath(String path)
Used for content output (temporary and otherwise), returns a fully qualified path suitable for creating a File object from. |
String |
getFullyQualifiedServerURL()
Returns a fully qualified URL to the server application, up to and including the context. |
String |
getPentahoServerName()
Retrieves the descriptive name of the platform application. |
String |
getProperty(String key)
If there were any other properties set (for example, initParams in the servlet context), this will let you have access to all of those properties that are set. |
String |
getProperty(String key,
String defaultValue)
If there were any other properties set (for example, initParams in the servlet context), this will let you have access to all of those properties that are set. |
String |
getSolutionPath(String path)
Retrieves the fully qualified path to the location of the Pentaho solution, appending the path given in the parameter. |
String |
getSolutionRootPath()
|
void |
invokeEntryPoints()
Invokes all entry point handlers. |
void |
invokeExitPoints()
Invokes all exit point handlers. |
void |
removeEntryPointHandler(IPentahoSystemEntryPoint entryPoint)
Removes an entry point handler. |
void |
removeExitPointHandler(IPentahoSystemExitPoint exitPoint)
Removes an exit point handler. |
void |
setBaseUrl(String url)
Deprecated. |
void |
setContext(Object context)
|
void |
setFullyQualifiedServerURL(String url)
|
void |
setSolutionRootPath(String path)
|
Method Detail |
---|
String getSolutionPath(String path)
path
- a path to a location that exists relative to the solution tree
String getSolutionRootPath()
String getFileOutputPath(String path)
path
- Relative path within the solution to the file location. Solution path
will be pre-pended
String getPentahoServerName()
The Pentaho server name should specified in the system settings
configuration file, using the name
element
String getBaseUrl()
The URL that is returned is derived from the server context, and thus will include the protocol, host name, port, and application context root.
String getFullyQualifiedServerURL()
This method should only be used if delivering an offline content or in a scenario where fully qualified url is required.
String getApplicationPath(String path)
path
- a path to a location that exists relative to the application
root directory
String getProperty(String key)
key
- property Name
String getProperty(String key, String defaultValue)
key
- property NamedefaultValue
- default value if the property is not specified.
void addEntryPointHandler(IPentahoSystemEntryPoint entryPoint)
entryPoint
- void removeEntryPointHandler(IPentahoSystemEntryPoint entryPoint)
entryPoint
- void addExitPointHandler(IPentahoSystemExitPoint exitPoint)
entryPoint
- void removeExitPointHandler(IPentahoSystemExitPoint exitPoint)
exitPoint
- void invokeEntryPoints()
void invokeExitPoints()
void setFullyQualifiedServerURL(String url)
void setBaseUrl(String url)
url
- Use setFullyQualifiedServerURL insteadvoid setSolutionRootPath(String path)
Object getContext()
void setContext(Object context)
File createTempFile(IPentahoSession session, String prefix, String extension, File parentDir, boolean trackFile) throws IOException
session
- - IPentahoSessionprefix
- - file prefixextension
- - file extensionparentDir
- - parent folder to create the temp file intrackFile
- - true = add it to the session deleter
IOException
File createTempFile(IPentahoSession session, String prefix, String extension, boolean trackFile) throws IOException
session
- - IPentahoSessionprefix
- - file prefixextension
- - file extensiontrackFile
- - true = add it to the session deleter
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |