C# Class Microsoft.Research.DataOnboarding.RepositoriesService.RepositoryService

Repository service class.
Inheritance: IRepositoryService
显示文件 Open project: CDLUC3/dataup2

Public Methods

Method Description
AddUpdateRepository ( Microsoft.Research.DataOnboarding.DomainModel.Repository repositoryData ) : bool

Method to add\update the specified repository.

CheckRepositoryExists ( string repositoryName ) : int

Method to check the duplicate repository name.

DeleteRepository ( int repositoryId ) : bool

Method to delete the repository.

DeleteRepositoryMetaDataFields ( int repositoryId, string repositoryMetaDataFields ) : bool

Method to delete repository metadata feidls

GetMetadataTypes ( ) : IEnumerable

Returns the Metadata Types.

GetRepositoriesByRoleAndFileExtension ( bool isAdmin, string fileExtension ) : IEnumerable

Gets all the repositories that allows a file extension.

GetRepositoryById ( int repositoryId ) : Microsoft.Research.DataOnboarding.DomainModel.Repository

Method to get the selected repository details.

GetRepositoryByName ( string name ) : Microsoft.Research.DataOnboarding.DomainModel.Repository

Method to get the selected repository details.

RepositoryService ( IRepositoryDetails repositoryDetails, IUnitOfWork unitOfWork, IUserRepository userRepository, IFileRepository fileRepository ) : Microsoft.Research.DataOnboarding.DataAccessService

Initalizes the Respository Service

RetrieveRepositories ( bool includeAdminRepositories ) : IEnumerable

Method to retrieve all the available repositories.

RetrieveRepositoryTypes ( ) : IEnumerable

Method to get all the available repository types.

Private Methods

Method Description
GetRepositoryWithOutChildDetails ( Microsoft.Research.DataOnboarding.DomainModel.Repository repsoitory ) : Microsoft.Research.DataOnboarding.DomainModel.Repository
SetRepositoryMetaData ( Repository repositoryData, Repository updatedRepositoryData, RepositoryMetadata savedRepositoryMetaData ) : RepositoryMetadata
SetRepositoryValues ( Repository repositoryDetails ) : Repository

Method Details

AddUpdateRepository() public method

Method to add\update the specified repository.
public AddUpdateRepository ( Microsoft.Research.DataOnboarding.DomainModel.Repository repositoryData ) : bool
repositoryData Microsoft.Research.DataOnboarding.DomainModel.Repository Repository details.
return bool

CheckRepositoryExists() public method

Method to check the duplicate repository name.
public CheckRepositoryExists ( string repositoryName ) : int
repositoryName string Repository name.
return int

DeleteRepository() public method

Method to delete the repository.
public DeleteRepository ( int repositoryId ) : bool
repositoryId int
return bool

DeleteRepositoryMetaDataFields() public method

Method to delete repository metadata feidls
public DeleteRepositoryMetaDataFields ( int repositoryId, string repositoryMetaDataFields ) : bool
repositoryId int
repositoryMetaDataFields string
return bool

GetMetadataTypes() public method

Returns the Metadata Types.
public GetMetadataTypes ( ) : IEnumerable
return IEnumerable

GetRepositoriesByRoleAndFileExtension() public method

Gets all the repositories that allows a file extension.
public GetRepositoriesByRoleAndFileExtension ( bool isAdmin, string fileExtension ) : IEnumerable
isAdmin bool Is administrator
fileExtension string File extension.
return IEnumerable

GetRepositoryById() public method

Method to get the selected repository details.
public GetRepositoryById ( int repositoryId ) : Microsoft.Research.DataOnboarding.DomainModel.Repository
repositoryId int Repository id.
return Microsoft.Research.DataOnboarding.DomainModel.Repository

GetRepositoryByName() public method

Method to get the selected repository details.
public GetRepositoryByName ( string name ) : Microsoft.Research.DataOnboarding.DomainModel.Repository
name string Repository name.
return Microsoft.Research.DataOnboarding.DomainModel.Repository

RepositoryService() public method

Initalizes the Respository Service
public RepositoryService ( IRepositoryDetails repositoryDetails, IUnitOfWork unitOfWork, IUserRepository userRepository, IFileRepository fileRepository ) : Microsoft.Research.DataOnboarding.DataAccessService
repositoryDetails IRepositoryDetails Repository Details
unitOfWork IUnitOfWork object of IUnitOfWork
userRepository IUserRepository
fileRepository IFileRepository
return Microsoft.Research.DataOnboarding.DataAccessService

RetrieveRepositories() public method

Method to retrieve all the available repositories.
public RetrieveRepositories ( bool includeAdminRepositories ) : IEnumerable
includeAdminRepositories bool bool indicates if repositories marked as AdminOnly should be returned or not
return IEnumerable

RetrieveRepositoryTypes() public method

Method to get all the available repository types.
public RetrieveRepositoryTypes ( ) : IEnumerable
return IEnumerable