public class EarProfileRecognizer extends AbstractRecognizer
This recognizer looks for Element being a Workspace. If true,
it goes through all the Project of the workspace, or a filtered list depending
on what EarProfileRecognizer.SpiData.ProjectIterable returns. For each project, it tries to build
a J2eeProfile. If any one such profile can be built, it returns a builder
that can create an EarProfile. When built, the EarProfile will
have J2eeProfiles from all contributing projects.
| Modifier and Type | Class and Description |
|---|---|
protected class |
EarProfileRecognizer.EarProfileBuilder |
static class |
EarProfileRecognizer.SpiData |
profileClass_| Constructor and Description |
|---|
EarProfileRecognizer() |
| Modifier and Type | Method and Description |
|---|---|
protected BuilderContext |
builderContext(Cookie cookie) |
protected boolean |
canCreate(Element element,
BuilderContext context,
java.lang.Class classOrIntf,
Cookie cookie)
Can an EAR Profile be created for this combination of parameters.
|
protected java.lang.Class |
classOrIntf(Cookie cookie) |
protected Element |
element(Cookie cookie) |
protected java.util.ArrayList<ProfileBuilder> |
getContainedProfileBuilders(java.util.Iterator<Project> projectsIter,
Cookie cookie) |
protected java.util.Iterator<Project> |
getProjects(Cookie cookie)
Get projects in the Workspace.
|
protected Workspace |
getWorkspace(Cookie cookie) |
protected AbstractBuilder |
newEarProfileBuilder(Workspace ws,
java.util.ArrayList<ProfileBuilder> builders,
Cookie cookie) |
protected AbstractBuilder |
recognizeImpl(Element element,
BuilderContext context,
java.lang.Class classOrIntf)
Template method.
|
getProfileClass, recognizeprotected AbstractBuilder recognizeImpl(Element element, BuilderContext context, java.lang.Class classOrIntf)
Check if Element is a workspace
Get a list of Projects in the workspace from EarProfileRecognizer.SpiData.ProjectIterable
For each Project, create J2eeProfile builders.
If atleast one builder could be created, create an EarProfileRecognizer.EarProfileBuilder
that aggregates all the J2eeProfile builders.
recognizeImpl in class AbstractRecognizerprotected final BuilderContext builderContext(Cookie cookie)
protected final java.lang.Class classOrIntf(Cookie cookie)
protected boolean canCreate(Element element, BuilderContext context, java.lang.Class classOrIntf, Cookie cookie)
protected java.util.Iterator<Project> getProjects(Cookie cookie)
The default implementation will only get Projects in the
EarProfileRecognizer.SpiData.ProjectIterable
protected java.util.ArrayList<ProfileBuilder> getContainedProfileBuilders(java.util.Iterator<Project> projectsIter, Cookie cookie)
protected AbstractBuilder newEarProfileBuilder(Workspace ws, java.util.ArrayList<ProfileBuilder> builders, Cookie cookie)