public class ModelAssembler
extends java.lang.Object
fragments
and MApplicationElement imports to the application model and running
pre- and post-processors on the model.| Constructor and Description |
|---|
ModelAssembler() |
| Modifier and Type | Method and Description |
|---|---|
void |
processFragment(MModelFragments fragmentsContainer,
MModelFragment fragment,
java.lang.String contributorName,
java.lang.String contributorURI,
boolean checkExist)
Adds the
model elements contributed by the
IConfigurationElement to the application model and resolves any
fragment imports along the way. |
void |
processFragments(java.util.Collection<ModelFragmentWrapper> fragmentList) |
void |
processFragmentWrappers(java.util.Collection<ModelFragmentWrapper> wrappers)
Processes the given list of fragments wrapped in
ModelFragmentWrapper
elements. |
void |
processModel(boolean initial)
Processes the application model.
|
java.util.List<MApplicationElement> |
processModelFragment(MModelFragment fragment,
java.lang.String contributorURI,
boolean checkExist)
Contributes the given
MModelFragment to the application model. |
void |
resolveImports(java.util.List<MApplicationElement> imports,
java.util.List<MApplicationElement> addedElements)
Resolves the given list of imports used by the specified
addedElements in the application model. |
void |
runProcessors(IExtension[] extensions,
boolean initial,
boolean afterFragments)
Executes the processors as declared in provided
extensions
array. |
public void processModel(boolean initial)
initial - true if running from a non-persisted statepublic void processFragmentWrappers(java.util.Collection<ModelFragmentWrapper> wrappers)
ModelFragmentWrapper
elements.wrappers - the list of fragmentspublic void processFragments(java.util.Collection<ModelFragmentWrapper> fragmentList)
public void processFragment(MModelFragments fragmentsContainer,
MModelFragment fragment,
java.lang.String contributorName,
java.lang.String contributorURI,
boolean checkExist)
model elements contributed by the
IConfigurationElement to the application model and resolves any
fragment imports along the way.fragmentsContainer - the MModelFragmentsfragment - the MModelFragmentcontributorName - the name of the element contributing the fragmentcontributorURI - the URI of the element contribution the fragmentcheckExist - specifies whether we should check that the
application model doesn't already contain the
elements contributed by the fragment before merging
thempublic java.util.List<MApplicationElement> processModelFragment(MModelFragment fragment,
java.lang.String contributorURI,
boolean checkExist)
MModelFragment to the application model.fragment - the fragment to add to the application modelcontributorURI - the URI of the element that contributes this fragmentcheckExist - specifies whether we should check that the application
model doesn't already contain the elements contributed
by the fragment before merging themMApplicationElement elements that were merged
into the application model by the fragmentpublic void runProcessors(IExtension[] extensions,
boolean initial,
boolean afterFragments)
extensions
array.extensions - the array of IExtension extensions containing
the processorsinitial - true if the application is running from a
non-persisted stateafterFragments - true if the processors that should be run
before model fragments are merged are to be executed,
false otherwisepublic void resolveImports(java.util.List<MApplicationElement> imports,
java.util.List<MApplicationElement> addedElements)
addedElements in the application model.imports - the list of elements that were imported by fragments and
should be resolved in the application modeladdedElements - the list of elements contributed by the fragments to the
application model