Interface RepositoryManagementService
-
- All Known Implementing Classes:
RepositoryManagementServiceImpl
public interface RepositoryManagementService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addRemote(String siteId, RemoteRepository remoteRepository)
RepositoryStatus
cancelFailedPull(String siteId)
RepositoryStatus
commitResolution(String siteId, String commitMessage)
DiffConflictedFile
getDiffForConflictedFile(String siteId, String path)
RepositoryStatus
getRepositoryStatus(String siteId)
boolean
isCorrupted(String siteId, GitRepositories repositoryType)
Checks if a given Git repository is corruptedList<RemoteRepositoryInfo>
listRemotes(String siteId)
MergeResult
pullFromRemote(String siteId, String remoteName, String remoteBranch, String mergeStrategy)
boolean
pushToRemote(String siteId, String remoteName, String remoteBranch, boolean force)
void
rebuildDatabase(String siteId)
boolean
removeRemote(String siteId, String remoteName)
void
repairCorrupted(String siteId, GitRepositories repositoryType)
Repairs a corrupted Git repositoryRepositoryStatus
resolveConflict(String siteId, String path, String resolution)
boolean
unlockRepository(String siteId, GitRepositories repositoryType)
Unlock local git repository
-
-
-
Method Detail
-
addRemote
boolean addRemote(String siteId, RemoteRepository remoteRepository) throws ServiceLayerException, InvalidRemoteUrlException, RemoteRepositoryNotFoundException
-
listRemotes
List<RemoteRepositoryInfo> listRemotes(String siteId) throws ServiceLayerException
- Throws:
ServiceLayerException
-
pullFromRemote
MergeResult pullFromRemote(String siteId, String remoteName, String remoteBranch, String mergeStrategy) throws InvalidRemoteUrlException, ServiceLayerException, InvalidRemoteRepositoryCredentialsException, RemoteRepositoryNotFoundException
-
pushToRemote
boolean pushToRemote(String siteId, String remoteName, String remoteBranch, boolean force) throws InvalidRemoteUrlException, ServiceLayerException, InvalidRemoteRepositoryCredentialsException, RemoteRepositoryNotFoundException
-
rebuildDatabase
void rebuildDatabase(String siteId) throws SiteNotFoundException
- Throws:
SiteNotFoundException
-
removeRemote
boolean removeRemote(String siteId, String remoteName) throws SiteNotFoundException, RemoteNotRemovableException
-
getRepositoryStatus
RepositoryStatus getRepositoryStatus(String siteId) throws ServiceLayerException
- Throws:
ServiceLayerException
-
resolveConflict
RepositoryStatus resolveConflict(String siteId, String path, String resolution) throws ServiceLayerException
- Throws:
ServiceLayerException
-
getDiffForConflictedFile
DiffConflictedFile getDiffForConflictedFile(String siteId, String path) throws ServiceLayerException
- Throws:
ServiceLayerException
-
commitResolution
RepositoryStatus commitResolution(String siteId, String commitMessage) throws ServiceLayerException
- Throws:
ServiceLayerException
-
cancelFailedPull
RepositoryStatus cancelFailedPull(String siteId) throws ServiceLayerException
- Throws:
ServiceLayerException
-
unlockRepository
boolean unlockRepository(String siteId, GitRepositories repositoryType) throws SiteNotFoundException
Unlock local git repository- Parameters:
siteId
- site identifier, if null or empty it is global repositoryrepositoryType
- repository type (GLOBAL, SANDBOX, PUBLISHED)- Returns:
- true if successful
- Throws:
SiteNotFoundException
-
isCorrupted
boolean isCorrupted(String siteId, GitRepositories repositoryType) throws ServiceLayerException
Checks if a given Git repository is corrupted- Parameters:
siteId
- the id of the siterepositoryType
- the type of the repository- Returns:
- true if the repo is corrupted
- Throws:
ServiceLayerException
- if there is any error checking the repository
-
repairCorrupted
void repairCorrupted(String siteId, GitRepositories repositoryType) throws ServiceLayerException
Repairs a corrupted Git repository- Parameters:
siteId
- the id of the siterepositoryType
- the type of the repository- Throws:
ServiceLayerException
- if there is any error repairing the repository
-
-