org.alfresco.repo.jscript
Class AVMNode

java.lang.Object
  extended by org.alfresco.repo.jscript.ScriptNode
      extended by org.alfresco.repo.jscript.AVMNode
All Implemented Interfaces:
java.io.Serializable, Scopeable, org.alfresco.service.namespace.NamespacePrefixResolverProvider

public class AVMNode
extends ScriptNode

Represents a AVM specific node in the Script context. Provides specific implementations of AVM specific methods such as copy, move, rename etc.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.alfresco.repo.jscript.ScriptNode
ScriptNode.NodeValueConverter, ScriptNode.ScriptContentData
 
Field Summary
 
Fields inherited from class org.alfresco.repo.jscript.ScriptNode
aspects, converter, id, imageResolver, nodeRef, parent, scope, services, siteName, siteNameResolved
 
Constructor Summary
AVMNode(org.alfresco.service.cmr.repository.NodeRef nodeRef, ServiceRegistry services)
           
AVMNode(org.alfresco.service.cmr.repository.NodeRef nodeRef, ServiceRegistry services, org.mozilla.javascript.Scriptable scope)
           
AVMNode(java.lang.String path, int version, ServiceRegistry services, org.mozilla.javascript.Scriptable scope)
           
 
Method Summary
 ScriptNode copy(ScriptNode destination)
          Copy this Node into a new parent destination.
 ScriptNode copy(java.lang.String destination)
          Copy this Node into a new parent destination.
 java.util.Set getAspectsSet()
           
 boolean getIsLocked()
           
 java.lang.String getName()
           
 java.lang.String getParentPath()
           
 java.lang.String getPath()
           
 java.lang.String getType()
           
 int getVersion()
           
 boolean hasLockAccess()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isLockOwner()
           
 boolean move(ScriptNode destination)
          Move this Node to a new parent destination node.
 boolean move(java.lang.String destination)
          Move this Node to a new parent destination path.
 ScriptNode newInstance(org.alfresco.service.cmr.repository.NodeRef nodeRef, ServiceRegistry services, org.mozilla.javascript.Scriptable scope)
          Factory methods
 ScriptNode newInstance(java.lang.String path, int version, ServiceRegistry services, org.mozilla.javascript.Scriptable scope)
           
 boolean rename(java.lang.String name)
          Rename this node to the specified name
 java.lang.String toString()
          Override Object.toString() to provide useful debug output
 
Methods inherited from class org.alfresco.repo.jscript.ScriptNode
addAspect, addAspect, addNode, addTag, addTags, cancelCheckout, checkin, checkin, checkin, checkout, checkout, checkoutForUpload, childByNamePath, childFileFolders, childFileFolders, childFileFolders, childFileFolders, childFileFolders, childrenByTags, childrenByXPath, clearTags, copy, createAssociation, createFile, createFile, createFolder, createFolder, createNode, createNode, createNode, createNode, createNode, createQName, createThumbnail, createThumbnail, createValueConverter, createVersion, ensureVersioningEnabled, equals, exists, getActiveWorkflows, getAspects, getAssociations, getAssocs, getChildAssociations, getChildAssocs, getChildAssocsByType, getChildren, getContent, getCrossRepositoryCopyHelper, getDirectPermissions, getDisplayPath, getDownloadUrl, getFullPermissions, getHasChildren, getIcon16, getIcon32, getId, getIsCategory, getIsContainer, getIsDocument, getIsLinkToContainer, getIsLinkToDocument, getIsTagScope, getIsVersioned, getMimetype, getNamespacePrefixResolver, getNodeRef, getOwner, getParent, getParentAssociations, getParentAssocs, getParents, getPermissions, getPrimaryParentAssoc, getProperties, getPropertyNames, getQnamePath, getQNameType, getSettablePermissions, getShortQName, getSiteShortName, getSize, getSourceAssociations, getSourceAssocs, getStoreId, getStoreType, getTags, getTagScope, getThumbnail, getThumbnailDefintions, getThumbnails, getTypePropertyNames, getTypePropertyNames, getTypeShort, getUrl, getValueConverter, getVersion, getVersionHistory, getWebdavUrl, hasAspect, hashCode, hasPermission, inheritsPermissions, isScriptContent, isSubType, jsGet_downloadUrl, move, newInstance, processTemplate, processTemplate, processTemplate, processTemplate, remove, removeAspect, removeAssociation, removeNode, removePermission, removePermission, removeTag, removeTags, reset, retrieveAllSetPermissions, revert, revert, save, setContent, setInheritsPermissions, setIsTagScope, setMimetype, setName, setOwner, setPermission, setPermission, setScope, setTags, specializeType, takeOwnership, toJSON, toJSON, transformDocument, transformDocument, transformImage, transformImage, transformImage, transformImage
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AVMNode

