接口 DocumentManager

所有已知实现类:
DefaultDocumentManager

public interface DocumentManager
  • 方法详细资料

    • getFormats

      List<Format> 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

      String getDocumentKey(String bucket, String fileId, boolean embedded)
      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

      String getDocumentName(String bucket, String fileId)
      Returns the document name by file ID.
      参数:
      bucket - The file bucket.
      fileId - The file ID.
      返回:
      The document name.
    • getExtension

      String getExtension(String fileName)
      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

      String getBaseName(String fileName)
      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

      DocumentType getDocumentType(String fileName)
      Returns the document type by the file name.
      参数:
      fileName - The file name to get the document type.
      返回:
      The document type.
      另请参阅:
    • isEditable

      boolean isEditable(String fileName)
      Determines whether a document with a name specified in the request is editable.
      参数:
      fileName - The file name.
      返回:
      True if the document is editable.
    • isViewable

      boolean isViewable(String fileName)
      Determines whether a document with a name specified in the request is viewable.
      参数:
      fileName - The file name.
      返回:
      True if the document is viewable.
    • isFillable

      boolean isFillable(String fileName)
      Determines whether a document with a name specified in the request is fillable.
      参数:
      fileName - The file name.
      返回:
      True if the document is fillable.
    • hasAction

      boolean hasAction(String fileName, String action)
      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

      InputStream getNewBlankFile(String extension, Locale locale)
      Returns InputStream of an empty file with the given extension and locale.
      参数:
      extension - The file extension.
      locale - The file locale.
      返回:
      InputStream of an empty file.
      另请参阅:
    • getDefaultExtension

      String getDefaultExtension(DocumentType documentType)
      Returns the default OOXML extension by the specified document type.
      参数:
      documentType - The document type.
      返回:
      The default OOXML extension.
      另请参阅:
    • getDefaultConvertExtension

      String getDefaultConvertExtension(String fileName)
      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

      List<String> getConvertExtensionList(String fileName)
      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

      Map<String,Boolean> 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

      List<String> getInsertImageExtensions()
      Returns a list of image extensions that can be inserted into the document.
      返回:
      A list of image extensions.
      另请参阅:
    • getCompareFileExtensions

      List<String> getCompareFileExtensions()
      Returns a list of extensions that can be used for the document comparison functions.
      返回:
      A list of extensions for the document comparison.
      另请参阅:
    • getMailMergeExtensions

      List<String> 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.