git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/branches/data-access/storagehub-webapp/1.0@169385 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
165edfc2d1
commit
75d9f828ee
|
@ -19,6 +19,7 @@ import javax.jcr.observation.Event;
|
|||
import javax.jcr.observation.EventJournal;
|
||||
import javax.jcr.query.Query;
|
||||
|
||||
import org.gcube.common.storagehub.model.NodeConstants;
|
||||
import org.gcube.common.storagehub.model.items.Item;
|
||||
import org.gcube.data.access.storagehub.Constants;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -59,7 +60,7 @@ public class VREQueryRetriever implements Callable<List<Item>> {
|
|||
NodeIterator it = jcrQuery.execute().getNodes();
|
||||
logger.trace("query for recents took {}",System.currentTimeMillis()-start);
|
||||
while (it.hasNext())
|
||||
cachedList.add(ItemHandler.getItem(it.nextNode(), Arrays.asList("hl:accounting")));
|
||||
cachedList.add(ItemHandler.getItem(it.nextNode(), Arrays.asList(NodeConstants.ACCOUNTING_NAME)));
|
||||
logger.trace("creating objects took {}",System.currentTimeMillis()-start);
|
||||
if (cachedList.size()<=10) return cachedList;
|
||||
else return cachedList.subList(0, 10);
|
||||
|
@ -95,7 +96,7 @@ public class VREQueryRetriever implements Callable<List<Item>> {
|
|||
logger.trace("event property changed on {} with value {} and parent {}",property.getName(), property.getValue().getString(), property.getParent().getPath());
|
||||
String identifier = property.getParent().getIdentifier();
|
||||
cachedList.removeIf(i -> i.getId().equals(identifier));
|
||||
Item item = ItemHandler.getItem(property.getParent(), Arrays.asList("hl:accounting"));
|
||||
Item item = ItemHandler.getItem(property.getParent(), Arrays.asList(NodeConstants.ACCOUNTING_NAME));
|
||||
insertItemInTheRightPlace(item);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue