public class UserSyncRootParentFactory extends AbstractFileSystemItemFactory implements VirtualFolderItemFactory
FileSystemItemFactory
for the parent FolderItem
of the user's
synchronization roots.Modifier and Type | Field and Description |
---|---|
protected static String |
FOLDER_NAME_PARAM |
protected String |
folderName |
name
Constructor and Description |
---|
UserSyncRootParentFactory() |
Modifier and Type | Method and Description |
---|---|
protected FileSystemItem |
adaptDocument(DocumentModel doc,
boolean forceParentItem,
FolderItem parentItem,
boolean relaxSyncRootConstraint)
Adapts the given
DocumentModel to a FileSystemItem . |
FileSystemItem |
getFileSystemItem(DocumentModel doc,
boolean includeDeleted)
Force parent item using
getTopLevelFolderItem(Principal) . |
FileSystemItem |
getFileSystemItem(DocumentModel doc,
boolean includeDeleted,
boolean relaxSyncRootConstraint)
Gets the
FileSystemItem for the given DocumentModel . |
String |
getFolderName() |
protected FolderItem |
getTopLevelFolderItem(Principal principal) |
FolderItem |
getVirtualFolderItem(Principal principal)
Returns the (unique) virtual
FolderItem . |
void |
handleParameters(Map<String,String> parameters)
Handles the factory parameters contributed through the
fileSystemItemFactory contribution. |
boolean |
isFileSystemItem(DocumentModel doc,
boolean includeDeleted,
boolean relaxSyncRootConstraint)
Returns true if the given
DocumentModel is adaptable as a FileSystemItem . |
void |
setFolderName(String folderName) |
adaptDocument, canHandleFileSystemItemId, exists, getDocumentByFileSystemId, getDocumentById, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, parseFileSystemId, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canHandleFileSystemItemId, exists, getDocumentByFileSystemId, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, setName
protected static final String FOLDER_NAME_PARAM
protected String folderName
public UserSyncRootParentFactory()
public void handleParameters(Map<String,String> parameters)
FileSystemItemFactory
fileSystemItemFactory
contribution.handleParameters
in interface FileSystemItemFactory
handleParameters
in class AbstractFileSystemItemFactory
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItemFactory
DocumentModel
is adaptable as a FileSystemItem
.
If includeDeleted
is true no filter is applied on the "deleted" life cycle state, else if the document is
in this state it is not considered as adaptable as a FileSystemItem
, thus the method returns false.
If relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the
current user.
isFileSystemItem
in interface FileSystemItemFactory
isFileSystemItem
in class AbstractFileSystemItemFactory
protected FileSystemItem adaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint)
AbstractFileSystemItemFactory
DocumentModel
to a FileSystemItem
.adaptDocument
in class AbstractFileSystemItemFactory
#getFileSystemItem(DocumentModel, boolean, String, boolean)
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted)
getTopLevelFolderItem(Principal)
.getFileSystemItem
in interface FileSystemItemFactory
getFileSystemItem
in class AbstractFileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
#isFileSystemItem(DocumentModel, boolean))
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItemFactory
FileSystemItem
for the given DocumentModel
.
If includeDeleted
is true no filter is applied on the "deleted" life cycle state, else if the document is
in this state it is not considered as adaptable as a FileSystemItem
, thus the method returns null.
If relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the
current user.
getFileSystemItem
in interface FileSystemItemFactory
getFileSystemItem
in class AbstractFileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
#isFileSystemItem(DocumentModel, boolean, boolean))
public FolderItem getVirtualFolderItem(Principal principal)
VirtualFolderItemFactory
FolderItem
.getVirtualFolderItem
in interface VirtualFolderItemFactory
public String getFolderName()
getFolderName
in interface VirtualFolderItemFactory
public void setFolderName(String folderName)
setFolderName
in interface VirtualFolderItemFactory
protected FolderItem getTopLevelFolderItem(Principal principal)
Copyright © 2015 Nuxeo SA. All rights reserved.