[ 
https://issues.apache.org/jira/browse/UIMA-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15416002#comment-15416002
 ] 

Marshall Schor commented on UIMA-5043:
--------------------------------------

My sense is that the choice of API depends on the audience - who the expected 
user of the API is.  I think UIMAContext.getThreadContext() is good for an 
internal use kind of API.  For End-users, I prefer APIs that clearly and more 
directly connect to thier intent.  In this case, the end-user is focused on 
getting an external setting parameter.  The fact that we (currently) use a 
thread local to facilitate this might be considered an internal implementation 
detail?

For example, maybe in the future, Java will support more natively the concept 
of "dynamically scoped" variables, and we could use those more directly.  Or we 
could do something really hacky, internally, involving climbing up the caller's 
stack frames to find one where there's a known class/field combo that has the 
UIMA context (We did something like this in MsgLocalizationClassLoader in order 
to locate a message bundle that was defined somewhere in the caller's call 
chain, see https://issues.apache.org/jira/browse/UIMA-1714)

> Provide method to access individual external override settings
> --------------------------------------------------------------
>
>                 Key: UIMA-5043
>                 URL: https://issues.apache.org/jira/browse/UIMA-5043
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Burn Lewis
>            Assignee: Burn Lewis
>            Priority: Minor
>             Fix For: 2.9.0SDK
>
>
> The framework loads the external override settings and uses them in any 
> configuration parameter that has an external override name attached,  Users 
> have asked for the ability to access these values directly without the 
> indirection of configuration parameter entries in descriptors.  Currently the 
> complete Settings object that holds all the external override settings loaded 
> by the framework is accessible via UimaContextAdmin.
> An improvement would be to allow individual values to be read using a method 
> in the UimaContext interface, perhaps: 
> String getExternalOverride(String name)
> String[] getExternalOverrideArray{String name)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to