@ThreadSafe public interface Repository
| Modifier and Type | Interface and Description |
|---|---|
static class |
Repository.ProtocolVersion
Repository.ProtocolVersion that represents the version of the subversion server |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Transaction transaction,
Resource resource,
boolean parents,
InputStream content)
Upload a new revision of the resource and set properties
|
void |
commit(Transaction transaction,
String message)
Save all modifications of the current running
Transaction |
void |
copy(Transaction transaction,
Resource srcResource,
Revision srcRevision,
Resource targetResource,
boolean parents)
Recursively copy a resource in the given revision
|
Transaction |
createTransaction()
Create a new
Transaction to make modifications within |
void |
delete(Transaction transaction,
Resource resource)
Delete the resource from the repository
|
InputStream |
download(Resource resource,
Revision revision)
Download the resource
|
URI |
downloadURI(Resource resource,
Revision revision)
Determine the HTTP download URI for the resource
|
boolean |
exists(Resource resource,
Revision revision)
Check if the resource already exists in the latest revision of the repository
|
URI |
getBaseUri()
Returns the
URI to the root of this Repository |
Repository.ProtocolVersion |
getProtocolVersion()
Returns the
Repository.ProtocolVersion of the server running this Repository |
UUID |
getRepositoryId()
Returns the
UUID that identifies the Repository globally |
Info |
info(Resource resource,
Revision revision)
Retrieve information for the resource
|
Set<Info> |
list(Resource resource,
Revision revision,
Depth depth)
Retrieve information for the resource in the given revision and its child resources (depending on depth parameter)
|
void |
lock(Resource resource,
boolean steal)
Mark the expected revision of the resource as locked
|
List<Log> |
log(Resource resource,
Revision startRevision,
Revision endRevision,
int limit)
Retrieve the log information for the revisions between startRevision and endRevision of the resource
|
void |
mkdir(Transaction transaction,
Resource resource,
boolean parents)
Create a folder with all necessary parents folders
|
void |
move(Transaction transaction,
Resource srcResource,
Resource targetResource,
boolean parents)
Recursively move a resource (latest revision)
|
void |
propertiesDelete(Transaction transaction,
Resource resource,
ResourceProperty... properties)
Remove the given properties form the resource
|
void |
propertiesSet(Transaction transaction,
Resource resource,
ResourceProperty... properties)
Set the given properties for the resource (new properties will be added, existing properties will be overridden)
|
void |
rollback(Transaction transaction)
Abort the current running
Transaction and revert all modifications |
void |
unlock(Resource resource,
boolean force)
Remove the lock on the expected revision of the resource
|
void add(Transaction transaction, Resource resource, boolean parents, InputStream content) throws SubversionException
transaction - the current running Transactionresource - the Resource of the resource (relative to the repository root)parents - whether to create missing parents folders or notcontent - InputStream from which the content will be read (will be closed after transfer)NullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryvoid commit(Transaction transaction, @Nullable String message) throws SubversionException
Transactiontransaction - the current running Transactionmessage - the commit message for the expected operationNullPointerException - if transaction is nullSubversionException - if an error occurs while operating on the repositoryvoid copy(Transaction transaction, Resource srcResource, Revision srcRevision, Resource targetResource, boolean parents) throws SubversionException
transaction - the current running TransactionsrcResource - the Resource of the source resource (relative to the repository root)srcRevision - Revision of the resource to copytargetResource - the Resource of the target resource (relative to the repository root)parents - whether to create missing parents folders or notNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryTransaction createTransaction() throws SubversionException
Transaction to make modifications withinTransactionSubversionException - if an error occurs while operating on the repositoryvoid delete(Transaction transaction, Resource resource) throws SubversionException
transaction - the current running Transactionresource - the Resource of the resource (relative to the repository root)NullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryInputStream download(Resource resource, Revision revision) throws SubversionException
resource - the Resource of the resource (relative to the repository root)revision - the Revision of the resource to retrieveInputStream from which the content can be read (caller has to close the stream properly)NullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryURI downloadURI(Resource resource, Revision revision) throws SubversionException
resource - the Resource of the resource (relative to the repository root)revision - the Revision of the resource to retrieveURI for the resourceNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryboolean exists(Resource resource, Revision revision) throws SubversionException
resource - the Resource of the resource (relative to the repository root)revision - the Revision of the resource to retrievetrue if the resource already exists in the latest revision of the repository otherwise falseNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryURI getBaseUri()
URI to the root of this RepositoryURI to the root of this RepositoryRepository.ProtocolVersion getProtocolVersion()
Repository.ProtocolVersion of the server running this RepositoryRepository.ProtocolVersion of the server running this RepositoryUUID getRepositoryId()
UUID that identifies the Repository globallyUUID that identifies the Repository globallyInfo info(Resource resource, Revision revision) throws SubversionException
resource - the Resource of the resource (relative to the repository root)revision - the Revision of the resource to retrieveInfo for the resourceNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositorySet<Info> list(Resource resource, Revision revision, Depth depth) throws SubversionException
resource - the Resource of the resource (relative to the repository root)revision - the Revision of the resource to retrievedepth - whether to retrieve only for the given resource, its children or only part of its children depending on the value of DepthSet of Info for the resource and its child resources (depending on depth parameter)NullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryvoid lock(Resource resource, boolean steal) throws SubversionException
resource - the Resource of the resource (relative to the repository root)steal - if the resource is locked by another user true will override the lock, otherwise the operation will failNullPointerException - if resource is nullSubversionException - if an error occurs while operating on the repositoryList<Log> log(Resource resource, Revision startRevision, Revision endRevision, int limit) throws SubversionException
resource - the Resource of the resource (relative to the repository root)startRevision - the first Revision of the resource to retrieve (including)endRevision - the last Revision of the resource to retrieve (including)limit - maximal number of Log entries, if the value is lower or equal to 0 all entries will be returnedList of Log for the revisions between startRevision and endRevision of the resourceNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryvoid mkdir(Transaction transaction, Resource resource, boolean parents) throws SubversionException
transaction - the current running Transactionresource - the Resource of the resource (relative to the repository root)parents - whether to create missing parents folders or notNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryvoid move(Transaction transaction, Resource srcResource, Resource targetResource, boolean parents) throws SubversionException
transaction - the current running TransactionsrcResource - the Resource of the source resource (relative to the repository root)targetResource - the Resource of the target resource (relative to the repository root)parents - whether to create missing parents folders or notNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryvoid propertiesDelete(Transaction transaction, Resource resource, ResourceProperty... properties) throws SubversionException
transaction - the current running Transactionresource - the Resource of the resource (relative to the repository root)properties - ResourceProperty to removeIllegalArgumentException - if properties contain null elementsNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryvoid propertiesSet(Transaction transaction, Resource resource, ResourceProperty... properties) throws SubversionException
transaction - the current running Transactionresource - the Resource of the resource (relative to the repository root)properties - ResourceProperty to add or overrideIllegalArgumentException - if properties contain null elementsNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryvoid rollback(Transaction transaction) throws SubversionException
Transaction and revert all modificationstransaction - the current running TransactionNullPointerException - if transaction is nullSubversionException - if an error occurs while operating on the repositoryvoid unlock(Resource resource, boolean force) throws SubversionException
resource - the Resource of the resource (relative to the repository root)force - the user that created the lock must match the user who wants to delete it, unless force is trueNullPointerException - if resource is nullSubversionException - if an error occurs while operating on the repositoryCopyright © 2013–2014 shadowhunt. All rights reserved.