* @throws DomainException If any exception occurs in validation.
*/
public void validateTemplate() throws DomainException {
try {
// Sanity check on the repository.
RepositoryManager repoManager = new RepositoryManager();
repoManager.checkRepository(_domainConfig, false);
// Validate the port values.
DomainPortValidator portValidator = new DomainPortValidator(_domainConfig, _defaultPortValues);
portValidator.validateAndSetPorts();