Class Attachment

java.lang.Object
org.ofdrw.layout.edit.Attachment

public class Attachment extends Object
附件对象构造器
Since:
2020-05-20 19:18:37
Author:
权观宇
  • Constructor Details

    • Attachment

      public Attachment(String name, Path file)
      附件对象构造对象,同名文件将被替换
      Parameters:
      name - 附件名称
      file - 附件文件
    • Attachment

      public Attachment(String name, Path file, boolean disableReplace)
      附件对象构造对象
      Parameters:
      name - 附件名称
      file - 附件文件
      disableReplace - 是否禁用同名替换,默认为 false(同名替换)
  • Method Details

    • setName

      public Attachment setName(String attachmentName)
      【必选 属性】 设置 附件名称
      Parameters:
      attachmentName - 附件名称
      Returns:
      this
    • getName

      public String getName()
      【必选 属性】 获取 附件名称
      Returns:
      附件名称
    • setFormat

      public Attachment setFormat(String format)
      【可选 属性】 设置 附件格式
      Parameters:
      format - 附件格式
      Returns:
      this
    • getFormat

      public String getFormat()
      【可选 属性】 获取 附件格式
      Returns:
      附件格式
    • setCreationDate

      @Deprecated public Attachment setCreationDate(LocalDate creationDate)
      【可选 属性】 设置 创建时间
      Parameters:
      creationDate - 创建时间
      Returns:
      this
    • setCreationDate

      public Attachment setCreationDate(LocalDateTime creationDate)
      【可选 属性】 设置 创建时间
      Parameters:
      creationDate - 创建时间
      Returns:
      this
    • getCreationDate

      @Deprecated public LocalDate getCreationDate()
      【可选 属性】 获取 创建时间
      Returns:
      创建时间
    • getCreationDateTime

      public LocalDateTime getCreationDateTime()
      【可选 属性】 获取 创建时间
      Returns:
      创建时间
    • setModDate

      @Deprecated public Attachment setModDate(LocalDate modDate)
      【可选 属性】 设置 修改时间
      Parameters:
      modDate - 修改时间
      Returns:
      this
    • setModDateTime

      public Attachment setModDateTime(LocalDateTime modDate)
      【可选 属性】 设置 修改时间
      Parameters:
      modDate - 修改时间
      Returns:
      this
    • getModDate

      @Deprecated public LocalDate getModDate()
      【可选 属性】 获取 修改时间
      Returns:
      修改时间
    • getModDateTime

      public LocalDateTime getModDateTime()
      【可选 属性】 获取 修改时间
      Returns:
      修改时间
    • setVisible

      public Attachment setVisible(Boolean visible)
      【可选 属相】 设置 附件是否可见

      默认值为 true

      Parameters:
      visible - 附件是否可见
      Returns:
      this
    • getVisible

      public Boolean getVisible()
      【可选 属相】 获取 附件是否可见

      默认值为 true

      Returns:
      附件是否可见
    • setUsage

      public Attachment setUsage(String usage)
      【可选 属性】 设置 附件用途

      默认值为 none

      Parameters:
      usage - 附件用途
      Returns:
      this
    • getUsage

      public String getUsage()
      【可选 属性】 获取 附件用途

      默认值为 none

      Returns:
      附件用途
    • getFile

      public Path getFile()
      获取附件文件
      Returns:
      附件文件路径
    • setFile

      public Attachment setFile(Path file)
      设置附件文件
      Parameters:
      file - 附件文件
      Returns:
      this
    • getAttachment

      public org.ofdrw.core.attachment.CT_Attachment getAttachment()
    • setDisableReplace

      public Attachment setDisableReplace(boolean disableReplace)
      设置是否禁用同名替换

      默认值为 false(同名替换)

      Parameters:
      disableReplace - 是否禁用同名替换
      Returns:
      this
    • isDisableReplace

      public boolean isDisableReplace()
      获取是否禁用同名替换

      默认值为 false(同名替换)

      Returns:
      是否禁用同名替换