接口 DocumentManager
- 所有已知实现类:
DefaultDocumentManager
public interface DocumentManager
-
方法概要
修饰符和类型方法说明getBaseName(String fileName) Returns the file base name without the full path and extension.Returns a list of extensions that can be used for the document comparison functions.getConvertExtensionList(String fileName) Returns a list of extensions that the document with the name specified in the request can be converted to.getDefaultConvertExtension(String fileName) Returns the default OOXML extension to which the document with the name specified in the request should be converted.getDefaultExtension(DocumentType documentType) Returns the default OOXML extension by the specified document type.getDocumentKey(String bucket, String fileId, boolean embedded) Generates a unique document identifier used by the service to recognize the document.getDocumentName(String bucket, String fileId) Returns the document name by file ID.getDocumentType(String fileName) Returns the document type by the file name.getExtension(String fileName) Returns the file extension from the file name.Returns a list of file formats (electronic documents, forms, spreadsheets, presentations) supported by the ONLYOFFICE editors.Returns a list of image extensions that can be inserted into the document.Returns a map of extensions that can be edited with the possible loss of information.Returns a list of extensions that can be used for mail merge in the document.longReturns the maximum file size that can be converted in the ONLYOFFICE Conversion Service.longReturns the maximum file size that can be opened in the ONLYOFFICE editor.getNewBlankFile(String extension, Locale locale) ReturnsInputStreamof an empty file with the given extension and locale.booleanDetermines whether an action can be performed on a document with a name specified in the request.booleanisEditable(String fileName) Determines whether a document with a name specified in the request is editable.booleanisFillable(String fileName) Determines whether a document with a name specified in the request is fillable.booleanisViewable(String fileName) Determines whether a document with a name specified in the request is viewable.
-
方法详细资料
-
getFormats
Returns a list of file formats (electronic documents, forms, spreadsheets, presentations) supported by the ONLYOFFICE editors. The properties of each file format type are described in the list. This information is taken from the Formats repository.- 返回:
- A list containing data about the supported formats.
-
getDocumentKey
Generates a unique document identifier used by the service to recognize the document.- 参数:
bucket- The file bucket.fileId- The file ID.embedded- Specifies if the editor is opened in the embedded mode (true) or not (false).- 返回:
- The unique document identifier.
-
getDocumentName
Returns the document name by file ID.- 参数:
bucket- The file bucket.fileId- The file ID.- 返回:
- The document name.
-
getExtension
Returns the file extension from the file name.- 参数:
fileName- The file name to get the extension.- 返回:
- The file extension, or null if it doesn't exist, or the file name is empty.
-
getBaseName
Returns the file base name without the full path and extension.- 参数:
fileName- The file name to get the base name.- 返回:
- The file name without the extension or null if the file name is empty.
-
getDocumentType
Returns the document type by the file name.- 参数:
fileName- The file name to get the document type.- 返回:
- The document type.
- 另请参阅:
-
isEditable
Determines whether a document with a name specified in the request is editable.- 参数:
fileName- The file name.- 返回:
- True if the document is editable.
-
isViewable
Determines whether a document with a name specified in the request is viewable.- 参数:
fileName- The file name.- 返回:
- True if the document is viewable.
-
isFillable
Determines whether a document with a name specified in the request is fillable.- 参数:
fileName- The file name.- 返回:
- True if the document is fillable.
-
hasAction
Determines whether an action can be performed on a document with a name specified in the request.- 参数:
fileName- The file name.action- An action to perform.- 返回:
- True if the action can be performed on a document.
- 另请参阅:
-
getNewBlankFile
ReturnsInputStreamof an empty file with the given extension and locale.- 参数:
extension- The file extension.locale- The file locale.- 返回:
InputStreamof an empty file.- 另请参阅:
-
getDefaultExtension
Returns the default OOXML extension by the specified document type.- 参数:
documentType- The document type.- 返回:
- The default OOXML extension.
- 另请参阅:
-
getDefaultConvertExtension
Returns the default OOXML extension to which the document with the name specified in the request should be converted.- 参数:
fileName- The file name.- 返回:
- The default OOXML extension for conversion.
-
getConvertExtensionList
Returns a list of extensions that the document with the name specified in the request can be converted to.- 参数:
fileName- The file name.- 返回:
- A list of extensions for conversion.
-
getLossyEditableMap
Returns a map of extensions that can be edited with the possible loss of information. If the extension is contained in the "formats.lossy-edit" settings, the value is "true".- 返回:
- A map of extensions that can be edited with the possible loss of information.
-
getInsertImageExtensions
Returns a list of image extensions that can be inserted into the document.- 返回:
- A list of image extensions.
- 另请参阅:
-
getCompareFileExtensions
Returns a list of extensions that can be used for the document comparison functions.- 返回:
- A list of extensions for the document comparison.
- 另请参阅:
-
getMailMergeExtensions
Returns a list of extensions that can be used for mail merge in the document.- 返回:
- A list of extensions for mail merge.
- 另请参阅:
-
getMaxFileSize
long getMaxFileSize()Returns the maximum file size that can be opened in the ONLYOFFICE editor.- 返回:
- The maximum file size that can be opened.
-
getMaxConversionFileSize
long getMaxConversionFileSize()Returns the maximum file size that can be converted in the ONLYOFFICE Conversion Service.- 返回:
- The maximum file size that can be converted.
-