Package org.openl.rules.repository.api
Class FileData
- java.lang.Object
-
- org.openl.rules.repository.api.FileData
-
public class FileData extends Object
- Author:
- Yury Molchan
-
-
Field Summary
Fields Modifier and Type Field Description static longUNDEFINED_SIZEIf file size cannot be determined in some rare cases this constant should be used.
-
Constructor Summary
Constructors Constructor Description FileData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdditionalData(AdditionalData data)Map<Class<? extends AdditionalData>,AdditionalData>getAdditionalData()<T extends AdditionalData>
TgetAdditionalData(Class<T> key)UserInfogetAuthor()The author of the last modification.StringgetBranch()Branch where the file can be found.StringgetComment()The comment for the file.DategetModifiedAt()The last modification time.StringgetName()The full path of the file from the root folder.PathgetPath()longgetSize()The file size in bytes.StringgetUniqueId()StringgetVersion()The version of the file.booleanisDeleted()The mark that the file was deleted.voidsetAuthor(UserInfo author)voidsetBranch(String branch)voidsetComment(String comment)voidsetDeleted(boolean deleted)voidsetModifiedAt(Date modifiedAt)voidsetName(String name)voidsetPath(Path path)voidsetSize(long size)voidsetUniqueId(String uniqueId)voidsetVersion(String version)
-
-
-
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
-
-
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)
-
getAdditionalData
public <T extends AdditionalData> T getAdditionalData(Class<T> key)
-
getAdditionalData
public Map<Class<? extends AdditionalData>,AdditionalData> getAdditionalData()
-
getPath
public Path getPath()
-
setPath
public void setPath(Path path)
-
-