use of org.structr.net.data.time.PseudoTime in project structr by structr.
the class Delete method deserialize.
@Override
public void deserialize(final DataInputStream dis) throws IOException {
super.deserialize(dis);
// dis.readUTF();
this.objectId = deserializeUUID(dis);
this.time = new PseudoTime();
time.deserialize(dis);
}
use of org.structr.net.data.time.PseudoTime in project structr by structr.
the class Get method deserialize.
@Override
public void deserialize(final DataInputStream dis) throws IOException {
super.deserialize(dis);
// dis.readUTF();
this.recipient = deserializeUUID(dis);
// dis.readUTF();
this.objectId = deserializeUUID(dis);
// dis.readUTF();
this.transactionId = deserializeUUID(dis);
this.key = dis.readUTF();
this.time = new PseudoTime();
time.deserialize(dis);
}
use of org.structr.net.data.time.PseudoTime in project structr by structr.
the class GetHistory method deserialize.
@Override
public void deserialize(final DataInputStream dis) throws IOException {
super.deserialize(dis);
// dis.readUTF();
this.recipient = deserializeUUID(dis);
// dis.readUTF();
this.objectId = deserializeUUID(dis);
this.instant = new PseudoTime();
instant.deserialize(dis);
}
use of org.structr.net.data.time.PseudoTime in project structr by structr.
the class GetHistory method onMessage.
@Override
public void onMessage(Peer peer, PeerInfo sender) {
if (peer.getUuid().equals(recipient)) {
final RepositoryObject obj = peer.getRepository().getObject(objectId);
if (obj != null) {
final PseudoTime lastModified = obj.getLastModificationTime();
if (lastModified.before(instant)) {
final Map<String, Object> data = obj.getProperties(instant);
peer.log("History(", objectId, ")");
peer.broadcast(new History(peer.getUuid(), getSender(), objectId, obj.getType(), obj.getUserId(), obj.getCreationTime(), lastModified, data));
} else {
peer.log("GetHistory(", objectId, "): not modified");
}
} else {
peer.log("GetHistory(", objectId, "): object not found");
}
}
}
use of org.structr.net.data.time.PseudoTime in project structr by structr.
the class Inventory method deserialize.
@Override
public void deserialize(final DataInputStream dis) throws IOException {
super.deserialize(dis);
// dis.readUTF();
this.objectId = deserializeUUID(dis);
// dis.readUTF();
this.owner = deserializeUUID(dis);
this.lastModificationDate = new PseudoTime();
this.lastModificationDate.deserialize(dis);
}
Aggregations