org.openlca.collaboration.client.ServerCheckInvocation Maven / Gradle / Ivy
package org.openlca.collaboration.client;
import org.openlca.collaboration.client.WebRequests.Type;
import com.google.gson.JsonObject;
class ServerCheckInvocation extends Invocation {
ServerCheckInvocation() {
super(Type.GET, "public", JsonObject.class);
}
@Override
protected Boolean process(JsonObject currentUser) {
return currentUser != null && currentUser.get("id") != null && currentUser.get("id").isJsonPrimitive()
&& currentUser.get("id").getAsLong() == 0l;
}
}