|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.env.repository.AbstractRepository
com.caucho.env.repository.FileRepository
public class FileRepository
| Constructor Summary | |
|---|---|
FileRepository()
|
|
FileRepository(GitSystem git)
|
|
| Method Summary | |
|---|---|
java.lang.String |
addBlob(java.io.InputStream is)
Adds a path to the repository. |
java.lang.String |
addBlob(java.io.InputStream is,
long length)
Adds a path to the repository. |
java.lang.String |
addCommit(GitCommit commit)
Adds a git commit to the repository |
java.lang.String |
addTree(GitTree tree)
Adds a git tree to the repository |
void |
checkForUpdate(boolean isExact)
Updates the repository |
boolean |
exists(java.lang.String hash)
Returns true if the file exists. |
void |
expandToPath(java.lang.String contentHash,
Path path)
Expands the repository to the filesystem. |
java.lang.String |
getRepositoryRootHash()
Returns the hash stored in the git tag |
GitType |
getType(java.lang.String sha1)
Returns true if the file is a blob. |
java.io.InputStream |
openBlob(java.lang.String sha1)
Opens a stream to a blob |
java.io.InputStream |
openRawGitFile(java.lang.String sha1)
Opens a stream to the raw git file. |
boolean |
putTag(java.lang.String tagName,
java.lang.String contentHash,
java.util.Map<java.lang.String,java.lang.String> commitMetaData)
Adds a tag |
GitCommit |
readCommit(java.lang.String sha1)
Reads a git commit from the repository |
GitTree |
readTree(java.lang.String sha1)
Reads a git tree from the repository |
boolean |
removeTag(java.lang.String tagName,
java.util.Map<java.lang.String,java.lang.String> commitMetaData)
Removes a tag |
void |
setRepositoryRootHash(java.lang.String sha1)
Sets the hash stored in the git tag |
void |
validateRawGitFile(java.lang.String sha1)
Writes the git file from the StreamInput |
void |
writeBlobToStream(java.lang.String blobHash,
java.io.OutputStream os)
Writes the contents to a stream. |
void |
writeRawGitFile(java.lang.String sha1,
java.io.InputStream is)
Writes the git file from the StreamInput |
| Methods inherited from class com.caucho.env.repository.AbstractRepository |
|---|
addArchive, addArchive, addArchive, addListener, addPath, addTagData, checkForUpdate, commitArchive, commitArchive, commitPath, getCommitHash, getRepositoryTag, getTagContentHash, getTagHash, getTagMap, getTagSequence, init, isBlob, isCommit, isTree, loadLocalRoot, removeListener, removeTag, removeTagData, setTagMap, start, stop, toString, update, updateLoad, updateRepositoryRoot, updateTagMap, validateHash, validateRawHash |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileRepository()
public FileRepository(GitSystem git)
| Method Detail |
|---|
public void checkForUpdate(boolean isExact)
checkForUpdate in interface RepositorySpicheckForUpdate in class AbstractRepository
public boolean putTag(java.lang.String tagName,
java.lang.String contentHash,
java.util.Map<java.lang.String,java.lang.String> commitMetaData)
putTag in interface RepositorySpiputTag in class AbstractRepositorytagName - the symbolic tag for the repositorycontentHash - the sha1 hash of the tag's contentcommitMessage - user's message for the commitcommitMetaData - additional commit metadata
public boolean removeTag(java.lang.String tagName,
java.util.Map<java.lang.String,java.lang.String> commitMetaData)
removeTag in interface RepositorySpiremoveTag in class AbstractRepositorytagName - the symbolic tag for the repositorycommitMessage - user's message for the commitcommitMetaData - additional metadatapublic java.lang.String getRepositoryRootHash()
getRepositoryRootHash in interface RepositorySpigetRepositoryRootHash in class AbstractRepositorypublic void setRepositoryRootHash(java.lang.String sha1)
setRepositoryRootHash in interface RepositorySpisetRepositoryRootHash in class AbstractRepositorysha1 - the hash of the new .git Commit for the
repository.public boolean exists(java.lang.String hash)
exists in interface RepositorySpiexists in class AbstractRepositorypublic GitType getType(java.lang.String sha1)
getType in interface RepositorySpigetType in class AbstractRepositorypublic java.lang.String addBlob(java.io.InputStream is)
is - the blob's input stream
public java.lang.String addBlob(java.io.InputStream is,
long length)
addBlob in interface RepositorySpiaddBlob in class AbstractRepositoryis - the blob's input streamlength - the blob's length
public java.io.InputStream openBlob(java.lang.String sha1)
throws java.io.IOException
openBlob in interface RepositorySpiopenBlob in class AbstractRepositoryjava.io.IOException
public java.io.InputStream openRawGitFile(java.lang.String sha1)
throws java.io.IOException
openRawGitFile in interface RepositorySpiopenRawGitFile in class AbstractRepositoryjava.io.IOException
public GitTree readTree(java.lang.String sha1)
throws java.io.IOException
readTree in interface RepositorySpireadTree in class AbstractRepositoryjava.io.IOException
public java.lang.String addTree(GitTree tree)
throws java.io.IOException
addTree in interface RepositorySpiaddTree in class AbstractRepositoryjava.io.IOException
public GitCommit readCommit(java.lang.String sha1)
throws java.io.IOException
readCommit in interface RepositorySpireadCommit in class AbstractRepositoryjava.io.IOException
public java.lang.String addCommit(GitCommit commit)
throws java.io.IOException
addCommit in interface RepositorySpiaddCommit in class AbstractRepositoryjava.io.IOException
public void writeRawGitFile(java.lang.String sha1,
java.io.InputStream is)
throws java.io.IOException
writeRawGitFile in interface RepositorySpiwriteRawGitFile in class AbstractRepositorysha1 - the file hashis - the raw contents for the new file
java.io.IOExceptionpublic void validateRawGitFile(java.lang.String sha1)
validateRawGitFile in interface RepositorySpivalidateRawGitFile in class AbstractRepositorysha1 - the file hashis - the raw contents for the new file
public void writeBlobToStream(java.lang.String blobHash,
java.io.OutputStream os)
writeBlobToStream in interface RepositorySpiwriteBlobToStream in class AbstractRepositoryblobHash - the hash of the source blobos - the OutputStream to write to
public void expandToPath(java.lang.String contentHash,
Path path)
expandToPath in interface RepositorySpiexpandToPath in class AbstractRepository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||