org.alfresco.web.bean.clipboard
Class AVMClipboardItem

java.lang.Object
  extended by org.alfresco.web.bean.clipboard.AVMClipboardItem
All Implemented Interfaces:
java.io.Serializable, ClipboardItem

public class AVMClipboardItem
extends java.lang.Object

Class representing an 'avm' store protocol clipboard item

See Also:
Serialized Form

Field Summary
protected  org.alfresco.service.cmr.avm.AVMService avmService
           
protected static org.apache.commons.logging.Log logger
           
protected  ClipboardStatus mode
           
protected static java.lang.String MSG_COPY_OF
           
protected  org.alfresco.service.cmr.repository.NodeRef parent
           
protected  org.alfresco.service.cmr.repository.NodeRef ref
           
 
Constructor Summary
AVMClipboardItem(org.alfresco.service.cmr.repository.NodeRef ref, ClipboardStatus mode)
           
 
Method Summary
 boolean canCopyToViewId(java.lang.String viewId)
           
 boolean canMoveToViewId(java.lang.String viewId)
           
protected  boolean checkExists(java.lang.String name, org.alfresco.service.cmr.repository.NodeRef parent)
           
 boolean equals(java.lang.Object obj)
          Override equals() to compare NodeRefs
protected  org.alfresco.service.cmr.avm.AVMService getAvmService()
           
 java.lang.String getIcon()
           
 ClipboardStatus getMode()
           
 java.lang.String getName()
           
 org.alfresco.service.cmr.repository.NodeRef getNodeRef()
           
 org.alfresco.service.cmr.repository.NodeRef getParent()
           
protected  org.alfresco.service.ServiceRegistry getServiceRegistry()
           
 org.alfresco.service.namespace.QName getType()
           
 int hashCode()
          Override hashCode() to use the internal NodeRef hashcode instead
 boolean paste(javax.faces.context.FacesContext fc, java.lang.String viewId, int action)
           
protected  void recursiveFormCheck(org.alfresco.service.cmr.avm.AVMNodeDescriptor desc)
           
 void setAvmService(org.alfresco.service.cmr.avm.AVMService avmService)
           
 boolean supportsLink()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.commons.logging.Log logger

MSG_COPY_OF

protected static final java.lang.String MSG_COPY_OF
See Also:
Constant Field Values

ref

protected org.alfresco.service.cmr.repository.NodeRef ref

parent

protected org.alfresco.service.cmr.repository.NodeRef parent

mode

protected ClipboardStatus mode

avmService

protected transient org.alfresco.service.cmr.avm.AVMService avmService
Constructor Detail

AVMClipboardItem

public AVMClipboardItem(org.alfresco.service.cmr.repository.NodeRef ref,
                        ClipboardStatus mode)
Parameters:
ref -
mode -
Method Detail

supportsLink

public boolean supportsLink()
Returns:
true if the item on the clipboard supports linking (.url) as a link type
See Also:
ClipboardItem.supportsLink()

canCopyToViewId

public boolean canCopyToViewId(java.lang.String viewId)
Parameters:
viewId - JSF View Id to check against
Returns:
true if the clipboard item can be Copy pasted to the specified JSF view
See Also:
ClipboardItem.canCopyToViewId(java.lang.String)

canMoveToViewId

public boolean canMoveToViewId(java.lang.String viewId)
Parameters:
viewId - JSF View Id to check against
Returns:
true if the clipboard item can be Move pasted to the specified JSF view
See Also:
ClipboardItem.canMoveToViewId(java.lang.String)

paste

public boolean paste(javax.faces.context.FacesContext fc,
                     java.lang.String viewId,
                     int action)
              throws java.lang.Throwable
Parameters:
fc - FacesContext
viewId - JSF View Id to paste into
action - Clipboard action constant (@see org.alfresco.web.ui.repo.component.shelf.UIClipboardShelfItem)
Returns:
true on successful paste, false otherwise
Throws:
java.lang.Throwable - on fatal error during paste
See Also:
ClipboardItem.paste(javax.faces.context.FacesContext, java.lang.String, int)

setAvmService

public void setAvmService(org.alfresco.service.cmr.avm.AVMService avmService)

getAvmService

protected org.alfresco.service.cmr.avm.AVMService getAvmService()

getMode

public ClipboardStatus getMode()
Specified by:
getMode in interface ClipboardItem
Returns:
the mode status of the clipboard item, the enum can be either Cut or Copy

getName

public java.lang.String getName()
Specified by:
getName in interface ClipboardItem
Returns:
display label (cm:name) of the clipboard item

getType

public org.alfresco.service.namespace.QName getType()
Specified by:
getType in interface ClipboardItem
Returns:
QName type of the clipboard item

getIcon

public java.lang.String getIcon()
Specified by:
getIcon in interface ClipboardItem
Returns:
the app:icon property of the clipboard item

getNodeRef

public org.alfresco.service.cmr.repository.NodeRef getNodeRef()
Specified by:
getNodeRef in interface ClipboardItem
Returns:
the NodeRef of the clipboard item

getParent

public org.alfresco.service.cmr.repository.NodeRef getParent()

equals

public boolean equals(java.lang.Object obj)
Override equals() to compare NodeRefs

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Override hashCode() to use the internal NodeRef hashcode instead

Overrides:
hashCode in class java.lang.Object

getServiceRegistry

protected org.alfresco.service.ServiceRegistry getServiceRegistry()

checkExists

protected boolean checkExists(java.lang.String name,
                              org.alfresco.service.cmr.repository.NodeRef parent)

recursiveFormCheck

protected void recursiveFormCheck(org.alfresco.service.cmr.avm.AVMNodeDescriptor desc)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.