Package org.dspace.app.cris.statistics.bean

Examples of org.dspace.app.cris.statistics.bean.RightMenuBean


            // create right menu
            List<RightMenuBean> rightMenu = new ArrayList<RightMenuBean>();
            if (statsComponentsService.isShowSelectedObject())
            {
                RightMenuBean menuV = new RightMenuBean();
                menuV.setMode(StatsComponent.VIEW);
                menuV.setType(AStatComponentService._SELECTED_OBJECT);
                if (type.equals(menuV.getType())
                        && mode.equals(menuV.getMode()))
                {
                    menuV.setCurrent(true);
                }
                rightMenu.add(menuV);

                RightMenuBean menuD = new RightMenuBean();
                menuD.setMode(StatsComponent.DOWNLOAD);
                menuD.setType(AStatComponentService._SELECTED_OBJECT);
                if (type.equals(menuD.getType())
                        && mode.equals(menuD.getMode()))
                {
                    menuD.setCurrent(true);
                }
                rightMenu.add(menuD);
            }

            for (String key : components.keySet())
            {
                boolean createMenu = true;
                if (ResearchObject.class.isAssignableFrom(getTarget()))
                {
                    String relationName = ((ICRISComponent) components.get(key))
                            .getRelationConfiguration().getRelationName();
                    if(!relationName.startsWith(getApplicationService().get(ResearchObject.class, Integer.parseInt(id)).getTypeText())) {
                        createMenu = false;
                    }
                }

                if (createMenu)
                {
                    RightMenuBean menuV = new RightMenuBean();
                    menuV.setMode(StatsComponent.VIEW);
                    menuV.setType(key);
                    if (type.equals(menuV.getType())
                            && mode.equals(menuV.getMode()))
                    {
                        menuV.setCurrent(true);
                    }
                    rightMenu.add(menuV);

                    RightMenuBean menuD = new RightMenuBean();
                    menuD.setMode(StatsComponent.DOWNLOAD);
                    menuD.setType(key);
                    if (type.equals(menuD.getType())
                            && mode.equals(menuD.getMode()))
                    {
                        menuD.setCurrent(true);
                    }
                    rightMenu.add(menuD);
                }
            }
View Full Code Here

TOP

Related Classes of org.dspace.app.cris.statistics.bean.RightMenuBean

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.