Interface RepositoryManagementServiceInternal
- All Known Implementing Classes:
RepositoryManagementServiceInternalImpl
public interface RepositoryManagementServiceInternal
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddRemote(String siteId, RemoteRepository remoteRepository) booleancancelFailedPull(String siteId) booleancommitResolution(String siteId, String commitMessage) getDiffForConflictedFile(String siteId, String path) getRepositoryStatus(String siteId) booleanisCorrupted(String siteId, GitRepositories repositoryType) Checks if a given Git repository is corruptedlistRemotes(String siteId, String sandboxBranch) pullFromRemote(String siteId, String remoteName, String remoteBranch, String mergeStrategy) booleanpushToRemote(String siteId, String remoteName, String remoteBranch, boolean force) booleanremoveRemote(String siteId, String remoteName) voidrepairCorrupted(String siteId, GitRepositories repositoryType) Repairs a corrupted Git repositorybooleanresolveConflict(String siteId, String path, String resolution) booleanunlockRepository(String siteId, GitRepositories repositoryType) Unlock local git repository
-
Method Details
-
addRemote
boolean addRemote(String siteId, RemoteRepository remoteRepository) throws ServiceLayerException, InvalidRemoteUrlException, RemoteRepositoryNotFoundException -
listRemotes
-
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
- Throws:
RemoteNotRemovableException
-
getRepositoryStatus
- Throws:
ServiceLayerException
-
resolveConflict
- Throws:
ServiceLayerException
-
getDiffForConflictedFile
DiffConflictedFile getDiffForConflictedFile(String siteId, String path) throws ServiceLayerException - Throws:
ServiceLayerException
-
commitResolution
- Throws:
ServiceLayerException
-
cancelFailedPull
- Throws:
ServiceLayerException
-
unlockRepository
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
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
-