Class FileData


  • public class FileData
    extends Object
    Author:
    Yury Molchan
    • Field Detail

      • UNDEFINED_SIZE

        public static final long UNDEFINED_SIZE
        If file size cannot be determined in some rare cases this constant should be used.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FileData

        public FileData()
    • Method Detail

      • getName

        public String getName()
        The full path of the file from the root folder. The path MUST not start from the '/' symbol. The allowed folder separator is '/' symbol.
        Returns:
        the full path name from the root folder.
      • setName

        public void setName​(String name)
      • getSize

        public long getSize()
        The file size in bytes. The size of the deleted file is undefined, but can be equals to the size of the deleted file.
        Returns:
        the file size.
      • setSize

        public void setSize​(long size)
      • getAuthor

        public UserInfo getAuthor()
        The author of the last modification. Can be empty.
        Returns:
        The author of the last modification.
      • setAuthor

        public void setAuthor​(UserInfo author)
      • getComment

        public String getComment()
        The comment for the file. Can be empty.
        Returns:
        the file comment.
      • setComment

        public void setComment​(String comment)
      • getModifiedAt

        public Date getModifiedAt()
        The last modification time. This value is get from the repository system. Cannot be modified from the client side.
        Returns:
        the time the file was last modified.
      • setModifiedAt

        public void setModifiedAt​(Date modifiedAt)
      • getVersion

        public String getVersion()
        The version of the file. This value is get from the repository system. The latest file in the history MUST have the latest modification time. Can be empty. Cannot be modified from the client side.
        Returns:
        the version (revision) of the file.
      • setVersion

        public void setVersion​(String version)
      • isDeleted

        public boolean isDeleted()
        The mark that the file was deleted. This value is get from the repository system. Cannot be modified from the client side.
        Returns:
        true if the file was deleted.
      • setDeleted

        public void setDeleted​(boolean deleted)
      • getBranch

        public String getBranch()
        Branch where the file can be found. If repository does not support branching, it will be null.
        Returns:
        branch name
      • setBranch

        public void setBranch​(String branch)
      • getUniqueId

        public String getUniqueId()
      • setUniqueId

        public void setUniqueId​(String uniqueId)
      • addAdditionalData

        public void addAdditionalData​(AdditionalData data)
      • getPath

        public Path getPath()
      • setPath

        public void setPath​(Path path)