Class RepositoryManager
- java.lang.Object
-
- org.wso2.carbon.deployment.synchronizer.RepositoryManager
-
public abstract class RepositoryManager extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected RepositoryCreator
repositoryCreator
-
Constructor Summary
Constructors Constructor Description RepositoryManager()
Default constructorRepositoryManager(RepositoryCreator repositoryCreator)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addRepository(int tenantId, String url)
Adds the already existing repository specified by tenantabstract RepositoryInformation
getCredentialsInformation(int tenantId)
Returns a RepositoryInformation instance populated with repository credentials for a tenantabstract RepositoryInformation
getUrlInformation(int tenantId)
Returns a RepositoryInformation instance populated with repository url for a tenantabstract void
provisionRepository(int tenantId)
Creates a repository for the tenant in the location specified, if it doesn't exist alreadyvoid
setRepositoryCreator(RepositoryCreator repositoryCreator)
Sets the repository creator implementation
-
-
-
Field Detail
-
repositoryCreator
protected RepositoryCreator repositoryCreator
-
-
Constructor Detail
-
RepositoryManager
public RepositoryManager()
Default constructor
-
RepositoryManager
public RepositoryManager(RepositoryCreator repositoryCreator)
Constructor- Parameters:
repositoryCreator
- Repository creator instance
-
-
Method Detail
-
setRepositoryCreator
public void setRepositoryCreator(RepositoryCreator repositoryCreator)
Sets the repository creator implementation- Parameters:
repositoryCreator
- RepositoryCreator instance
-
getUrlInformation
public abstract RepositoryInformation getUrlInformation(int tenantId) throws DeploymentSynchronizerException
Returns a RepositoryInformation instance populated with repository url for a tenant- Parameters:
tenantId
- tenant Id- Returns:
- RepositoryInformation instance if relevant details are found for tenant, else null
- Throws:
DeploymentSynchronizerException
- in case of an error
-
getCredentialsInformation
public abstract RepositoryInformation getCredentialsInformation(int tenantId) throws DeploymentSynchronizerException
Returns a RepositoryInformation instance populated with repository credentials for a tenant- Parameters:
tenantId
- tenant Id- Returns:
- RepositoryInformation instance if relevant details are found for tenant, else null
- Throws:
DeploymentSynchronizerException
- in case of an error
-
provisionRepository
public abstract void provisionRepository(int tenantId) throws DeploymentSynchronizerException
Creates a repository for the tenant in the location specified, if it doesn't exist already- Parameters:
tenantId
- tenant Id- Throws:
DeploymentSynchronizerException
- in case of an error
-
addRepository
public abstract void addRepository(int tenantId, String url) throws DeploymentSynchronizerException
Adds the already existing repository specified by tenant- Parameters:
tenantId
- tenant Idurl
- repository url- Throws:
DeploymentSynchronizerException
-
-