@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 |
View |
createView()
Create a new
View to query consistent repository information |
void |
delete(Transaction transaction,
Resource resource)
Delete the resource from the repository
|
InputStream |
download(Resource resource,
Revision revision)
Download the resource
|
InputStream |
download(View view,
Resource resource,
Revision revision)
Download the resource
|
URI |
downloadURI(Resource resource,
Revision revision)
Determine the HTTP download URI for the resource
|
URI |
downloadURI(View view,
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
|
boolean |
exists(View view,
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,
ResourceProperty.Key... keys)
Retrieve information for the resource
|
Info |
info(View view,
Resource resource,
Revision revision,
ResourceProperty.Key... keys)
Retrieve information for the resource
|
Set<Info> |
list(Resource resource,
Revision revision,
Depth depth,
ResourceProperty.Key... keys)
Retrieve information for the resource in the given revision and its child resources (depending on depth parameter)
|
Set<Info> |
list(View view,
Resource resource,
Revision revision,
Depth depth,
ResourceProperty.Key... keys)
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
|
List<Log> |
log(View view,
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)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid commit(Transaction transaction, @CheckForNull String message)
Transactiontransaction - the current running Transactionmessage - the commit message for the expected operationNullPointerException - if the transaction parameter is nullSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid copy(Transaction transaction, Resource srcResource, Revision srcRevision, Resource targetResource, boolean parents)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverTransaction createTransaction()
Transaction to make modifications withinTransactionSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the serverView createView()
View to query consistent repository informationViewSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid delete(Transaction transaction, Resource resource)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverInputStream download(Resource resource, Revision revision)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverInputStream download(View view, Resource resource, Revision revision)
view - the current valid Viewresource - 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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverURI downloadURI(Resource resource, Revision revision)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverURI downloadURI(View view, Resource resource, Revision revision)
view - the current valid Viewresource - 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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverboolean exists(Resource resource, Revision revision)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverboolean exists(View view, Resource resource, Revision revision)
view - the current valid Viewresource - 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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverURI 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, ResourceProperty.Key... keys)
resource - the Resource of the resource (relative to the repository root)revision - the Revision of the resource to retrievekeys - request only the specified ResourceProperty.KeysInfo for the resource (if keys where specified, only reduced Info will be returned)NullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the serverInfo info(View view, Resource resource, Revision revision, ResourceProperty.Key... keys)
view - the current valid Viewresource - the Resource of the resource (relative to the repository root)revision - the Revision of the resource to retrievekeys - request only the specified ResourceProperty.KeysInfo for the resource (if keys where specified, only reduced Info will be returned)NullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the serverSet<Info> list(Resource resource, Revision revision, Depth depth, ResourceProperty.Key... keys)
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 Depthkeys - request only the specified ResourceProperty.KeysSet of Info for the resource and its child resources (depending on depth parameter),
if keys where specified, only reduced Info will contained in the SetNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the serverSet<Info> list(View view, Resource resource, Revision revision, Depth depth, ResourceProperty.Key... keys)
view - the current valid Viewresource - 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 Depthkeys - request only the specified ResourceProperty.KeysSet of Info for the resource and its child resources (depending on depth parameter),
if keys where specified, only reduced Info will contained in the SetNullPointerException - if any parameter is nullSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid lock(Resource resource, boolean steal)
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 the resource parameter is nullSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the serverList<Log> log(Resource resource, Revision startRevision, Revision endRevision, int limit)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the serverList<Log> log(View view, Resource resource, Revision startRevision, Revision endRevision, int limit)
view - the current valid Viewresource - 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 repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid mkdir(Transaction transaction, Resource resource, boolean parents)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid move(Transaction transaction, Resource srcResource, Resource targetResource, boolean parents)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid propertiesDelete(Transaction transaction, Resource resource, ResourceProperty... properties)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid propertiesSet(Transaction transaction, Resource resource, ResourceProperty... properties)
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 repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid rollback(Transaction transaction)
Transaction and revert all modificationstransaction - the current running TransactionNullPointerException - if the transaction parameter is nullSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the servervoid unlock(Resource resource, boolean force)
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 the resource parameter is nullSubversionException - if an error occurs while operating on the repositoryTransmissionException - if an error occurs in the underlining communication with the serverCopyright © 2013–2015 shadowhunt. All rights reserved.