Interface RepositoryManagementServiceInternal
-
- All Known Implementing Classes:
RepositoryManagementServiceInternalImpl
public interface RepositoryManagementServiceInternal
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addRemote(String siteId, RemoteRepository remoteRepository)
boolean
cancelFailedPull(String siteId)
boolean
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, String sandboxBranch)
MergeResult
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 repositoryboolean
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, String sandboxBranch)
-
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 ServiceLayerException, InvalidRemoteUrlException, InvalidRemoteRepositoryCredentialsException, RemoteRepositoryNotFoundException
-
removeRemote
boolean removeRemote(String siteId, String remoteName) throws RemoteNotRemovableException
- Throws:
RemoteNotRemovableException
-
getRepositoryStatus
RepositoryStatus getRepositoryStatus(String siteId) throws ServiceLayerException
- Throws:
ServiceLayerException
-
resolveConflict
boolean resolveConflict(String siteId, String path, String resolution) throws ServiceLayerException
- Throws:
ServiceLayerException
-
getDiffForConflictedFile
DiffConflictedFile getDiffForConflictedFile(String siteId, String path) throws ServiceLayerException
- Throws:
ServiceLayerException
-
commitResolution
boolean commitResolution(String siteId, String commitMessage) throws ServiceLayerException
- Throws:
ServiceLayerException
-
cancelFailedPull
boolean cancelFailedPull(String siteId) throws ServiceLayerException
- Throws:
ServiceLayerException
-
unlockRepository
boolean unlockRepository(String siteId, GitRepositories repositoryType)
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
-
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
-
-