projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move unliking a post from Sone to Post.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
impl
/
AbstractSoneBuilder.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/impl/AbstractSoneBuilder.java
b/src/main/java/net/pterodactylus/sone/data/impl/AbstractSoneBuilder.java
index
140fbd5
..
878ba8d
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/impl/AbstractSoneBuilder.java
+++ b/
src/main/java/net/pterodactylus/sone/data/impl/AbstractSoneBuilder.java
@@
-2,6
+2,7
@@
package net.pterodactylus.sone.data.impl;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Preconditions.checkState;
+import net.pterodactylus.sone.data.Client;
import net.pterodactylus.sone.database.SoneBuilder;
import net.pterodactylus.sone.freenet.wot.Identity;
import net.pterodactylus.sone.database.SoneBuilder;
import net.pterodactylus.sone.freenet.wot.Identity;
@@
-17,6
+18,7
@@
public abstract class AbstractSoneBuilder implements SoneBuilder {
protected String id;
protected boolean local;
protected String id;
protected boolean local;
+ protected Client client;
@Override
public SoneBuilder by(String id) {
@Override
public SoneBuilder by(String id) {
@@
-30,8
+32,15
@@
public abstract class AbstractSoneBuilder implements SoneBuilder {
return this;
}
return this;
}
+ @Override
+ public SoneBuilder using(Client client) {
+ this.client = client;
+ return this;
+ }
+
protected void validate() throws IllegalStateException {
checkState(id != null, "id must not be null");
protected void validate() throws IllegalStateException {
checkState(id != null, "id must not be null");
+ checkState(client != null, "client must not be null");
}
}
}
}