mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 12:49:55 +01:00
Update blog backend to match current usage
This commit is contained in:
@@ -3,7 +3,6 @@ package org.briarproject.api.clients;
|
||||
import org.briarproject.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.api.sync.Group;
|
||||
import org.briarproject.api.sync.GroupId;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
@@ -12,28 +11,19 @@ import javax.annotation.concurrent.Immutable;
|
||||
public abstract class BaseGroup {
|
||||
|
||||
private final Group group;
|
||||
private final String name;
|
||||
|
||||
public BaseGroup(Group group, String name) {
|
||||
public BaseGroup(Group group) {
|
||||
this.group = group;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public GroupId getId() {
|
||||
return group.getId();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Group getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return group.hashCode();
|
||||
|
||||
@@ -10,13 +10,19 @@ import javax.annotation.concurrent.Immutable;
|
||||
@NotNullByDefault
|
||||
public abstract class NamedGroup extends BaseGroup {
|
||||
|
||||
private final String name;
|
||||
private final byte[] salt;
|
||||
|
||||
public NamedGroup(@NotNull Group group, @NotNull String name, byte[] salt) {
|
||||
super(group, name);
|
||||
super(group);
|
||||
this.name = name;
|
||||
this.salt = salt;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public byte[] getSalt() {
|
||||
return salt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user