class HudsonConnection implements BuildCapability, ViewCapability, TestCapability {

    @Override
    public boolean isProjectDisabled(SoftwareProjectId softwareProjectId) throws ProjectNotFoundException {
        checkConnected();
        checkSoftwareProjectId(softwareProjectId);
        try {
            String jobName = softwareProjectId.getProjectId();
            HudsonJob job = hudson.findJob(jobName);
            return job.isDisabled();
        } catch (HudsonJobNotFoundException e) {
            throw new ProjectNotFoundException("Can't find job with software project id: " + softwareProjectId, e);
        }
    }

}