You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Dishara Wijewardana <dd...@gmail.com> on 2013/07/30 01:09:37 UTC
How to evaluate Resource#isResourceType()
Hi Ian,
How to evaluate Resource#isResourceType(String s). I believe the String we
pass is A resource type. So obvious feeling is the equal comparison. But I
believe as per JCR spec, that there is a hierarchy of node types. So do we
need to consider that also in this case. If so, any APIs available that can
be re used ?
--
Thanks
/Dishara
Re: How to evaluate Resource#isResourceType()
Posted by Dishara Wijewardana <dd...@gmail.com>.
On Tue, Jul 30, 2013 at 11:06 AM, Carsten Ziegeler <cz...@apache.org>wrote:
> Hi,
>
> if you're Resource implementation inherits from AbstractResource (which it
> should), then isResourceType is already implemented for you and you can use
> this implementation. (Actually this method simply calls
> ResourceResolver#isResourceType.
>
Got the point. Thanks you.
>
> Regards
> Carsten
>
>
> 2013/7/30 Dishara Wijewardana <dd...@gmail.com>
>
> > Hi Ian,
> > How to evaluate Resource#isResourceType(String s). I believe the String
> we
> > pass is A resource type. So obvious feeling is the equal comparison. But
> I
> > believe as per JCR spec, that there is a hierarchy of node types. So do
> we
> > need to consider that also in this case. If so, any APIs available that
> can
> > be re used ?
> >
> > --
> > Thanks
> > /Dishara
> >
>
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
--
Thanks
/Dishara
Re: How to evaluate Resource#isResourceType()
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,
if you're Resource implementation inherits from AbstractResource (which it
should), then isResourceType is already implemented for you and you can use
this implementation. (Actually this method simply calls
ResourceResolver#isResourceType.
Regards
Carsten
2013/7/30 Dishara Wijewardana <dd...@gmail.com>
> Hi Ian,
> How to evaluate Resource#isResourceType(String s). I believe the String we
> pass is A resource type. So obvious feeling is the equal comparison. But I
> believe as per JCR spec, that there is a hierarchy of node types. So do we
> need to consider that also in this case. If so, any APIs available that can
> be re used ?
>
> --
> Thanks
> /Dishara
>
--
Carsten Ziegeler
cziegeler@apache.org