Skip to Content
0
Former Member
Jun 06, 2009 at 08:29 AM

How to use com.sapportals.wcm.repository.Selector?

31 Views

The class ICollection has the method:

public IResourceList getChildren(Selector childrenSelector, Collator sortBy, IPropertyNameList,

propertyPrefill) throws ResourceException, AccessDeniedException

I want to know the usage of the parameter childrenSelector whose type is Selector.to

I use the method to get the files of a directory, but I want to filter some files with condition.

So do I use the Selector?

But I don't know how to create an instance of Selector, and how to add the condition into the instanceof.

For example, directory A has four files, two of them have "prev" property, the others have "next" property.

I want to get the file with "next" property, then I create an instance of Selector and a instance of PropertySelectorItem, and the instance of PropertySelectorItem has the content of "next", then I use the method getChildren above. But the result is none.

Please help me, thanks!