[opencms-dev] search resources by property value?

Jason Trump jason.trump at brulant.com
Tue Nov 1 21:08:55 CET 2005


Thanks Andras, that is about what I was looking for.  Eventually I would
like to be able to perform a query that constrains multiple properties
at once, but for now I think this works quite well.

-jt

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-
> bounces at opencms.org] On Behalf Of Andras Balogh
> Sent: Tuesday, November 01, 2005 10:45 AM
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] search resources by property value?
> 
> Hello,
> 
> Check the CmsObject class:
> 
> public java.util.List *readResourcesWithProperty*(java.lang.String
path,
>                                                 java.lang.String
> propertyDefinition,
>                                                 java.lang.String
value)
>                                          throws CmsException
> <http://synyx.de/api/opencms6.0.0/org/opencms/main/CmsException.html>
> 
> Reads all resources that have a value (containing the specified value)
> set for the specified property in the given path.
> 
> Both individual and shared properties of a resource are checked.
> 
> 
> Regards,
> Andras.
> 
> Jason Trump wrote:
> 
> > Hello everyone,
> >
> > Is there a good API method to find all resources in a single project
> > that have a specific property value? For example, if I have a
property
> > called "foo", I want to find all nodes such that "foo=hello". I know
> > that if foo is "title" or "keywords" I can use the Lucene indexes,
but
> > I'm specifically interested in non-indexed properties.
> >
> > I know this is fairly easy to accomplish with direct database
access,
> > but I thought there might be such an API method, especially since I
> > have to search for properties on parent nodes too. Any help would be
> > much appreciated.
> >
> > Thanks
> >
> > jason
> >
> > ** **
> >
> > **JASON C. TRUMP**
> >
> > Senior Consultant
> >
> > 216.896.8941 / direct
> >
> > jason.trump at brulant.com <mailto:jason.trump at brulant.com>
> >
> > **BRULANT, Inc.****
> >
> > 3700 park east drive, suite 300
> >
> > beachwood, ohio 44122
> >
> > 216.896.8910 / phone
> >
> > 216.896.8991 / fax
> >
> > brulant.com <http://www.brulant.com/>
> >
>
>-----------------------------------------------------------------------
-
> >
> >
> >
> >_______________________________________________
> >This mail is send to you from the opencms-dev mailing list
> >To change your list options, or to unsubscribe from the list, please
> visit
> >http://mail.opencms.org/mailman/listinfo/opencms-dev
> >
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list