. First part of the Clipboard UI refactoring ready for AVM node support

- Clipboard actions now based on NodeRef not "id"
 - Added notion of "workspace" and "AVM" specific clipboard items
 - Clipboard bean supports creating different ClipboardItem types (workspace or avm)
. ActionLink parameters are now "toString()"ed rather than assumed String
. Optimization to Portal Tree Navigator support

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4924 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-01-24 18:41:49 +00:00
parent d40af2be67
commit bd25cfa86f
10 changed files with 294 additions and 141 deletions

View File

@@ -16,53 +16,32 @@
*/
package org.alfresco.web.bean.clipboard;
import javax.faces.context.FacesContext;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/**
* Simple class representing a single item added to the clipboard.
*
* @author Kevin Roast
*/
public class ClipboardItem
public interface ClipboardItem
{
/**
* Constructor
*
* @param node The node on the clipboard
* @param mode The ClipboardStatus enum value
*/
public ClipboardItem(Node node, ClipboardStatus mode)
{
this.Node = node;
this.Mode = mode;
}
public ClipboardStatus getMode();
/**
* Override equals() to compare NodeRefs
*/
public boolean equals(Object obj)
{
if (obj == this)
{
return true;
}
if (obj instanceof ClipboardItem)
{
return ((ClipboardItem)obj).Node.getNodeRef().equals(Node.getNodeRef());
}
else
{
return false;
}
}
public String getName();
/**
* Override hashCode() to use the internal NodeRef hashcode instead
*/
public int hashCode()
{
return Node.getNodeRef().hashCode();
}
public QName getType();
public String getIcon();
public Node Node;
public ClipboardStatus Mode;
public String getId();
public NodeRef getNodeRef();
}