FederatedStore extends Store { public void addGraphs(final Set<String> graphAuths, final String addingUserId, final boolean isPublic, final GraphSerialisable... graphs) throws StorageException { addGraphs(graphAuths, addingUserId, isPublic, FederatedGraphStorage.DEFAULT_DISABLED_BY_DEFAULT, graphs); } FederatedStore(); @Override void initialise(final String graphId, final Schema unused, final StoreProperties properties); @Override void setGraphLibrary(final GraphLibrary library); @Override FederatedStoreProperties getProperties(); @Deprecated static OP updateOperationForGraph(final OP operation, final Graph graph); void addGraphs(final Set<String> graphAuths, final String addingUserId, final boolean isPublic, final GraphSerialisable... graphs); void addGraphs(
            final Set<String> graphAuths,
            final String addingUserId,
            final boolean isPublic,
            final boolean disabledByDefault,
            final GraphSerialisable... graphs); void addGraphs(
            final Set<String> graphAuths,
            final String addingUserId,
            final boolean isPublic,
            final boolean disabledByDefault,
            final AccessPredicate readAccessPredicate,
            final AccessPredicate writeAccessPredicate,
            final GraphSerialisable... graphs); void addGraphs(final FederatedAccess access, final GraphSerialisable... graphs); @Deprecated void addGraphs(final Set<String> graphAuths, final String addingUserId, final GraphSerialisable... graphs); boolean remove(final String graphId, final User user); boolean remove(final String graphId, final User user, final boolean asAdmin); Collection<String> getAllGraphIds(final User user); Collection<String> getAllGraphIds(final User user, final boolean asAdmin); @Override Schema getSchema(); Schema getSchema(final GetSchema operation, final Context context); Schema getSchema(final Operation operation, final Context context); Schema getSchema(final Map<String, String> config, final Context context); Schema getSchema(final Operation operation, final User user); Schema getSchema(final Map<String, String> config, final User user); @Override Set<StoreTrait> getTraits(); Set<StoreTrait> getTraits(final GetTraits getTraits, final Context context); Collection<Graph> getGraphs(final User user, final String graphIdsCsv, final Operation operation); Map<String, Object> getAllGraphsAndAuths(final User user, final String graphIdsCsv); Map<String, Object> getAllGraphsAndAuths(final User user, final String graphIdsCsv, final boolean isAdmin); boolean isLimitedToLibraryProperties(final User user); boolean changeGraphAccess(final User requestingUser, final String graphId, final FederatedAccess federatedAccess, final boolean isAdmin); boolean changeGraphId(final User requestingUser, final String graphId, final String newGraphId, final boolean isAdmin);  }
@Test public void shouldFederatedIfUserHasCorrectAuths() throws Exception { store.addGraphs(GRAPH_AUTHS, null, false, new GraphSerialisable.Builder() .config(new GraphConfig.Builder() .graphId(ACC_ID_2) .build()) .properties(PROPERTIES_ALT) .schema(getSchemaFromPath(PATH_BASIC_ENTITY_SCHEMA_JSON)) .build()); final CloseableIterable<? extends Element> elements = store.execute(new GetAllElements(), new Context(new User.Builder() .userId(blankUser.getUserId()) .opAuth(ALL_USERS) .build())); assertFalse(elements.iterator().hasNext()); final CloseableIterable<? extends Element> elements2 = store.execute(new GetAllElements(), new Context(new User.Builder() .userId(blankUser.getUserId()) .opAuths("x") .build())); assertEquals(0, Iterables.size(elements2)); }