Search in sources :

Example 1 with RepositoryManager

use of com.sun.enterprise.admin.servermgmt.RepositoryManager in project Payara by payara.

the class DomainBuilder method validateTemplate.

/**
 * Validate's the template.
 *
 * @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();
        // Validate other domain config parameters.
        new PEDomainConfigValidator().validate(_domainConfig);
    } catch (Exception ex) {
        throw new DomainException(ex);
    }
}
Also used : PEDomainConfigValidator(com.sun.enterprise.admin.servermgmt.pe.PEDomainConfigValidator) DomainException(com.sun.enterprise.admin.servermgmt.DomainException) RepositoryManager(com.sun.enterprise.admin.servermgmt.RepositoryManager) DomainException(com.sun.enterprise.admin.servermgmt.DomainException) RepositoryException(com.sun.enterprise.admin.servermgmt.RepositoryException)

Aggregations

DomainException (com.sun.enterprise.admin.servermgmt.DomainException)1 RepositoryException (com.sun.enterprise.admin.servermgmt.RepositoryException)1 RepositoryManager (com.sun.enterprise.admin.servermgmt.RepositoryManager)1 PEDomainConfigValidator (com.sun.enterprise.admin.servermgmt.pe.PEDomainConfigValidator)1