Search in sources :

Example 6 with DataGridPageContext

use of com.emc.metalnx.core.domain.entity.DataGridPageContext in project metalnx-web by irods-contrib.

the class TestMetadataCase method assertMetadataSearch.

private void assertMetadataSearch(int expectedNumOfFiles, int expectedNumOfMatchesByFile) throws DataGridConnectionRefusedException {
    objs = metadataService.findByMetadata(search, new DataGridPageContext(), 1, 100);
    assertTrue(objs.size() >= expectedNumOfFiles);
    for (DataGridCollectionAndDataObject obj : objs) {
        assertTrue(obj.isVisibleToCurrentUser());
        assertFalse(obj.isCollection());
        assertEquals(expectedNumOfMatchesByFile, obj.getNumberOfMatches());
    }
}
Also used : DataGridPageContext(com.emc.metalnx.core.domain.entity.DataGridPageContext) DataGridCollectionAndDataObject(com.emc.metalnx.core.domain.entity.DataGridCollectionAndDataObject)

Aggregations

DataGridCollectionAndDataObject (com.emc.metalnx.core.domain.entity.DataGridCollectionAndDataObject)6 DataGridPageContext (com.emc.metalnx.core.domain.entity.DataGridPageContext)6 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)5 DataGridConnectionRefusedException (com.emc.metalnx.core.domain.exceptions.DataGridConnectionRefusedException)3 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 HashMap (java.util.HashMap)3 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)3 DataGridFilePropertySearch (com.emc.metalnx.core.domain.entity.DataGridFilePropertySearch)2 DataGridMetadataSearch (com.emc.metalnx.core.domain.entity.DataGridMetadataSearch)2 DataGridException (com.emc.metalnx.core.domain.exceptions.DataGridException)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 IOException (java.io.IOException)2 SimpleDateFormat (java.text.SimpleDateFormat)2 Date (java.util.Date)2 ServletOutputStream (javax.servlet.ServletOutputStream)2 FileNotFoundException (org.irods.jargon.core.exception.FileNotFoundException)2 JargonException (org.irods.jargon.core.exception.JargonException)2 IconObject (com.emc.metalnx.core.domain.entity.IconObject)1 DataGridSearchOperatorEnum (com.emc.metalnx.core.domain.entity.enums.DataGridSearchOperatorEnum)1