Bug 825120 - RfE: Put CreateChildFacet methods on child component class
RfE: Put CreateChildFacet methods on child component class
Status: NEW
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.4
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-25 03:43 EDT by Heiko W. Rupp
Modified: 2012-05-25 03:43 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Heiko W. Rupp 2012-05-25 03:43:43 EDT
Currently the creation of child resources needs to be implemented by a parent 
resource.
So in order to e.g. support a creation of a new FooBar subsystem, the base 
ASComponent needs to be modified,
which leads to pretty wild type checking and convoluted code in the parent.
Worse, it prevents plugins that run inside a base as plugin to have their 
children being created at base AS level, as they can not modify the source of 
the parent.

I propose we add the possibility to put create child code on the child 
component class by
- putting a static createChild() method on it
or
- instantiating the child component and using a non static class 

Either way to stay compatible with the current code, the plugin container 
should with the new method/facet if this is available and call this. If this is 
not available it will call the classic code. This way existing code continues 
to work and new plugins can take advantage of the new facet.

Note You need to log in before you can comment on or make changes to this bug.