Aug 18th, 2009, 04:15 PM
dead facelet algorithm - can I query Spring for valid view-state ids?
I have a project that has facelets that are no longer being referenced.
I want to write a script to locate orphan facelet files. I am considering trying to "do this right" and open source it as a maven plugin.
The facelets could either be:
- included within another facelet
- served via Spring MVC
- returned as part of Spring Web Flow
Is there already an API available in which I can inspect the Spring Web Flow and MVC configurations programmatically or would I have to manually parse all the *-flow.xml files, annotations, etc?
I'd like to take a facelet file, named myPage.xhtml, and determine:
- Is "myPage" a valid view id? Does any flow return an id named myPage, such as <view-state id="myPage">?
- Does MVC bind to any url named "/myPage", such as @RequestMapping(value="/myPage", method = RequestMethod.GET) ?
If I can do this reasonably well, I'd like to make it a readily available open source maven plugin which a user would run and it would print a list of possible orphans for them to delete.