Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.BibliographicReference


*/
public class DeleteBibliographicReference {

    protected Boolean run(String bibliographicReferenceOID) throws FenixServiceException {

        BibliographicReference bibliographicReference = FenixFramework.getDomainObject(bibliographicReferenceOID);
        if (bibliographicReference == null) {
            throw new InvalidArgumentsServiceException();
        }

        bibliographicReference.delete();
        return true;
    }
View Full Code Here


public class EditBibliographicReference {

    protected Boolean run(String bibliographicReferenceID, String newTitle, String newAuthors, String newReference,
            String newYear, Boolean optional) throws FenixServiceException {

        final BibliographicReference bibliographicReference = FenixFramework.getDomainObject(bibliographicReferenceID);
        if (bibliographicReference == null) {
            throw new InvalidArgumentsServiceException();
        }
        bibliographicReference.edit(newTitle, newAuthors, newReference, newYear, optional);

        return true;
    }
View Full Code Here

    public ActionForward prepareEditBibliographicReference(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        final ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");
        final String bibliographicReferenceIDString = request.getParameter("bibliographicReferenceID");
        if (executionCourse != null && bibliographicReferenceIDString != null && bibliographicReferenceIDString.length() > 0) {
            final BibliographicReference bibliographicReference =
                    findBibliographicReference(executionCourse, bibliographicReferenceIDString);
            if (bibliographicReference != null) {
                final DynaActionForm dynaActionForm = (DynaActionForm) form;
                dynaActionForm.set("title", bibliographicReference.getTitle());
                dynaActionForm.set("authors", bibliographicReference.getAuthors());
                dynaActionForm.set("reference", bibliographicReference.getReference());
                dynaActionForm.set("year", bibliographicReference.getYear());
                dynaActionForm.set("optional", bibliographicReference.getOptional().toString());
            }
            request.setAttribute("bibliographicReference", bibliographicReference);
        }
        return forward(request, "/teacher/executionCourse/editBibliographicReference.jsp");
    }
View Full Code Here

        final String reference = dynaActionForm.getString("reference");
        final String year = dynaActionForm.getString("year");
        final String optional = dynaActionForm.getString("optional");

        final ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");
        final BibliographicReference bibliographicReference =
                findBibliographicReference(executionCourse, bibliographicReferenceIDString);

        EditBibliographicReference.runEditBibliographicReference(bibliographicReference.getExternalId(), title, authors,
                reference, year, Boolean.valueOf(optional));

        return forward(request, "/teacher/executionCourse/bibliographicReference.jsp");
    }
View Full Code Here

        if (bibliographicReferenceID == null) {
            return false;
        }

        boolean result = false;
        final BibliographicReference bibliographicReference = FenixFramework.getDomainObject(bibliographicReferenceID);
        final Teacher teacher = Teacher.readTeacherByUsername(id.getUsername());

        if (bibliographicReference != null && teacher != null) {
            final ExecutionCourse executionCourse = bibliographicReference.getExecutionCourse();
            final Iterator associatedProfessorships = teacher.getProfessorshipsIterator();
            // Check if Teacher has a professorship to ExecutionCourse
            // BibliographicReference
            while (associatedProfessorships.hasNext()) {
                Professorship professorship = (Professorship) associatedProfessorships.next();
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.BibliographicReference

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.