class DomainServiceImpl implements DomainService, Constants {

	@Override
	public Domain getDomainByName(final String domainName) throws PacManException {
		if(domainRepository.existsById(domainName)) {
			return domainRepository.findById(domainName).get();
		} else {
			throw new PacManException(AdminConstants.DOMAIN_NAME_EXITS);
		}
	}

}