jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: How to know if a NodeType already exist?
Date Fri, 28 Jul 2006 11:34:04 GMT
i would not mix QName and JcrName methods in the same interface.
regards, toby

On 7/28/06, Nicolas <ntoper@gmail.com> wrote:
> Rethinking about it: I would like to use the signature
> NodeTypeManager.hasNodeType(Qname) instead of String. What do you think?
>
> a+
> Nico
> my blog! http://www.deviant-abstraction.net !!
>
>
> > > At the moment I'd use the exception:
> > >
> > >     try {
> > >         nodeTypeManager.getNodeType(name);
> > >         // exists
> > >     } catch (NoSuchNodeTypeException e) {
> > >         // does not exist
> > >     }
> > >
> > > But I agree that a utility method like
> > > NodeTypeManager.hasNodeType(String) would feel nicer for applications
> > > that want to automatically create a node type if it doesn't yet exist.
> > > If you like, a patch for adding such a method to
> > > JackrabbitNodeTypeManager and NodeTypeManagerImpl would be welcome.
> > > Alexander's use of NodeTypeRegistry.isRegistered(QName) is correct.
> > >
> > > I'll propose such an addition to JSR 283.
> > >
> > > BR,
> > >
> > > Jukka Zitting
> > >
> > > --
> > > Yukatan - http://yukatan.fi/ - info@yukatan.fi
> > > Software craftsmanship, JCR consulting, and Java development
> > >
> >
> >
> >
> >
> > --
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message