Package org.fenixedu.academic.domain.exceptions

Examples of org.fenixedu.academic.domain.exceptions.DomainException


    static public BufferedImage readImage(byte[] imageData) {
        ByteArrayInputStream bais = new ByteArrayInputStream(imageData);
        try {
            return ImageIO.read(bais);
        } catch (IOException ioe) {
            throw new DomainException("error.photograph.imageio.failedReadingImageFromByteArray", ioe);
        }
    }
View Full Code Here


        super.setUrl(url);
    }

    private void checkParameters(final String url) {
        if (StringUtils.isEmpty(url)) {
            throw new DomainException("error.domain.contacts.WebAddress.invalid.url");
        }
    }
View Full Code Here

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        try {
            ImageIO.write(image, fileFormat.getFileExtention(), out);
            return out.toByteArray();
        } catch (IOException ioe) {
            throw new DomainException("error.photograph.imageio.failedWritingImageToByteArray", ioe);
        }
    }
View Full Code Here

        this.setCurriculumGroup(curriculumGroup);
    }

    private void checkParameters(final RootCurriculumGroup curriculumGroup) {
        if (curriculumGroup == null) {
            throw new DomainException("error.NoCourseGroupCurriculumGroup.invalid.curriculumGroup");
        }
    }
View Full Code Here

        case INTERNAL_CREDITS_SOURCE_GROUP:
            return new InternalCreditsSourceCurriculumGroup(curriculumGroup);

        default:
            throw new DomainException("error.unknown.NoCourseGroupCurriculumGroupType");
        }
    }
View Full Code Here

    }

    protected void init(final Credits credits) {
        String[] args = {};
        if (credits == null) {
            throw new DomainException("error.EnrolmentWrapper.credits.cannot.be.null", args);
        }
        super.setCredits(credits);
    }
View Full Code Here

        super.setCredits(credits);
    }

    @Override
    public void setCredits(Credits credits) {
        throw new DomainException("error.EnrolmentWrapper.cannot.modify.credits");
    }
View Full Code Here

        } else if (enrolment.isEnrolment()) {
            return new InternalEnrolmentWrapper(credits, (Enrolment) enrolment);

        } else {
            throw new DomainException("error.EnrolmentWrapper.unknown.enrolment");
        }
    }
View Full Code Here

        init(degreeCurricularPlan, executionSemester, startDate, endDate);
    }

    private void checkForExistingPeriod(final DegreeCurricularPlan degreeCurricularPlan, final ExecutionSemester executionSemester) {
        if (degreeCurricularPlan.getReingressionPeriod(executionSemester) != null) {
            throw new DomainException("error.ReingressionPeriod.period.already.exists.for.dcp.and.semester");
        }
    }
View Full Code Here

            new BranchCurriculumGroup(parentGroup, (BranchCourseGroup) courseGroup);

        } else if (courseGroup.isRoot()) {

            throw new DomainException("error.CurriculumGroupFactory.use.create.root.method");

        } else {

            return (executionSemester != null) ?
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.exceptions.DomainException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.