jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • PicoContainer
  • PICO-181

refactor creation of default parameters

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.0-beta-5
  • Fix Version/s: 2.8
  • Component/s: PicoContainer (Java)
  • Labels:
    None

Description

Currently the creation of the default parameters is hard-wired in ICA.createDefaultParameters(). We had now 3 issues on the list, where another Parameter-Implementation instead of ComponentParameter would have been better:

Configuration aware (Julian Stern's problem):

  • http://lists.codehaus.org/pipermail/picocontainer-dev/2004-April/003406.html
    Thomas Heller's AutoConfigParameter:
  • http://lists.codehaus.org/pipermail/picocontainer-dev/2004-April/003407.html
    Thomas Heller's problem with the Pico autoregistration:
  • http://lists.codehaus.org/pipermail/picocontainer-dev/2004-April/003295.html

We might either move createDefaultParameter to (Mutable)PicoContainer or to create a container that overwrites the fucntion or have an additional ctor arg for ICA:

class ICA {
public ICA(Object componentKey, Class componentImplementation, Parameter[] parameters, ParameterFactory factory){ ... }
public ICA(Object componentKey, Class componentImplementation, Parameter[] parameters){ this(comüponentKey, componentImplementation, parameters, new DefaultParameterFactory()) }
}

class ParameterFactory() {
Parameter getDefaultParaeterForType(Class type);
}

Issue Links

relates to

Improvement - An improvement or enhancement to an existing feature or task. PICO-206 Constraint-based collection dependency instantiation

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Improvement - An improvement or enhancement to an existing feature or task. PICO-216 Refactor ComponentParameter and GenericCollectionComponentAdapter

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Improvement - An improvement or enhancement to an existing feature or task. PICO-268 Add Constructor as parameter to InstantiatingComponentAdapter.createDefaultParameters

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Joerg Schaible added a comment - 01/Oct/04 10:33 PM

PROPOSAL:
========

Add a ParameterFactory as optional Parameter to DefaultPC and create the method PicoContainer.createDefaultParameter(Class type).

BENEFIT:
========

  • User can influence or completly change the strategy for selecting the default parameters. With PICO-216 he can turn off collections, with Thomas' AutoConfigParameter he can use a configuration as default or with Nick's constraints PICO-206 create even more sophisticated strategies.
Show
Joerg Schaible added a comment - 01/Oct/04 10:33 PM PROPOSAL: ======== Add a ParameterFactory as optional Parameter to DefaultPC and create the method PicoContainer.createDefaultParameter(Class type). BENEFIT: ========
  • User can influence or completly change the strategy for selecting the default parameters. With PICO-216 he can turn off collections, with Thomas' AutoConfigParameter he can use a configuration as default or with Nick's constraints PICO-206 create even more sophisticated strategies.
Hide
Permalink
Paul Hammant added a comment - 05/Oct/04 8:14 AM

I'd prefer a ParameterizedPicoContainer or ParameterizingPicoContainer. Somewhere where we would move perhaps all component-parameter functionality to.

Show
Paul Hammant added a comment - 05/Oct/04 8:14 AM I'd prefer a ParameterizedPicoContainer or ParameterizingPicoContainer. Somewhere where we would move perhaps all component-parameter functionality to.
Hide
Permalink
Joerg Schaible added a comment - 28/Nov/05 5:12 PM

Note, this is scheduled for 1.3

Show
Joerg Schaible added a comment - 28/Nov/05 5:12 PM Note, this is scheduled for 1.3
Hide
Permalink
Joerg Schaible added a comment - 28/Nov/05 5:14 PM

Fix relationship.

Show
Joerg Schaible added a comment - 28/Nov/05 5:14 PM Fix relationship.

People

  • Assignee:
    Unassigned
    Reporter:
    Joerg Schaible
Vote (0)
Watch (0)

Dates

  • Created:
    26/Apr/04 7:50 AM
    Updated:
    21/Jan/09 9:20 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.