public abstract class DfsRepository extends Repository
Modifier and Type | Class and Description |
---|---|
private static class |
DfsRepository.EmptyAttributesNodeProvider |
Modifier and Type | Field and Description |
---|---|
private DfsConfig |
config |
private DfsRepositoryDescription |
description |
Modifier | Constructor and Description |
---|---|
protected |
DfsRepository(DfsRepositoryBuilder builder)
Initialize a DFS repository.
|
Modifier and Type | Method and Description |
---|---|
void |
create(boolean bare)
Create a new Git repository initializing the necessary files and
directories.
|
AttributesNodeProvider |
createAttributesNodeProvider()
Create a new
AttributesNodeProvider . |
boolean |
exists()
Check if the repository already exists.
|
StoredConfig |
getConfig()
Get the configuration of this repository.
|
DfsRepositoryDescription |
getDescription()
Get the description of this repository.
|
java.lang.String |
getIdentifier()
Get repository identifier.
|
abstract DfsObjDatabase |
getObjectDatabase()
Get the object database which stores this repository's data.
|
ReflogReader |
getReflogReader(java.lang.String refName)
Get the reflog reader
|
void |
notifyIndexChanged(boolean internal)
Notify that the index changed by firing an IndexChangedEvent.
|
void |
scanForRepoChanges()
Force a scan for changed refs.
|
autoGC, close, create, doClose, exactRef, findRef, fireEvent, getAdditionalHaves, getAllRefs, getAllRefsByPeeledObjectId, getBranch, getDirectory, getFS, getFullBranch, getGitwebDescription, getGlobalListenerList, getIndexFile, getListenerList, getRefDatabase, getRemoteName, getRemoteNames, getRepositoryState, getTags, getWorkTree, hasObject, incrementOpen, isBare, isValidRefName, lockDirCache, newObjectInserter, newObjectReader, normalizeBranchName, open, open, parseCommit, peel, readCherryPickHead, readCommitEditMsg, readDirCache, readMergeCommitMsg, readMergeHeads, readOrigHead, readRebaseTodo, readRevertHead, readSquashCommitMsg, renameRef, resolve, setGitwebDescription, shortenRefName, shortenRemoteBranchName, simplify, stripWorkDir, toString, updateRef, updateRef, writeCherryPickHead, writeCommitEditMsg, writeMergeCommitMsg, writeMergeHeads, writeOrigHead, writeRebaseTodoFile, writeRevertHead, writeSquashCommitMsg
private final DfsConfig config
private final DfsRepositoryDescription description
protected DfsRepository(DfsRepositoryBuilder builder)
builder
- description of the repository.public abstract DfsObjDatabase getObjectDatabase()
getObjectDatabase
in class Repository
public DfsRepositoryDescription getDescription()
public boolean exists() throws java.io.IOException
java.io.IOException
- the repository cannot be checked.public void create(boolean bare) throws java.io.IOException
create
in class Repository
bare
- if true, a bare repository (a repository without a working
directory) is created.java.io.IOException
- in case of IO problempublic StoredConfig getConfig()
getConfig
in class Repository
public java.lang.String getIdentifier()
getIdentifier
in class Repository
public void scanForRepoChanges() throws java.io.IOException
scanForRepoChanges
in class Repository
java.io.IOException
public void notifyIndexChanged(boolean internal)
notifyIndexChanged
in class Repository
internal
- true
if the index was changed by the same
JGit processpublic ReflogReader getReflogReader(java.lang.String refName) throws java.io.IOException
getReflogReader
in class Repository
refName
- a String
object.ReflogReader
for the supplied
refname, or null
if the named ref does not exist.java.io.IOException
- the ref could not be accessed.public AttributesNodeProvider createAttributesNodeProvider()
AttributesNodeProvider
.createAttributesNodeProvider
in class Repository
AttributesNodeProvider
.
This AttributesNodeProvider
is lazy loaded only once. It means that it will not be updated
after loading. Prefer creating new instance for each use.