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

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


            throw new IllegalStateException(
                "Stop cannot be called without a shared project");

        // Creating StopActivity for asking user to stop
        User localUser = sarosSession.getLocalUser();
        final StopActivity stopActivity = new StopActivity(localUser,
            localUser, user, Type.LOCKREQUEST, State.INITIATED,
            new SimpleDateFormat("HHmmssSS").format(new Date())
                + random.nextLong());

        StartHandle handle = generateStartHandle(stopActivity);
        addStartHandle(handle);

        // Short cut if affected user is local
        if (user.isLocal()) {
            Utils.runSafeSWTSync(log, new Runnable() {
                public void run() {
                    lockProject(true);
                }
            });
            return handle;
        }

        StopActivity expectedAck = stopActivity.generateAcknowledgment(user);
        expectedAcknowledgments.add(expectedAck);

        Utils.runSafeSWTSync(log, new Runnable() {
            public void run() {
                fireActivity(stopActivity);
View Full Code Here


            return;
        }

        startsToBeAcknowledged.put(handle.getHandleID(), handle);

        final StopActivity activity = new StopActivity(
            sarosSession.getLocalUser(), sarosSession.getLocalUser(),
            handle.getUser(), Type.UNLOCKREQUEST, State.INITIATED,
            handle.getHandleID());

        Utils.runSafeSWTSync(log, new Runnable() {
View Full Code Here

        sb.append(", src: " + getSource() + ")");
        return sb.toString();
    }

    public IActivity getActivity(ISarosSession sarosSession) {
        return new StopActivity(sarosSession.getUser(source), sarosSession
            .getUser(initiator), sarosSession.getUser(user), type, state,
            stopActivityID);
    }
View Full Code Here

TOP

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

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.