Class FileManagerService
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.filemanager.service.FileManagerService
- All Implemented Interfaces:
FileManager
,Adaptable
,Component
,Extensible
,TimestampedService
FileManager registry service.
This is the component to request to perform transformations. See API.
- Author:
- Andreas Kalogeropoulos
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final int
static final ComponentName
static final String
static final String
static final String
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
computePluginsExtensionPoint
(Class<?> klass) createFolder
(CoreSession documentManager, String fullname, String path, boolean overwrite) Creates a Folder.Returns a created or updated document based on the givencontext
.defaultCreateFolder
(CoreSession documentManager, String fullname, String path, boolean overwrite) defaultCreateFolder
(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes, boolean overwrite) findExistingDocumentWithFile
(CoreSession documentManager, String path, String digest, NuxeoPrincipal principal) getCreationContainers
(CoreSession documentManager, String docType) Returns the list of document that are to be suggested to the principal of documentManager as a candidate container for a new document of type docType.getCreationContainers
(NuxeoPrincipal principal, String docType) Returns the list of document that are to be suggested to principalName as a candidate container for a new document of type docType on all registered repositories.getPluginByName
(String name) boolean
protected boolean
isImporterAvailable
(FileImporter importer, String normalizedMimeType, String mimeType, boolean excludeOneToMany) boolean
void
registerContribution
(Object contribution, String xp, ComponentInstance component) protected void
protected void
protected void
protected void
void
start
(ComponentContext context) Start the component.void
unregisterContribution
(Object contribution, String xp, ComponentInstance component) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
NAME
-
DEFAULT_FOLDER_TYPE_NAME
- See Also:
-
QUERY
- See Also:
-
MAX
public static final int MAX- See Also:
-
PLUGINS_EP
- Since:
- 11.1
- See Also:
-
UNICITY_EP
- Since:
- 11.1
- See Also:
-
-
Constructor Details
-
FileManagerService
public FileManagerService()
-
-
Method Details
-
registerContribution
- Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
- Overrides:
unregisterContribution
in classDefaultComponent
-
start
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
registerFileImporters
protected void registerFileImporters() -
registerFolderImporters
protected void registerFolderImporters() -
registerCreationContainerListProviders
protected void registerCreationContainerListProviders() -
registerUnicity
protected void registerUnicity() -
computePluginsExtensionPoint
-
createFolder
public DocumentModel createFolder(CoreSession documentManager, String fullname, String path, boolean overwrite) throws IOException Description copied from interface:FileManager
Creates a Folder.- Specified by:
createFolder
in interfaceFileManager
- Parameters:
fullname
- the full name of the folderpath
- the path were to create the folderoverwrite
- whether to overwrite an existing folder with the same title or not- Returns:
- the Folder Created
- Throws:
IOException
-
defaultCreateFolder
public DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path, boolean overwrite) - Since:
- 9.1
-
defaultCreateFolder
public DocumentModel defaultCreateFolder(CoreSession documentManager, String fullname, String path, String containerTypeName, boolean checkAllowedSubTypes, boolean overwrite) - Since:
- 9.1
-
createOrUpdateDocument
Description copied from interface:FileManager
Returns a created or updated document based on the givencontext
.The document may not be persisted according to
FileImporterContext.isPersistDocument()
. That's the caller's responsibility to actually persist the document.Note that file importers may not use
FileImporterContext.isPersistDocument()
and always persist the document.- Specified by:
createOrUpdateDocument
in interfaceFileManager
- Returns:
- the created or updated document
- Throws:
IOException
- See Also:
-
isImporterAvailable
protected boolean isImporterAvailable(FileImporter importer, String normalizedMimeType, String mimeType, boolean excludeOneToMany) -
getPluginByName
-
findExistingDocumentWithFile
public List<DocumentLocation> findExistingDocumentWithFile(CoreSession documentManager, String path, String digest, NuxeoPrincipal principal) - Specified by:
findExistingDocumentWithFile
in interfaceFileManager
-
isUnicityEnabled
public boolean isUnicityEnabled()- Specified by:
isUnicityEnabled
in interfaceFileManager
-
isDigestComputingEnabled
public boolean isDigestComputingEnabled()- Specified by:
isDigestComputingEnabled
in interfaceFileManager
-
getFields
- Specified by:
getFields
in interfaceFileManager
-
getCreationContainers
Description copied from interface:FileManager
Returns the list of document that are to be suggested to principalName as a candidate container for a new document of type docType on all registered repositories.- Specified by:
getCreationContainers
in interfaceFileManager
- Returns:
- the list of candidate containers
-
getCreationContainers
Description copied from interface:FileManager
Returns the list of document that are to be suggested to the principal of documentManager as a candidate container for a new document of type docType.- Specified by:
getCreationContainers
in interfaceFileManager
- Returns:
- the list of candidate containers
-
getDigestAlgorithm
- Specified by:
getDigestAlgorithm
in interfaceFileManager
-