Skip to Content
0
Former Member
Dec 21, 2006 at 09:32 AM

Why getContent() is called in findResource()

8 Views

Hi,

I feel I know little about the workflow of Repository Manager and its namespace manager, content manager and property manager.

Now my problem, when a user clicks a parent folder (

isCollection=true

), its children are displayed. However, when RM is trying to display each object,

getContent()

of that object is called, but I don't want this to happen.

In my implementation of NamespaceManager, in method

 findResources()

, I get the children files of the current RID and return an ArrayList of IResourceHandles:

public List findResources(IResourceHandle handle,IFindResourcesDescriptor desc, int start,int size,Object arg4) throws ... {
  ...
  List l = new ArrayList();
  List nodeChildren = new ArrayList();
  Node node = ((Handle) handle).getNode();
  if (node instanceof FolderNode) {
  nodeChildren  = ((FolderNode) node).getChildren();
  Iterator it = nodeChildren.iterator();
  while(it.hasNext()) {
    Node h = (Node)it.next();
   l.add(new Handle(h));
  }						
  //return nodeChildren;
  return l;					
}

From my log I can see after each node is constructed, before displaying, function getContent(Handle) in

ContentManager

is called. How to avoid this?

Thanks,

Ray