Пример #1
0
  public List<TemplateNode> getChildren(NodeRef node, String types) {
    List<TemplateNode> results = new ArrayList<TemplateNode>();
    PagedResults pagedDocs = queryChildren(node, types);

    CMISResultSet resultSet = (CMISResultSet) pagedDocs.getResult();

    for (NodeRef nodeRef : resultSet.getNodeRefs()) {
      TemplateNode tnode =
          new TemplateNode(nodeRef, serviceRegistry, imageResolver.getImageResolver());
      if (tnode.getIsDocument()) {
        if (logger.isDebugEnabled()) {
          logger.debug("add result :" + tnode.getNodeRef());
        }
        results.add(tnode);
      }
    }

    PagedResults pagedFolders = queryChildren(node, FOLDER);
    CMISResultSet resultSetFolders = (CMISResultSet) pagedFolders.getResult();
    for (NodeRef nodeRef : resultSetFolders.getNodeRefs()) {
      // folder
      if (logger.isDebugEnabled()) {
        logger.debug("search in folder ..." + nodeRef);
      }
      List<TemplateNode> tmp = getChildren(nodeRef, types);
      results.addAll(tmp);
    }
    return results;
  }
Пример #2
0
 /** Construct */
 public CMISAssocsMethod(
     CMISServices cmisService,
     RepositoryImageResolver imageResolver,
     TemplateValueConverter templateValueConverter) {
   this.cmisService = cmisService;
   this.imageResolver = imageResolver.getImageResolver();
   this.templateValueConverter = templateValueConverter;
 }