[shrinkwrap-issues] [JBoss JIRA] (SHRINKDESC-130) Provide a way to validate an imported or created descriptor content
Dan Allen (JIRA)
jira-events at lists.jboss.org
Thu Nov 22 10:28:26 EST 2012
[ https://issues.jboss.org/browse/SHRINKDESC-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736442#comment-12736442 ]
Dan Allen commented on SHRINKDESC-130:
--------------------------------------
Ralf,
Overall, the APIs are looking great!
I reviewed the facesconfig20 test and I have some comments/suggestions.
* The Web prefix on WebFacesConfigDescriptor seems odd to me. I see that you are getting it from the web- prefix on the basename of the XSD URL, but I would consider putting a filter in place for that, esp given these are well known descriptors and we want them to be just right.
* Rather than up(), I'd much prefer something that's more DOM-like, such as parentNode(), parent(), or toParent(). up() just doesn't feel right.
** Also consider having an ancestorNode(int) that will jump multiple levels of ancestry to avoid parentNode().parentNode().parentNode()
* The "getOrCreate" really doesn't sit well with me. I would much prefer define*() and define*(boolean) where a boolean of true indicates to force create it if it already exists. If you still like create, I would suggest as a second choice create*() and create*(true) w/ the same semantics.
Here's an example of how the define would look, taking from the facesconfig example:
{code}
.defineNavigationRule(true)
.fromViewId("*")
.defineNavigationCase()
.fromAction("#{identity.logout}")
._if("#{true}")
.toViewId("/home.xhtml")
.defineRedirect()
.parentNode()
.parentNode()
.defineNavigationCase()
.fromAction("#{bookingAgent.cancel}")
._if("#{true}")
.toViewId("/search.xhtml")
.defineRedirect()
.parentNode()
.parentNode()
.parentNode()
.parentNode()
{code}
Keep up the great work!
> Provide a way to validate an imported or created descriptor content
> -------------------------------------------------------------------
>
> Key: SHRINKDESC-130
> URL: https://issues.jboss.org/browse/SHRINKDESC-130
> Project: ShrinkWrap Descriptors
> Issue Type: Feature Request
> Reporter: Ralf Battenfeld
> Assignee: Ralf Battenfeld
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the shrinkwrap-issues
mailing list