public AVMNode(org.alfresco.service.cmr.repository.NodeRef nodeRef,
               ServiceRegistry services)

AVMNode

public AVMNode(org.alfresco.service.cmr.repository.NodeRef nodeRef,
               ServiceRegistry services,
               org.mozilla.javascript.Scriptable scope)

AVMNode

public AVMNode(java.lang.String path,
               int version,
               ServiceRegistry services,
               org.mozilla.javascript.Scriptable scope)
Method Detail

newInstance

public ScriptNode newInstance(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                              ServiceRegistry services,
                              org.mozilla.javascript.Scriptable scope)
Factory methods

Overrides:
newInstance in class ScriptNode

newInstance

public ScriptNode newInstance(java.lang.String path,
                              int version,
                              ServiceRegistry services,
                              org.mozilla.javascript.Scriptable scope)

getPath

public java.lang.String getPath()
Returns:
the full AVM Path to this node

getVersion

public int getVersion()

getParentPath

public java.lang.String getParentPath()
Returns:
AVM path to the parent node

getType

public java.lang.String getType()
Overrides:
getType in class ScriptNode
Returns:
QName type of this node

isDirectory

public boolean isDirectory()

isFile

public boolean isFile()

getName

public java.lang.String getName()
Overrides:
getName in class ScriptNode
Returns:
Helper to return the 'name' property for the node

getIsLocked

public boolean getIsLocked()
Overrides:
getIsLocked in class ScriptNode
Returns:
true if the node is currently locked

isLockOwner

public boolean isLockOwner()
Returns:
true if this node is locked and the current user is the lock owner

hasLockAccess

public boolean hasLockAccess()
Returns:
true if this user can perform operations on the node when locked. This is true if the item is either unlocked, or locked and the current user is the lock owner, or locked and the current user has Content Manager role in the associated web project.

copy

public ScriptNode copy(ScriptNode destination)
Copy this Node into a new parent destination.

Overrides:
copy in class ScriptNode
Parameters:
destination - Parent node for the copy
Returns:
the copy of this node

copy

public ScriptNode copy(java.lang.String destination)
Copy this Node into a new parent destination.

Parameters:
destination - Parent path for the copy
Returns:
the copy of this node

move

public boolean move(ScriptNode destination)
Move this Node to a new parent destination node.

Overrides:
move in class ScriptNode
Parameters:
destination - Node
Returns:
true on successful move, false on failure to move.

move

public boolean move(java.lang.String destination)
Move this Node to a new parent destination path.

Parameters:
destination - Path
Returns:
true on successful move, false on failure to move.

rename

public boolean rename(java.lang.String name)
Rename this node to the specified name

Parameters:
name - New name for the node
Returns:
true on success, false otherwise

getAspectsSet

public java.util.Set getAspectsSet()
Overrides:
getAspectsSet in class ScriptNode
Returns:
The list of aspects applied to this node

toString

public java.lang.String toString()
Description copied from class: ScriptNode
Override Object.toString() to provide useful debug output

Overrides:
toString in class ScriptNode


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