projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'feature/update-about-sone' into next
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
database
/
SoneProvider.java
diff --git
a/src/main/java/net/pterodactylus/sone/database/SoneProvider.java
b/src/main/java/net/pterodactylus/sone/database/SoneProvider.java
index
f484aaf
..
73467a2
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/database/SoneProvider.java
+++ b/
src/main/java/net/pterodactylus/sone/database/SoneProvider.java
@@
-19,17
+19,23
@@
package net.pterodactylus.sone.database;
import java.util.Collection;
import java.util.Collection;
+import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.data.Sone;
+import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.common.base.Optional;
+import com.google.inject.ImplementedBy;
/**
* Interface for objects that can provide {@link Sone}s by their ID.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
/**
* Interface for objects that can provide {@link Sone}s by their ID.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
+@ImplementedBy(Core.class)
public interface SoneProvider {
public interface SoneProvider {
+ Function<String, Optional<Sone>> soneLoader();
+
/**
* Returns the Sone with the given ID, or {@link Optional#absent()} if it
* does not exist.
/**
* Returns the Sone with the given ID, or {@link Optional#absent()} if it
* does not exist.
@@
-47,4
+53,18
@@
public interface SoneProvider {
*/
public Collection<Sone> getSones();
*/
public Collection<Sone> getSones();
+ /**
+ * Returns all local Sones.
+ *
+ * @return All local Sones
+ */
+ public Collection<Sone> getLocalSones();
+
+ /**
+ * Returns all remote Sones.
+ *
+ * @return All remote Sones
+ */
+ public Collection<Sone> getRemoteSones();
+
}
}