02-22-2010 05:56 PM
02-23-2010 09:23 AM
/**
* 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();
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.