As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
/** * number of documents having parent's folder as pSrcNodeRef and of type pType<br> * * @param pType * Type de document à retourner * @param pSrcNodeRef * Dossier source où sont les documents * @return number of doc. in pSrcFolder of type pType */ public Integer getDocumentListCount(QName pType, NodeRef pSrcNodeRef) { MscValidateUtil.validateNotNull( pType ); MscValidateUtil.validateNotNull( pSrcNodeRef ); MscValidateUtil.validate( Arrays.asList( pSrcNodeRef ), ContentModel.TYPE_FOLDER, nodeService ); String lSrcFolderName = (String) nodeService.getProperty( pSrcNodeRef, ContentModel.PROP_NAME ); ResultSet lResultSet = searchService.query( MscStoreEnum.WORKSPACE_SPACES_STORE.getStoreRef(), SearchService.LANGUAGE_LUCENE, "+PATH:\"/app:company_home/cm:" + lSrcFolderName + "/*\"" + " +TYPE:\"" + pType + "\"" ); lResultSet.getResultSetMetaData().getSearchParameters().setLimitBy( LimitBy.UNLIMITED ); return lResultSet.length(); }