类 DefaultDocumentManager

java.lang.Object
com.onlyoffice.manager.document.DefaultDocumentManager
所有已实现的接口:
DocumentManager

public abstract class DefaultDocumentManager extends Object implements DocumentManager
  • 构造器详细资料

    • DefaultDocumentManager

      public DefaultDocumentManager(SettingsManager settingsManager)
  • 方法详细资料

    • init

      protected static void init()
    • getSettingsManager

      public SettingsManager getSettingsManager()
    • setSettingsManager

      public void setSettingsManager(SettingsManager settingsManager)
    • getFormats

      public List<Format> getFormats()
      从接口复制的说明: DocumentManager
      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.
      指定者:
      getFormats 在接口中 DocumentManager
      返回:
      A list containing data about the supported formats.
    • getDocumentKey

      public abstract String getDocumentKey(String bucket, String fileId, boolean embedded)
      从接口复制的说明: DocumentManager
      Generates a unique document identifier used by the service to recognize the document.
      指定者:
      getDocumentKey 在接口中 DocumentManager
      参数:
      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

      public abstract String getDocumentName(String bucket, String fileId)
      从接口复制的说明: DocumentManager
      Returns the document name by file ID.
      指定者:
      getDocumentName 在接口中 DocumentManager
      参数:
      bucket - The file bucket.
      fileId - The file ID.
      返回:
      The document name.
    • getExtension

      public String getExtension(String fileName)
      从接口复制的说明: DocumentManager
      Returns the file extension from the file name.
      指定者:
      getExtension 在接口中 DocumentManager
      参数:
      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

      public String getBaseName(String fileName)
      从接口复制的说明: DocumentManager
      Returns the file base name without the full path and extension.
      指定者:
      getBaseName 在接口中 DocumentManager
      参数:
      fileName - The file name to get the base name.
      返回:
      The file name without the extension or null if the file name is empty.
    • getDocumentType

      public DocumentType getDocumentType(String fileName)
      从接口复制的说明: DocumentManager
      Returns the document type by the file name.
      指定者:
      getDocumentType 在接口中 DocumentManager
      参数:
      fileName - The file name to get the document type.
      返回:
      The document type.
      另请参阅:
    • isEditable

      public boolean isEditable(String fileName)
      从接口复制的说明: DocumentManager
      Determines whether a document with a name specified in the request is editable.
      指定者:
      isEditable 在接口中 DocumentManager
      参数:
      fileName - The file name.
      返回:
      True if the document is editable.
    • isViewable

      public boolean isViewable(String fileName)
      从接口复制的说明: DocumentManager
      Determines whether a document with a name specified in the request is viewable.
      指定者:
      isViewable 在接口中 DocumentManager
      参数:
      fileName - The file name.
      返回:
      True if the document is viewable.
    • isFillable

      public boolean isFillable(String fileName)
      从接口复制的说明: DocumentManager
      Determines whether a document with a name specified in the request is fillable.
      指定者:
      isFillable 在接口中 DocumentManager
      参数:
      fileName - The file name.
      返回:
      True if the document is fillable.
    • hasAction

      public boolean hasAction(String fileName, String action)
      从接口复制的说明: DocumentManager
      Determines whether an action can be performed on a document with a name specified in the request.
      指定者:
      hasAction 在接口中 DocumentManager
      参数:
      fileName - The file name.
      action - An action to perform.
      返回:
      True if the action can be performed on a document.
      另请参阅:
    • getNewBlankFile

      public InputStream getNewBlankFile(String extension, Locale locale)
      从接口复制的说明: DocumentManager
      Returns InputStream of an empty file with the given extension and locale.
      指定者:
      getNewBlankFile 在接口中 DocumentManager
      参数:
      extension - The file extension.
      locale - The file locale.
      返回:
      InputStream of an empty file.
      另请参阅:
    • getDefaultExtension

      public String getDefaultExtension(DocumentType documentType)
      从接口复制的说明: DocumentManager
      Returns the default OOXML extension by the specified document type.
      指定者:
      getDefaultExtension 在接口中 DocumentManager
      参数:
      documentType - The document type.
      返回:
      The default OOXML extension.
      另请参阅:
    • getDefaultConvertExtension

      public String getDefaultConvertExtension(String fileName)
      从接口复制的说明: DocumentManager
      Returns the default OOXML extension to which the document with the name specified in the request should be converted.
      指定者:
      getDefaultConvertExtension 在接口中 DocumentManager
      参数:
      fileName - The file name.
      返回:
      The default OOXML extension for conversion.
    • getConvertExtensionList

      public List<String> getConvertExtensionList(String fileName)
      从接口复制的说明: DocumentManager
      Returns a list of extensions that the document with the name specified in the request can be converted to.
      指定者:
      getConvertExtensionList 在接口中 DocumentManager
      参数:
      fileName - The file name.
      返回:
      A list of extensions for conversion.
    • getLossyEditableMap

      public Map<String,Boolean> getLossyEditableMap()
      从接口复制的说明: DocumentManager
      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".
      指定者:
      getLossyEditableMap 在接口中 DocumentManager
      返回:
      A map of extensions that can be edited with the possible loss of information.
    • getInsertImageExtensions

      public List<String> getInsertImageExtensions()
      从接口复制的说明: DocumentManager
      Returns a list of image extensions that can be inserted into the document.
      指定者:
      getInsertImageExtensions 在接口中 DocumentManager
      返回:
      A list of image extensions.
      另请参阅:
    • getCompareFileExtensions

      public List<String> getCompareFileExtensions()
      从接口复制的说明: DocumentManager
      Returns a list of extensions that can be used for the document comparison functions.
      指定者:
      getCompareFileExtensions 在接口中 DocumentManager
      返回:
      A list of extensions for the document comparison.
      另请参阅:
    • getMailMergeExtensions

      public List<String> getMailMergeExtensions()
      从接口复制的说明: DocumentManager
      Returns a list of extensions that can be used for mail merge in the document.
      指定者:
      getMailMergeExtensions 在接口中 DocumentManager
      返回:
      A list of extensions for mail merge.
      另请参阅:
    • getMaxFileSize

      public long getMaxFileSize()
      从接口复制的说明: DocumentManager
      Returns the maximum file size that can be opened in the ONLYOFFICE editor.
      指定者:
      getMaxFileSize 在接口中 DocumentManager
      返回:
      The maximum file size that can be opened.
    • getMaxConversionFileSize

      public long getMaxConversionFileSize()
      从接口复制的说明: DocumentManager
      Returns the maximum file size that can be converted in the ONLYOFFICE Conversion Service.
      指定者:
      getMaxConversionFileSize 在接口中 DocumentManager
      返回:
      The maximum file size that can be converted.