mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. 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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user