Package org.dspace.app.cris.model.jdyna

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


                        .addAll(getApplicationService()
                                .<BoxProject, it.cilea.osd.jdyna.web.Tab<BoxProject>> findContainableInPropertyHolder(
                                        getClazzBox(), iph.getId()));
            }
        }
        ProjectAdditionalFieldStorage dynamicObject = grant.getDynamicField();
        ProjectAnagraficaObjectDTO anagraficaObjectDTO = new ProjectAnagraficaObjectDTO(
                grant);
        anagraficaObjectDTO.setTabId(areaId);
        anagraficaObjectDTO.setObjectId(grant.getId());
        anagraficaObjectDTO.setParentId(grant.getId());
View Full Code Here


        }
       
       
        Project grant = getApplicationService().get(Project.class,
                anagraficaObjectDTO.getParentId());
        ProjectAdditionalFieldStorage myObject = grant.getDynamicField();
       
        List<BoxProject> propertyHolders = new LinkedList<BoxProject>();
        if (editT.getDisplayTab() != null)
        {
            for (BoxProject box : editT.getDisplayTab().getMask())
            {
                propertyHolders.add(box);
            }
        }
        else
        {
            propertyHolders = getApplicationService().findPropertyHolderInTab(
                    getClazzTab(), anagraficaObjectDTO.getTabId());
        }

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

        for (BoxProject iph : propertyHolders)
        {

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

        }

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

        AnagraficaUtils.reverseDTO(anagraficaObjectDTO, myObject, realTPS);
       
        myObject.pulisciAnagrafica();
        grant.setSourceID(anagraficaObjectDTO.getSourceID());
        grant.setStatus(anagraficaObjectDTO.getStatus());
       
        getApplicationService().saveOrUpdate(Project.class, grant);
        EditTabProject area = getApplicationService().get(getClazzTab(),
View Full Code Here

    {

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

        EditTabProject editT = getApplicationService().get(
                EditTabProject.class, dto.getTabId());
        List<BoxProject> propertyHolders = new LinkedList<BoxProject>();
        if (editT.getDisplayTab() != null)
View Full Code Here

    @Embedded
    private ProjectAdditionalFieldStorage dynamicField;

    public Project()
    {
        this.dynamicField = new ProjectAdditionalFieldStorage();
    }
View Full Code Here

                            }
                        }
                        // clone dynamic data and structural on dto

                        clone = (Project) grant.clone();
                        ProjectAdditionalFieldStorage additionalTemp = new ProjectAdditionalFieldStorage();
                        clone.setDynamicField(additionalTemp);
                        additionalTemp.duplicaAnagrafica(grant
                                .getDynamicField());
                        update = true;
                    }
                    else
                    {
                        // here there is perhaps a new grant
                        grant = applicationService
                                .getResearcherGrantByCode(nodeId);
                        if (grant == null)
                        {
                            grant = new Project();
                            grant.setSourceID(nodeId);
                            // use -active in command line to change default
                            // status to active.
                            grant.setStatus(status);

                            clone = (Project) grant.clone();
                            ProjectAdditionalFieldStorage additionalTemp = new ProjectAdditionalFieldStorage();
                            clone.setDynamicField(additionalTemp);
                            additionalTemp.duplicaAnagrafica(grant
                                    .getDynamicField());

                        }
                        else
                        {
View Full Code Here

TOP

Related Classes of org.dspace.app.cris.model.jdyna.ProjectAdditionalFieldStorage

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.