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 Stringstatic final intstatic final ComponentNamestatic final Stringstatic final Stringstatic final StringFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcomputePluginsExtensionPoint(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) booleanprotected booleanisImporterAvailable(FileImporter importer, String normalizedMimeType, String mimeType, boolean excludeOneToMany) booleanvoidregisterContribution(Object contribution, String xp, ComponentInstance component) protected voidprotected voidprotected voidprotected voidvoidstart(ComponentContext context) Start the component.voidunregisterContribution(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, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
registerContributionin classDefaultComponent
-
unregisterContribution
- Overrides:
unregisterContributionin classDefaultComponent
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin 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:FileManagerCreates a Folder.- Specified by:
createFolderin 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:FileManagerReturns 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:
createOrUpdateDocumentin 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:
findExistingDocumentWithFilein interfaceFileManager
-
isUnicityEnabled
public boolean isUnicityEnabled()- Specified by:
isUnicityEnabledin interfaceFileManager
-
isDigestComputingEnabled
public boolean isDigestComputingEnabled()- Specified by:
isDigestComputingEnabledin interfaceFileManager
-
getFields
- Specified by:
getFieldsin interfaceFileManager
-
getCreationContainers
Description copied from interface:FileManagerReturns 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:
getCreationContainersin interfaceFileManager- Returns:
- the list of candidate containers
-
getCreationContainers
Description copied from interface:FileManagerReturns 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:
getCreationContainersin interfaceFileManager- Returns:
- the list of candidate containers
-
getDigestAlgorithm
- Specified by:
getDigestAlgorithmin interfaceFileManager
-