Package org.nuxeo.drive.adapter.impl
Class AbstractFileSystemItem
- java.lang.Object
-
- org.nuxeo.drive.adapter.impl.AbstractFileSystemItem
-
- All Implemented Interfaces:
Comparable<FileSystemItem>,FileSystemItem
- Direct Known Subclasses:
AbstractDocumentBackedFileSystemItem,AbstractVirtualFolderItem,SimpleFileSystemItem
public abstract class AbstractFileSystemItem extends Object implements FileSystemItem
Base class forFileSystemItemimplementations.- Author:
- Antoine Taillefer
- See Also:
AbstractDocumentBackedFileSystemItem,DefaultTopLevelFolderItem
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancanDeleteprotected booleancanRenameprotected CalendarcreationDateprotected Stringcreatorprotected StringfactoryNameInternal attributesstatic StringFILE_SYSTEM_ITEM_ID_SEPARATORstatic StringFILE_SYSTEM_ITEM_PATH_SEPARATORprotected booleanfolderprotected StringidFileSystemItemattributesprotected StringlastContributorprotected CalendarlastModificationDateprotected LocklockInfoprotected Stringnameprotected StringparentIdprotected Stringpathprotected NuxeoPrincipalprincipalprotected StringuserNameNeeded for JSON serialization/deserialization since we don't serialize the principal
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFileSystemItem()protectedAbstractFileSystemItem(String factoryName, NuxeoPrincipal principal, boolean relaxSyncRootConstraint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(FileSystemItem other)booleanequals(Object obj)booleangetCanDelete()booleangetCanRename()CalendargetCreationDate()StringgetCreator()protected FileSystemItemAdapterServicegetFileSystemItemAdapterService()StringgetId()Gets a unique id generated server-side.StringgetLastContributor()CalendargetLastModificationDate()LockgetLockInfo()StringgetName()Gets the name displayed in the file system.StringgetParentId()Gets the parentFileSystemItemid.StringgetPath()A concatenation of ancestor ids with '/' as prefix and separator.StringgetUserName()inthashCode()booleanisFolder()protected voidsetCanDelete(boolean canDelete)protected voidsetCanRename(boolean canRename)protected voidsetCreationDate(Calendar creationDate)protected voidsetCreator(String creator)protected voidsetFolder(boolean isFolder)protected voidsetId(String id)protected voidsetLastContributor(String lastContributor)protected voidsetLastModificationDate(Calendar lastModificationDate)protected voidsetLockInfo(Lock lockInfo)protected voidsetName(String name)protected voidsetParentId(String parentId)protected voidsetPath(String path)protected voidsetUserName(String userName)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.drive.adapter.FileSystemItem
canMove, delete, move, rename
-
-
-
-
Field Detail
-
FILE_SYSTEM_ITEM_ID_SEPARATOR
public static final String FILE_SYSTEM_ITEM_ID_SEPARATOR
- See Also:
- Constant Field Values
-
FILE_SYSTEM_ITEM_PATH_SEPARATOR
public static final String FILE_SYSTEM_ITEM_PATH_SEPARATOR
- See Also:
- Constant Field Values
-
id
protected String id
FileSystemItemattributes
-
parentId
protected String parentId
-
name
protected String name
-
folder
protected boolean folder
-
creator
protected String creator
-
lastContributor
protected String lastContributor
-
creationDate
protected Calendar creationDate
-
lastModificationDate
protected Calendar lastModificationDate
-
canRename
protected boolean canRename
-
canDelete
protected boolean canDelete
-
lockInfo
protected Lock lockInfo
-
factoryName
protected String factoryName
Internal attributes
-
path
protected String path
-
principal
protected NuxeoPrincipal principal
-
userName
protected String userName
Needed for JSON serialization/deserialization since we don't serialize the principal
-
-
Constructor Detail
-
AbstractFileSystemItem
protected AbstractFileSystemItem(String factoryName, NuxeoPrincipal principal, boolean relaxSyncRootConstraint)
-
AbstractFileSystemItem
protected AbstractFileSystemItem()
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:FileSystemItemGets a unique id generated server-side.- Specified by:
getIdin interfaceFileSystemItem
-
getPath
public String getPath()
Description copied from interface:FileSystemItemA concatenation of ancestor ids with '/' as prefix and separator.- Specified by:
getPathin interfaceFileSystemItem
-
getParentId
public String getParentId()
Description copied from interface:FileSystemItemGets the parentFileSystemItemid.- Specified by:
getParentIdin interfaceFileSystemItem
-
getName
public String getName()
Description copied from interface:FileSystemItemGets the name displayed in the file system.- Specified by:
getNamein interfaceFileSystemItem
-
isFolder
public boolean isFolder()
- Specified by:
isFolderin interfaceFileSystemItem
-
getCreator
public String getCreator()
- Specified by:
getCreatorin interfaceFileSystemItem
-
getLastContributor
public String getLastContributor()
- Specified by:
getLastContributorin interfaceFileSystemItem
-
getCreationDate
public Calendar getCreationDate()
- Specified by:
getCreationDatein interfaceFileSystemItem
-
getLastModificationDate
public Calendar getLastModificationDate()
- Specified by:
getLastModificationDatein interfaceFileSystemItem
-
getCanRename
public boolean getCanRename()
- Specified by:
getCanRenamein interfaceFileSystemItem
-
getCanDelete
public boolean getCanDelete()
- Specified by:
getCanDeletein interfaceFileSystemItem
-
getLockInfo
public Lock getLockInfo()
- Specified by:
getLockInfoin interfaceFileSystemItem
-
getUserName
public String getUserName()
-
compareTo
public int compareTo(FileSystemItem other)
- Specified by:
compareToin interfaceComparable<FileSystemItem>
-
getFileSystemItemAdapterService
protected FileSystemItemAdapterService getFileSystemItemAdapterService()
-
setId
protected void setId(String id)
-
setPath
protected void setPath(String path)
-
setParentId
protected void setParentId(String parentId)
-
setName
protected void setName(String name)
-
setFolder
protected void setFolder(boolean isFolder)
-
setCreator
protected void setCreator(String creator)
-
setLastContributor
protected void setLastContributor(String lastContributor)
-
setCreationDate
protected void setCreationDate(Calendar creationDate)
-
setLastModificationDate
protected void setLastModificationDate(Calendar lastModificationDate)
-
setCanRename
protected void setCanRename(boolean canRename)
-
setCanDelete
protected void setCanDelete(boolean canDelete)
-
setLockInfo
protected void setLockInfo(Lock lockInfo)
-
setUserName
protected void setUserName(String userName)
-
-