protected Authorizations getAuthorizations(String workspaceId, String... otherAuthorizations) { if (isPublic(workspaceId) && (otherAuthorizations == null || otherAuthorizations.length == 0)) { return new InMemoryAuthorizations(VISIBILITY_STRING); } if (isPublic(workspaceId)) { return new InMemoryAuthorizations(ArrayUtils.add(otherAuthorizations, VISIBILITY_STRING)); } else if (otherAuthorizations == null || otherAuthorizations.length == 0) { return new InMemoryAuthorizations(VISIBILITY_STRING, workspaceId); } return new InMemoryAuthorizations(ArrayUtils.addAll(otherAuthorizations, VISIBILITY_STRING, workspaceId)); }
@Override public Authorizations createAuthorizations(String... auths) { addValidAuthorizations(auths); return new InMemoryAuthorizations(auths); }
@Override protected Authorizations createAuthorizations(String... auths) { return new InMemoryAuthorizations(auths); }
@Inject public InMemoryOntologyRepository( Graph graph, Configuration configuration, LockRepository lockRepository, CacheService cacheService ) throws Exception { super(configuration, lockRepository, cacheService); this.graph = graph; clearCache(); conceptsCache.put(PUBLIC_ONTOLOGY_CACHE_KEY, new HashMap<>()); relationshipsCache.put(PUBLIC_ONTOLOGY_CACHE_KEY, new HashMap<>()); propertiesCache.put(PUBLIC_ONTOLOGY_CACHE_KEY, new HashMap<>()); loadOntologies(getConfiguration(), new InMemoryAuthorizations(VISIBILITY_STRING)); }
authorizations = new InMemoryAuthorizations(VISIBILITY_SOURCE); configuration.putAll(getAdditionalConfiguration()); GraphPropertyWorkerPrepareData workerPrepareData = new GraphPropertyWorkerPrepareData(
authorizations = new InMemoryAuthorizations(VISIBILITY_SOURCE); configuration.putAll(getAdditionalConfiguration()); GraphPropertyWorkerPrepareData workerPrepareData = new GraphPropertyWorkerPrepareData(