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 forFileSystemItem
implementations.- Author:
- Antoine Taillefer
- See Also:
AbstractDocumentBackedFileSystemItem
,DefaultTopLevelFolderItem
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
canDelete
protected boolean
canRename
protected Calendar
creationDate
protected String
creator
protected String
factoryName
Internal attributesstatic String
FILE_SYSTEM_ITEM_ID_SEPARATOR
static String
FILE_SYSTEM_ITEM_PATH_SEPARATOR
protected boolean
folder
protected String
id
FileSystemItem
attributesprotected String
lastContributor
protected Calendar
lastModificationDate
protected Lock
lockInfo
protected String
name
protected String
parentId
protected String
path
protected NuxeoPrincipal
principal
protected String
userName
Needed for JSON serialization/deserialization since we don't serialize the principal
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFileSystemItem()
protected
AbstractFileSystemItem(String factoryName, NuxeoPrincipal principal, boolean relaxSyncRootConstraint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FileSystemItem other)
boolean
equals(Object obj)
boolean
getCanDelete()
boolean
getCanRename()
Calendar
getCreationDate()
String
getCreator()
protected FileSystemItemAdapterService
getFileSystemItemAdapterService()
String
getId()
Gets a unique id generated server-side.String
getLastContributor()
Calendar
getLastModificationDate()
Lock
getLockInfo()
String
getName()
Gets the name displayed in the file system.String
getParentId()
Gets the parentFileSystemItem
id.String
getPath()
A concatenation of ancestor ids with '/' as prefix and separator.String
getUserName()
int
hashCode()
boolean
isFolder()
protected void
setCanDelete(boolean canDelete)
protected void
setCanRename(boolean canRename)
protected void
setCreationDate(Calendar creationDate)
protected void
setCreator(String creator)
protected void
setFolder(boolean isFolder)
protected void
setId(String id)
protected void
setLastContributor(String lastContributor)
protected void
setLastModificationDate(Calendar lastModificationDate)
protected void
setLockInfo(Lock lockInfo)
protected void
setName(String name)
protected void
setParentId(String parentId)
protected void
setPath(String path)
protected void
setUserName(String userName)
String
toString()
-
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
FileSystemItem
attributes
-
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:FileSystemItem
Gets a unique id generated server-side.- Specified by:
getId
in interfaceFileSystemItem
-
getPath
public String getPath()
Description copied from interface:FileSystemItem
A concatenation of ancestor ids with '/' as prefix and separator.- Specified by:
getPath
in interfaceFileSystemItem
-
getParentId
public String getParentId()
Description copied from interface:FileSystemItem
Gets the parentFileSystemItem
id.- Specified by:
getParentId
in interfaceFileSystemItem
-
getName
public String getName()
Description copied from interface:FileSystemItem
Gets the name displayed in the file system.- Specified by:
getName
in interfaceFileSystemItem
-
isFolder
public boolean isFolder()
- Specified by:
isFolder
in interfaceFileSystemItem
-
getCreator
public String getCreator()
- Specified by:
getCreator
in interfaceFileSystemItem
-
getLastContributor
public String getLastContributor()
- Specified by:
getLastContributor
in interfaceFileSystemItem
-
getCreationDate
public Calendar getCreationDate()
- Specified by:
getCreationDate
in interfaceFileSystemItem
-
getLastModificationDate
public Calendar getLastModificationDate()
- Specified by:
getLastModificationDate
in interfaceFileSystemItem
-
getCanRename
public boolean getCanRename()
- Specified by:
getCanRename
in interfaceFileSystemItem
-
getCanDelete
public boolean getCanDelete()
- Specified by:
getCanDelete
in interfaceFileSystemItem
-
getLockInfo
public Lock getLockInfo()
- Specified by:
getLockInfo
in interfaceFileSystemItem
-
getUserName
public String getUserName()
-
compareTo
public int compareTo(FileSystemItem other)
- Specified by:
compareTo
in 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)
-
-