[opencms-dev] search resources by property value?
Andras Balogh
abalogh at gmail.com
Tue Nov 1 16:44:46 CET 2005
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
>
More information about the opencms-dev
mailing list