/** {@inheritDoc} */ public void getNodes(NodeParameters nodeParameters, NodeQueryCallback callback) { if (enabled) { List<Node> nodes = solrDAO.getNodes(nodeParameters); for (Node node : nodes) { callback.handleNode(node); } } }
@Override public List<Acl> getAcls(List<Long> aclChangeSetIds, Long minAclId, int maxResults) { if (enabled) { List<Acl> acls = solrDAO.getAcls(aclChangeSetIds, minAclId, maxResults); return acls; } else { return Collections.<Acl>emptyList(); } }
@Override public List<Transaction> getTransactions( Long minTxnId, Long fromCommitTime, Long maxTxnId, Long toCommitTime, int maxResults) { if (enabled) { List<Transaction> txns = solrDAO.getTransactions(minTxnId, fromCommitTime, maxTxnId, toCommitTime, maxResults); return txns; } else { return Collections.<Transaction>emptyList(); } }
@Override public List<AclChangeSet> getAclChangeSets( Long minAclChangeSetId, Long fromCommitTime, Long maxAclChangeSetId, Long toCommitTime, int maxResults) { if (enabled) { List<AclChangeSet> changesets = solrDAO.getAclChangeSets( minAclChangeSetId, fromCommitTime, maxAclChangeSetId, toCommitTime, maxResults); return changesets; } else { return Collections.<AclChangeSet>emptyList(); } }
private String getTenant(long aclId, long aclChangeSetId) { String tenantDomain = getAclTenant(aclId); if (tenantDomain == null) { List<Long> aclChangeSetIds = new ArrayList<Long>(1); aclChangeSetIds.add(aclChangeSetId); List<Acl> acls = solrDAO.getAcls(aclChangeSetIds, null, 1024); for (Acl acl : acls) { tenantDomain = getAclTenant(acl.getId()); if (tenantDomain != null) { break; } } if (tenantDomain == null) { // tenant not found - log warning ? tenantDomain = null; // temp - for debug breakpoint only } } return tenantDomain; }