You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Rishi Verma (JIRA)" <ji...@apache.org> on 2013/07/31 20:35:51 UTC
[jira] [Commented] (OODT-649) Add PathUtils.replaceEnvVariables()
wrapper around retrieved context parameters
[ https://issues.apache.org/jira/browse/OODT-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13725564#comment-13725564 ]
Rishi Verma commented on OODT-649:
----------------------------------
Great catch Ross! This fix now makes older fmprod config files work seamlessly with the new RESTful resources.
> Add PathUtils.replaceEnvVariables() wrapper around retrieved context parameters
> -------------------------------------------------------------------------------
>
> Key: OODT-649
> URL: https://issues.apache.org/jira/browse/OODT-649
> Project: OODT
> Issue Type: Sub-task
> Components: product server
> Affects Versions: 0.7
> Reporter: Ross Laidlaw
> Assignee: Ross Laidlaw
> Priority: Minor
> Labels: gsoc
> Fix For: 0.7
>
> Attachments: OODT-649.rlaidlaw.2013-07-27.patch.txt
>
>
> Methods in several classes in the cas.product.service.resources package retrieve parameters from the servlet context using the context.getInitParameter(String parameterName) method call, for example as follows:
> {code}
> setWorkingDirPath(context.getInitParameter("filemgr.working.dir"));
> {code}
> But these parameters may contain environment variables such as [HOME] or [FMPROD_HOME], etc. Currently, these aren't processed properly and the getInitParameter call needs to be wrapped in a call to PathUtils.replaceEnvVariables() (from the cas-metadata module) to process the environment variables, for example as follows:
> {code}
> setWorkingDirPath(PathUtils.replaceEnvVariables(
> context.getInitParameter("filemgr.working.dir")));
> {code}
> This is already done in the original Data, RDF and RSS servlets but was accidentally omitted from the new resource classes in the cas.product.service.resources package.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira