Package de.fu_berlin.inf.dpp.activities.business

Examples of de.fu_berlin.inf.dpp.activities.business.ChecksumActivity


                    final DocumentChecksum checksum = new DocumentChecksum(path);
                    checksum.bind(doc);
                    checksum.update();
                    Utils.runSafeSWTSync(log, new Runnable() {
                        public void run() {
                            sarosSession.activityCreated(new ChecksumActivity(
                                user, path, checksum.getHash(), checksum
                                    .getLength()));
                        }
                    });
                } catch (CoreException e) {
View Full Code Here


    public boolean existsFile() {
        return !(this.length == NON_EXISTING_DOC && this.hash == NON_EXISTING_DOC);
    }

    public IActivity getActivity(ISarosSession sarosSession) {
        return new ChecksumActivity(sarosSession.getUser(source),
            path.toSPath(sarosSession), hash, length, jupiterTimestamp);
    }
View Full Code Here

            if (jid.equals(source.getJID()))
                continue;

            Jupiter remoteProxy = entry.getValue();

            ChecksumActivity timestamped = checksumActivity
                .withTimestamp(remoteProxy.getTimestamp());
            result.put(jid, timestamped);
        }

        return result;
View Full Code Here

                     */
                    checksum.bind(doc);
                    checksum.update();

                    // Sent an checksum to everybody
                    ChecksumActivity checksumActivity = new ChecksumActivity(
                        sarosSession.getLocalUser(), checksum.getPath(),
                        checksum.getHash(), checksum.getLength());

                    sarosSession.activityCreated(checksumActivity);

View Full Code Here

            log.warn("Session already ended. Cannot perform consistency check",
                new StackTrace());
            return false;
        }

        ChecksumActivity checksumActivityDataObject = latestChecksums.get(path);
        if (checksumActivityDataObject != null) {
            performCheck(checksumActivityDataObject);
            return true;
        } else {
            return false;
View Full Code Here

                log.error("Unknown buddy in transformation result: "
                    + Utils.prefix(jid));
                continue;
            }

            ChecksumActivity transformed = entry.getValue();

            result.add(new QueueItem(to, transformed));
        }
        return result;
    }
View Full Code Here

                && remoteUsersWithReadOnlyAccess.size() > 0) {
                result.add(new QueueItem(remoteUsersWithReadOnlyAccess,
                    activity));
            }
        } else if (activity instanceof ChecksumActivity) {
            ChecksumActivity checksumActivityDataObject = (ChecksumActivity) activity;

            /**
             * Only the host can generate Checksums
             */
            assert sarosSession.isHost();
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.activities.business.ChecksumActivity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.