|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.project.ProjectFile
public class ProjectFile
This represents a special file on Tranche that encapsulates the information about a directory upload.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_PROJECT_FILE_NAME
The default project file name |
static java.lang.String |
OLD_PROJECT_FILE_NAME
DO NOT CHANGE -- EVER |
static java.lang.String |
VERSION_FOUR
Identifies the fourth project file version. |
static java.lang.String |
VERSION_LATEST
Identifies the latest project file version. |
static java.lang.String |
VERSION_ONE
Identifies the first project file version. |
static java.lang.String |
VERSION_THREE
Identifies the third project file version. |
static java.lang.String |
VERSION_TWO
Identifies the second project file version. |
| Constructor Summary | |
|---|---|
ProjectFile()
|
|
| Method Summary | |
|---|---|
void |
addPart(ProjectFilePart pfp)
Adds a project file part to this project. |
void |
calculateSize()
|
void |
close()
Closes off any resources that might be used. |
static ProjectFile |
createFromFile(java.io.File file)
|
protected void |
finalize()
Destroys the disk backed project file part set. |
java.lang.String |
getDescription()
Gets the description for this project file. |
BigHash |
getLicenseHash()
|
java.lang.String |
getName()
Gets the name for this project file. |
java.util.Set<ProjectFilePart> |
getParts()
Gets the parts for this project file. |
java.math.BigInteger |
getSize()
Gets the size on disk in bytes of the directory that this object represents. |
java.lang.String |
getVersion()
Gets the version of this project file. |
boolean |
isSizeSet()
Was the method called to set the size of the data set? |
void |
setDescription(java.lang.String description)
Sets the description of this projet file. |
void |
setLicenseHash(BigHash licenseHash)
|
void |
setName(java.lang.String name)
Sets the name for this project file. |
void |
setParts(java.util.Set<ProjectFilePart> parts)
Sets the parts for this project file. |
protected void |
setSize(java.math.BigInteger size)
|
void |
setVersion(java.lang.String version)
Sets the version of this project file. |
byte[] |
toByteArray()
|
byte[] |
toByteArray(java.lang.String version)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_PROJECT_FILE_NAME
The default project file name
public static final java.lang.String OLD_PROJECT_FILE_NAME
DO NOT CHANGE -- EVER
public static final java.lang.String VERSION_ONE
Identifies the first project file version.
public static final java.lang.String VERSION_TWO
Identifies the second project file version.
The second version includes padding for each project file part.
public static final java.lang.String VERSION_THREE
Identifies the third project file version.
The third version discludes the name and description.
public static final java.lang.String VERSION_FOUR
Identifies the fourth project file version.
The fourth version includes the license hash, name, and description -- need to keep these for encrypted files where the uploader does not want the title and description to be public.
public static final java.lang.String VERSION_LATEST
Identifies the latest project file version.
| Constructor Detail |
|---|
public ProjectFile()
| Method Detail |
|---|
public java.lang.String getVersion()
Gets the version of this project file.
public void setVersion(java.lang.String version)
Sets the version of this project file.
version - public java.lang.String getDescription()
Gets the description for this project file.
public void setDescription(java.lang.String description)
Sets the description of this projet file.
description - public void setName(java.lang.String name)
Sets the name for this project file.
name - public java.lang.String getName()
Gets the name for this project file.
public void setLicenseHash(BigHash licenseHash)
licenseHash - public BigHash getLicenseHash()
public java.math.BigInteger getSize()
Gets the size on disk in bytes of the directory that this object represents.
protected void setSize(java.math.BigInteger size)
size - public void calculateSize()
public boolean isSizeSet()
Was the method called to set the size of the data set?
public java.util.Set<ProjectFilePart> getParts()
Gets the parts for this project file.
public void setParts(java.util.Set<ProjectFilePart> parts)
Sets the parts for this project file.
parts - public void addPart(ProjectFilePart pfp)
Adds a project file part to this project.
pfp - protected void finalize()
Destroys the disk backed project file part set.
finalize in class java.lang.Objectpublic void close()
Closes off any resources that might be used.
public final byte[] toByteArray()
throws java.lang.Exception
java.lang.Exception
public final byte[] toByteArray(java.lang.String version)
throws java.lang.Exception
version -
java.lang.Exception
public static final ProjectFile createFromFile(java.io.File file)
throws java.lang.Exception
file -
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||