public interface DocumentManager
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseName(String fileName)
Returns the file base name without the full path and extension.
|
List<String> |
getCompareFileExtensions()
Returns a list of extensions that can be used for the document comparison functions.
|
List<String> |
getConvertExtensionList(String fileName)
Returns a list of extensions that the document with the name specified in the request can be converted to.
|
String |
getDefaultConvertExtension(String fileName)
Returns the default OOXML extension to which the document with the name specified in the request should be
converted.
|
String |
getDefaultExtension(DocumentType documentType)
Returns the default OOXML extension by the specified document type.
|
String |
getDocumentKey(String fileId,
boolean embedded)
Generates a unique document identifier used by the service to recognize the document.
|
String |
getDocumentName(String fileId)
Returns the document name by file ID.
|
DocumentType |
getDocumentType(String fileName)
Returns the document type by the file name.
|
String |
getExtension(String fileName)
Returns the file extension from the file name.
|
List<Format> |
getFormats()
Returns a list of file formats (electronic documents, forms, spreadsheets, presentations) supported
by the ONLYOFFICE editors.
|
List<String> |
getInsertImageExtensions()
Returns a list of image extensions that can be inserted into the document.
|
Map<String,Boolean> |
getLossyEditableMap()
Returns a map of extensions that can be edited with the possible loss of information.
|
List<String> |
getMailMergeExtensions()
Returns a list of extensions that can be used for mail merge in the document.
|
long |
getMaxConversionFileSize()
Returns the maximum file size that can be converted in the ONLYOFFICE Conversion Service.
|
long |
getMaxFileSize()
Returns the maximum file size that can be opened in the ONLYOFFICE editor.
|
InputStream |
getNewBlankFile(String extension,
Locale locale)
Returns
InputStream of an empty file with the given extension and locale. |
boolean |
hasAction(String fileName,
String action)
Determines whether an action can be performed on a document with a name specified in the request.
|
boolean |
isEditable(String fileName)
Determines whether a document with a name specified in the request is editable.
|
boolean |
isFillable(String fileName)
Determines whether a document with a name specified in the request is fillable.
|
boolean |
isForm(InputStream inputStream)
Determines whether a file is form.
|
boolean |
isViewable(String fileName)
Determines whether a document with a name specified in the request is viewable.
|
List<Format> getFormats()
String getDocumentKey(String fileId, boolean embedded)
fileId - The file ID.embedded - Specifies if the editor is opened in the embedded mode (true) or not (false).String getDocumentName(String fileId)
fileId - The file ID.String getExtension(String fileName)
fileName - The file name to get the extension.String getBaseName(String fileName)
fileName - The file name to get the base name.DocumentType getDocumentType(String fileName)
fileName - The file name to get the document type.DocumentTypeboolean isEditable(String fileName)
fileName - The file name.boolean isViewable(String fileName)
fileName - The file name.boolean isFillable(String fileName)
fileName - The file name.boolean hasAction(String fileName, String action)
fileName - The file name.action - An action to perform.InputStream getNewBlankFile(String extension, Locale locale)
InputStream of an empty file with the given extension and locale.extension - The file extension.locale - The file locale.InputStream of an empty file.String getDefaultExtension(DocumentType documentType)
documentType - The document type.DocumentTypeString getDefaultConvertExtension(String fileName)
fileName - The file name.List<String> getConvertExtensionList(String fileName)
fileName - The file name.Map<String,Boolean> getLossyEditableMap()
List<String> getInsertImageExtensions()
List<String> getCompareFileExtensions()
List<String> getMailMergeExtensions()
long getMaxFileSize()
long getMaxConversionFileSize()
boolean isForm(InputStream inputStream)
inputStream - The inputStream of file.Copyright © 2023–2024. All rights reserved.