Examples of EditTabResearcherPage


Examples of org.dspace.app.cris.model.jdyna.EditTabResearcherPage

        List<EditTabResearcherPage> tabs = getApplicationService()
                .getTabsByVisibility(EditTabResearcherPage.class,
                        isAdmin);

        // check if request tab from view is active (check on collection before)
        EditTabResearcherPage editT = getApplicationService().get(
                EditTabResearcherPage.class,
                anagraficaObjectDTO.getTabId());
        if (!tabs.contains(editT))
        {
            throw new AuthorizeException(
                    "You not have needed authorization level to display this tab");
        }

        // collection of boxs
        List<BoxResearcherPage> propertyHolders = new LinkedList<BoxResearcherPage>();

        // if edit tab got a display tab (edit tab is hookup to display tab)
        // then edit box will be created from display box otherwise get all boxs
        // in edit tab
        if (editT.getDisplayTab() != null)
        {
            for (BoxResearcherPage box : editT.getDisplayTab()
                    .getMask())
            {
                propertyHolders.add(box);
            }
        }
View Full Code Here

Examples of org.dspace.app.cris.model.jdyna.EditTabResearcherPage

                }
                areaId = tabs.get(0).getId();
            }
            else
            {
                EditTabResearcherPage fuzzyEditTab = (EditTabResearcherPage)((ApplicationService)getApplicationService()).<BoxResearcherPage, TabResearcherPage, EditTabResearcherPage>getEditTabByDisplayTab(Integer.parseInt(paramFuzzyTabId),EditTabResearcherPage.class);
                areaId = fuzzyEditTab.getId();
            }
        }
        else
        {
            areaId = Integer.parseInt(paramTabId);
        }
       
        EditTabResearcherPage editT = getApplicationService().get(
                EditTabResearcherPage.class, areaId);
        List<BoxResearcherPage> propertyHolders = new LinkedList<BoxResearcherPage>();
        if (editT.getDisplayTab() != null)
        {
            for (BoxResearcherPage box : editT.getDisplayTab()
                    .getMask())
            {
                propertyHolders.add(box);
            }
        }
        else
        {
            propertyHolders = getApplicationService().findPropertyHolderInTab(
                    getClazzTab(), areaId);
        }

        List<IContainable> tipProprietaInArea = new LinkedList<IContainable>();

        for (BoxResearcherPage iph : propertyHolders)
        {
            if (editT.getDisplayTab() != null)
            {
                tipProprietaInArea
                        .addAll(getApplicationService()
                                .<BoxResearcherPage, it.cilea.osd.jdyna.web.Tab<BoxResearcherPage>> findContainableInPropertyHolder(
                                        BoxResearcherPage.class,
View Full Code Here

Examples of org.dspace.app.cris.model.jdyna.EditTabResearcherPage

        RPAnagraficaObjectDTO anagraficaObjectDTO = (RPAnagraficaObjectDTO) object;

        String exitPage = "redirect:/cris/tools/rp/editDynamicData.htm?id="
                + anagraficaObjectDTO.getParentId();

        EditTabResearcherPage editT = getApplicationService().get(
                EditTabResearcherPage.class,
                anagraficaObjectDTO.getTabId());
        if (anagraficaObjectDTO.getNewTabId() != null)
        {
            exitPage += "&tabId=" + anagraficaObjectDTO.getNewTabId();
        }
        else
        {
            exitPage = "redirect:/cris/rp/"
                    + ResearcherPageUtils
                            .getPersistentIdentifier(anagraficaObjectDTO
                                    .getParentId(), ResearcherPage.class) + "/"
                    + editT.getShortName().substring(4) + ".html";
        }
        if (request.getParameter("cancel") != null)
        {
            return new ModelAndView(exitPage);
        }

        ResearcherPage researcher = getApplicationService().get(
                ResearcherPage.class, anagraficaObjectDTO.getParentId());
        RPAdditionalFieldStorage myObject = researcher.getDynamicField();

        List<BoxResearcherPage> propertyHolders = new LinkedList<BoxResearcherPage>();
        if (editT.getDisplayTab() != null)
        {
            for (BoxResearcherPage box : editT.getDisplayTab()
                    .getMask())
            {
                propertyHolders.add(box);
            }
        }
        else
        {
            propertyHolders = getApplicationService().findPropertyHolderInTab(
                    getClazzTab(), anagraficaObjectDTO.getTabId());
        }

        List<IContainable> tipProprietaInArea = new LinkedList<IContainable>();

        for (BoxResearcherPage iph : propertyHolders)
        {

            tipProprietaInArea
                    .addAll(getApplicationService()
                            .<BoxResearcherPage, it.cilea.osd.jdyna.web.Tab<BoxResearcherPage>> findContainableInPropertyHolder(
                                    getClazzBox(), iph.getId()));

        }

        List<RPPropertiesDefinition> realTPS = new LinkedList<RPPropertiesDefinition>();
        List<IContainable> structuralField = new LinkedList<IContainable>();
        for (IContainable c : tipProprietaInArea)
        {
            RPPropertiesDefinition rpPd = getApplicationService()
                    .findPropertiesDefinitionByShortName(
                            RPPropertiesDefinition.class, c.getShortName());
            if (rpPd != null)
            {
                realTPS.add(rpPd);
            }
            else
            {
                structuralField.add(c);
            }
        }

        AnagraficaUtils.reverseDTO(anagraficaObjectDTO, myObject, realTPS);

        myObject.pulisciAnagrafica();
        researcher.setSourceID(anagraficaObjectDTO.getSourceID());
        researcher.setStatus(anagraficaObjectDTO.getStatus());
        researcher.setEpersonID(anagraficaObjectDTO.getEpersonID());
       
        getApplicationService().saveOrUpdate(ResearcherPage.class, researcher);
        EditTabResearcherPage area = getApplicationService().get(
                getClazzTab(), anagraficaObjectDTO.getTabId());
        final String areaTitle = area.getTitle();
        saveMessage(
                request,
                getText("action.anagrafica.edited", new Object[] { areaTitle },
                        request.getLocale()));
View Full Code Here

Examples of org.dspace.app.cris.model.jdyna.EditTabResearcherPage

        AnagraficaObjectAreaDTO dto = (AnagraficaObjectAreaDTO) command;
        ResearcherPage researcher = getApplicationService().get(
                ResearcherPage.class, dto.getParentId());
        RPAdditionalFieldStorage myObject = researcher.getDynamicField();

        EditTabResearcherPage editT = getApplicationService().get(
                EditTabResearcherPage.class, dto.getTabId());
        List<BoxResearcherPage> propertyHolders = new LinkedList<BoxResearcherPage>();
        if (editT.getDisplayTab() != null)
        {
            for (BoxResearcherPage box : editT.getDisplayTab()
                    .getMask())
            {
                propertyHolders.add(box);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.