Package org.dspace.eperson

Examples of org.dspace.eperson.EPerson


                        ApplicationService.class);

        String researcher = req.getParameter("researcher");

       
        EPerson currUser = context.getCurrentUser();
       
        ResearcherPage rp = service.get(ResearcherPage.class, ResearcherPageUtils
                .getRealPersistentIdentifier(researcher, ResearcherPage.class), true);

        try
        {
            if (rp == null  && // cv is hide
                    !(AuthorizeManager.isAdmin(context) || // the user logged in is
                                                           // not an admin
                    (currUser != null && (rp.getEpersonID() != null && currUser
                            .getID() == rp.getEpersonID())))) // the user logged
                                                                 // in is not the
                                                                 // rp owner
                   
            {
View Full Code Here


                    "OU page not found");
            return null;
        }

        Context context = UIUtil.obtainContext(request);
        EPerson currentUser = context.getCurrentUser();
        if ((ou.getStatus() == null || ou.getStatus().booleanValue() == false)
                && !AuthorizeManager.isAdmin(context))
        {
           
            if (currentUser != null
View Full Code Here

        String uuid = arg0.getParameter("uid");
        int type = UIUtil.getIntParameter(arg0, "type");
        boolean showList = UIUtil.getBoolParameter(arg0, "list");
        int[] freqs = UIUtil.getIntParameters(arg0, "freq");
        Context context = UIUtil.obtainContext(arg0);
        EPerson e = context.getCurrentUser();

        statSubService.subscribeUUID(e, uuid, freqs, type);

        if (showList)
        {
View Full Code Here

        String clearAll = arg0.getParameter("clear");
        String uuid = arg0.getParameter("uid");
        int type = UIUtil.getIntParameter(arg0, "type");
        boolean showList = UIUtil.getBoolParameter(arg0, "list");
        Context context = UIUtil.obtainContext(arg0);
        EPerson e = context.getCurrentUser();
        if (StringUtils.isNotEmpty(clearAll)
                && clearAll.equalsIgnoreCase("all"))
        {
            statSubService.clearAll(e);
            showList = true;
View Full Code Here

    public ModelAndView list(HttpServletRequest arg0, HttpServletResponse arg1)
            throws Exception
    {
        Context context = UIUtil.obtainContext(arg0);
        EPerson e = context.getCurrentUser();

        List<StatSubscriptionViewBean> subscriptions = statSubService
                .getSubscriptions(context, e);

        ModelAndView mv = new ModelAndView(listView);
View Full Code Here

            HttpServletRequest request)
    {
        try
        {
            Context context = UIUtil.obtainContext(request);
            EPerson currUser = context.getCurrentUser();
            if (currUser != null)
            {
                List<StatSubscription> statSubs = applicationService
                        .getStatSubscriptionByEPersonIDAndUID(currUser.getID(), getObject(request).getHandle());                               
                for (StatSubscription sub : statSubs)
                {
                    switch (sub.getFreq())
                    {
                    case StatSubscription.FREQUENCY_DAILY:
View Full Code Here

  @Override
  protected Map referenceData(HttpServletRequest request) throws Exception {
    Map<String, Object> model = new HashMap<String, Object>();
    Context context = UIUtil.obtainContext(request);
    EPerson currUser = context.getCurrentUser();
    boolean isAdmin = AuthorizeManager.isAdmin(context);
    if (currUser != null) {
      model.put("researcher_page_menu", new Boolean(true));
    }
    if (isAdmin) {
View Full Code Here

 
  @Override
  public ModelAndView handleRequest(HttpServletRequest request,
      HttpServletResponse response) throws Exception {
      Context context = UIUtil.obtainContext(request);
      EPerson currUser = context.getCurrentUser();
        if (currUser == null)
        {
            throw new ServletException("Wrong data or configuration: access to the my rp servlet without a valid user: there is no user logged in or the user's netid is null");
        }
       
        if (AuthorizeManager.isAdmin(context))
        {
            response.sendRedirect(request.getContextPath()+ "/dspace-admin/");
        }
        else
        {
            Integer id = currUser.getID();
            ResearcherPage rp = applicationService.getResearcherPageByEPersonId(id);
            if (rp != null && rp.getStatus() != null && rp.getStatus().booleanValue())
            {
                response.sendRedirect(request.getContextPath() + "/rp/" + ResearcherPageUtils.getPersistentIdentifier(rp));
            }
View Full Code Here

            id = Integer.parseInt(paramId);
        }
        ResearcherPage researcher = getApplicationService().get(
                ResearcherPage.class, id);
        Context context = UIUtil.obtainContext(request);
        EPerson currentUser = context.getCurrentUser();
        if ((currentUser==null || (researcher.getEpersonID()!=null && currentUser.getID()!=researcher.getEpersonID()))
               && !AuthorizeManager.isAdmin(context))
        {
            throw new AuthorizeException(
                    "Only system admin can edit not personal researcher page");
        }
View Full Code Here

  @Override
  protected Map referenceData(HttpServletRequest request) throws Exception {
    Map<String, Object> model = new HashMap<String, Object>();
    Context context = UIUtil.obtainContext(request);
    EPerson currUser = context.getCurrentUser();
    boolean isAdmin = AuthorizeManager.isAdmin(context);
    if (currUser != null) {
      model.put("researcher_page_menu", new Boolean(true));
    }
    if (isAdmin) {
View Full Code Here

TOP

Related Classes of org.dspace.eperson.EPerson

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.