Interface RepositoryManagementService
- All Known Implementing Classes:
RepositoryManagementServiceImpl
public interface RepositoryManagementService
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addRemote
(String siteId, RemoteRepository remoteRepository) cancelFailedPull
(String siteId) commitResolution
(String siteId, String commitMessage) getDiffForConflictedFile
(String siteId, String path) getRepositoryStatus
(String siteId) boolean
isCorrupted
(String siteId, GitRepositories repositoryType) Checks if a given Git repository is corruptedlistRemotes
(String siteId) pullFromRemote
(String siteId, String remoteName, String remoteBranch, String mergeStrategy) boolean
pushToRemote
(String siteId, String remoteName, String remoteBranch, boolean force) boolean
removeRemote
(String siteId, String remoteName) void
repairCorrupted
(String siteId, GitRepositories repositoryType) Repairs a corrupted Git repositoryresolveConflict
(String siteId, String path, String resolution) boolean
unlockRepository
(String siteId, GitRepositories repositoryType) Unlock local git repository
-
Method Details
-
addRemote
boolean addRemote(String siteId, RemoteRepository remoteRepository) throws ServiceLayerException, InvalidRemoteUrlException, RemoteRepositoryNotFoundException -
listRemotes
- 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 -
removeRemote
boolean removeRemote(String siteId, String remoteName) throws SiteNotFoundException, RemoteNotRemovableException -
getRepositoryStatus
- 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
- Throws:
ServiceLayerException
-
cancelFailedPull
- 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
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
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
-