Class Attachment

    • Field Detail

      • DATABASE_ID

        public static final Property<java.lang.Integer> DATABASE_ID
        database numeric Id
      • FILE_NAME

        public static final Property<java.lang.String> FILE_NAME
      • FILE_SIZE

        public static final Property<java.lang.Long> FILE_SIZE
      • CONTENT_TYPE

        public static final Property<java.lang.String> CONTENT_TYPE
      • CONTENT_URL

        public static final Property<java.lang.String> CONTENT_URL
      • DESCRIPTION

        public static final Property<java.lang.String> DESCRIPTION
      • CREATED_ON

        public static final Property<java.util.Date> CREATED_ON
      • TOKEN

        public static final Property<java.lang.String> TOKEN
    • Constructor Detail

      • Attachment

        public Attachment​(Transport transport)
    • Method Detail

      • setId

        public Attachment setId​(java.lang.Integer id)
      • getId

        public java.lang.Integer getId()
        Specified by:
        getId in interface Identifiable
        Returns:
        id. NULL for attachments not added to Redmine yet.
      • getContentType

        public java.lang.String getContentType()
      • setContentType

        public Attachment setContentType​(java.lang.String contentType)
      • getContentURL

        public java.lang.String getContentURL()
      • setContentURL

        public Attachment setContentURL​(java.lang.String contentURL)
      • getDescription

        public java.lang.String getDescription()
        Description is empty by default, not NULL.
      • setDescription

        public Attachment setDescription​(java.lang.String description)
      • getCreatedOn

        public java.util.Date getCreatedOn()
      • setCreatedOn

        public Attachment setCreatedOn​(java.util.Date createdOn)
      • getAuthor

        public User getAuthor()
      • getFileName

        public java.lang.String getFileName()
      • setFileName

        public Attachment setFileName​(java.lang.String fileName)
      • getFileSize

        public java.lang.Long getFileSize()
      • setFileSize

        public Attachment setFileSize​(java.lang.Long fileSize)
      • getToken

        public java.lang.String getToken()
      • setToken

        public Attachment setToken​(java.lang.String token)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • delete

        public void delete()
                    throws RedmineException
        delete the attachment with pre-configured ID from the server.
        see http://www.redmine.org/issues/14828
        Throws:
        RedmineException
        Since:
        Redmine 3.3.0