@Override protected QueryResultList<Representation> performQuery(String siteId, FieldQuery query) throws SiteException { return siteManager.find(query); }
@Override public String toString() { return siteConfiguration != null ? siteConfiguration.getName() : null; }
@Override protected QueryResultList<String> query(FieldQuery query) throws EntityhubException { return siteManager.findIds(query); }
@Override protected Representation getRepresentation(Site site, String id, boolean offlineMode) throws EntityhubException { Entity entity = site.getEntity(id); return entity == null ? null : entity.getRepresentation(); } @Override
@Override public boolean supportsOfflineMode() { Site site = getSearchService(); //Do not throw an exception here if the site is not available. Just return false return site == null ? false : site.supportsLocalMode(); }
@Override protected Representation getRepresentation(SiteManager sm, String id, boolean offlineMode) throws EntityhubException { Entity entity = sm.getEntity(id); return entity == null ? null : entity.getRepresentation(); }
@Override protected FieldQuery createQuery() { return site.getQueryFactory().createFieldQuery(); } @Override
@Override public boolean equals(Object obj) { if (obj instanceof Site) { SiteConfiguration osc = ((Site) obj).getConfiguration(); // this will return false if one of the two sites is not activated // -> this should be OK return siteConfiguration != null && osc != null && getId().equals(osc.getId()); } else { return false; } }
public boolean supportsLocalMode() { return siteConfiguration.getCacheStrategy() == CacheStrategy.all && cache != null; }
@Override protected QueryResultList<String> query(FieldQuery query) throws EntityhubException { return site.findReferences(query); }
@Override public String getId() { return config.getId(); }
public String getId() { return siteConfiguration.getId(); }
@Override protected Representation getRepresentation(String id) throws EntityhubException { Entity entity = site.getEntity(id); return entity != null ? entity.getRepresentation():null; } @Override
@Override public boolean supportsOfflineMode() { Site site = getSearchService(); //Do not throw an exception here if the site is not available. Just return false return site == null ? false : site.supportsLocalMode(); }
@Override protected Representation getRepresentation(String id) throws EntityhubException { Entity entity = siteManager.getEntity(id); return entity != null ? entity.getRepresentation() : null; } @Override
@Override public boolean equals(Object obj) { if (obj instanceof Site) { SiteConfiguration osc = ((Site) obj).getConfiguration(); // this will return false if one of the two sites is not activated // -> this should be OK return siteConfiguration != null && osc != null && getId().equals(osc.getId()); } else { return false; } }
public boolean supportsLocalMode() { return siteConfiguration.getCacheStrategy() == CacheStrategy.all && cache != null; }
@Override public String toString() { return siteConfiguration != null ? siteConfiguration.getName() : null; }
public String getId() { return siteConfiguration.getId(); }
@Override public boolean supportsOfflineMode() { Site site = getService(); //Do not throw an exception here if the site is not available. Just return false return site == null ? false : site.supportsLocalMode(); }