Bug 295519 - API needed for single root validation
Summary: API needed for single root validation
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Jason Peterson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-18 17:20 EST by Jason Peterson CLA
Modified: 2009-11-20 09:38 EST (History)
1 user (show)

See Also:
cbridgha: review+


Attachments
patch (24.34 KB, patch)
2009-11-18 17:20 EST, Jason Peterson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Peterson CLA 2009-11-18 17:20:54 EST
Created attachment 152532 [details]
patch

An API currently exists to determine if a project has a single root structure. 
However, this is only exposed in code specific to deploy right now.  It also
does not give any information as to why the project does not have a single root
structure.

I have created a new utility class that can be called to determine if a
component has a single-root structure or not.  Flags can be passed into the API
to also get back information regarding why it is not single-root.  I have also
added API to allow the user to get the single-root container back when the
structure does adhere to the single-root rules.

The isSingleRootStructure code from J2EEFlexProjDeployable will later be
removed as part of Bug 265798 and IArchive will now handle processing the
optimized members code that currently calls this.
Comment 1 Jason Sholl CLA 2009-11-18 17:35:33 EST
Code checked into HEAD
Comment 2 Chuck Bridgham CLA 2009-11-20 09:38:55 EST
Looks great.

Can we consider this api interface for common jst plugin rather than Java EE?
What is specific to Java EE, sounds like this is useful for any deployment type