Code Search for Developers
 
 
  

Operation.java from PeerWriter at Krugle


Show Operation.java syntax highlighted

package de.peerwriter.woot.operation;

import java.io.Serializable;

import de.peerwriter.woot.WootId;
import de.peerwriter.woot.WootDocument;

/**
 * @author molli
 */
public abstract class Operation implements Serializable {

	private WootId opid;

	// private transient WootDocument wootPage;

	private String pageName;

	// private String siteId;

	abstract public void execute(WootDocument page);

	abstract public boolean precond(WootDocument page);

	public WootId getOpid() {
		return opid;
	}

	public void setOpid(WootId opid) {
		this.opid = opid;
	}

	/*
	 * public WootDocument getWootPage() { return wootPage; }
	 * 
	 * public void setWootPage(WootDocument wootPage) { this.wootPage = wootPage; }
	 */

	/*
	 * public String getSiteId() { return siteId; }
	 * 
	 * public void setSiteId(String siteId) { this.siteId = siteId; }
	 */
	public String toString() {
		String s = " siteId: " + opid.getSiteid() + " opid: " + opid;
		return s;
	}

	/*
	 * public int compareTo(Object o){ return
	 * opid.compareTo(((Operation)o).getOpid()); }
	 */

	public boolean equals(Object o) {
		// assert o instanceof Operation;
		if (!(o instanceof Operation))
			return false;
		return this.getOpid().equals(((Operation) o).getOpid());

	}

	public String getPageName() {
		return pageName;
	}

	public void setPageName(String pageName) {
		this.pageName = pageName;
	}
}




See more files for this project here

PeerWriter

PeerWriter is a collaborative text editor. Multiple peers can edit the same document while they see overall changes in real-time. PeerWriter is based on a decentralized infrastructure, using a non-locking concurrency protocol ensuring global consistency.

Project homepage: http://sourceforge.net/projects/peerwriter
Programming language(s): Java,XML
License: gpl2

  Delete.java
  Insert.java
  Operation.java
  Patch.java
  Pool.java