public class FileSystemItemAdapterServiceImpl extends DefaultComponent implements FileSystemItemAdapterService
FileSystemItemAdapterService
.Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_FILE_SYSTEM_ITEM_FACTORIES_EP |
static String |
FILE_SYSTEM_ITEM_FACTORY_EP |
static String |
TOP_LEVEL_FOLDER_ITEM_FACTORY_EP |
Constructor and Description |
---|
FileSystemItemAdapterServiceImpl() |
getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtension
public static final String FILE_SYSTEM_ITEM_FACTORY_EP
public static final String TOP_LEVEL_FOLDER_ITEM_FACTORY_EP
public static final String ACTIVE_FILE_SYSTEM_ITEM_FACTORIES_EP
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void applicationStarted(ComponentContext context)
applicationStarted
in interface Component
applicationStarted
in class DefaultComponent
public FileSystemItem getFileSystemItem(DocumentModel doc) throws ClientException
FileSystemItemAdapterService
FileSystemItem
for the given DocumentModel
. If the document is in the "deleted" life
cycle state it is not considered as adaptable as a FileSystemItem
, thus the method returns null.getFileSystemItem
in interface FileSystemItemAdapterService
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
ClientException
FileSystemItemFactory.getFileSystemItem(DocumentModel)
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted) throws ClientException
FileSystemItemAdapterService
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.getFileSystemItem
in interface FileSystemItemAdapterService
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
ClientException
FileSystemItemFactory.getFileSystemItem(DocumentModel)
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) throws ClientException
FileSystemItemAdapterService
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 FileSystemItemAdapterService
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
ClientException
FileSystemItemFactory.getFileSystemItem(DocumentModel)
public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem) throws ClientException
FileSystemItemAdapterService
FileSystemItem
for the given DocumentModel
forcing its parent id with the given id. If
the document is in the "deleted" life cycle state it is not considered as adaptable as a FileSystemItem
,
thus the method returns null.getFileSystemItem
in interface FileSystemItemAdapterService
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
ClientException
FileSystemItemFactory#getFileSystemItem(DocumentModel, String)
public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted) throws ClientException
FileSystemItemAdapterService
FileSystemItem
for the given DocumentModel
forcing its parent id with the given id. 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.getFileSystemItem
in interface FileSystemItemAdapterService
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
ClientException
FileSystemItemFactory#getFileSystemItem(DocumentModel, String)
public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint) throws ClientException
FileSystemItemAdapterService
FileSystemItem
for the given DocumentModel
forcing its parent id with the given id.
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 FileSystemItemAdapterService
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
ClientException
FileSystemItemFactory#getFileSystemItem(DocumentModel, String)
public FileSystemItemFactory getFileSystemItemFactoryForId(String id) throws ClientException
FileSystemItem
id.getFileSystemItemFactoryForId
in interface FileSystemItemAdapterService
ClientException
- if no FileSystemItemFactory
can handle the given FileSystemItem
idFileSystemItemFactory.canHandleFileSystemItemId(String)
public TopLevelFolderItemFactory getTopLevelFolderItemFactory() throws ClientException
FileSystemItemAdapterService
TopLevelFolderItemFactory
.getTopLevelFolderItemFactory
in interface FileSystemItemAdapterService
ClientException
public VirtualFolderItemFactory getVirtualFolderItemFactory(String factoryName) throws ClientException
FileSystemItemAdapterService
VirtualFolderItemFactory
for the given factory name.getVirtualFolderItemFactory
in interface FileSystemItemAdapterService
ClientException
public Set<String> getActiveFileSystemItemFactories() throws ClientException
FileSystemItemAdapterService
FileSystemItem
factory names.getActiveFileSystemItemFactories
in interface FileSystemItemAdapterService
ClientException
public Map<String,FileSystemItemFactoryDescriptor> getFileSystemItemFactoryDescriptors()
public List<FileSystemItemFactoryWrapper> getFileSystemItemFactories()
public FileSystemItemFactory getFileSystemItemFactory(String name)
Copyright © 2015 Nuxeo SA. All rights reserved.