Package org.dspace.app.xmlui.wing

Examples of org.dspace.app.xmlui.wing.Message


                    identifier = "hdl:" + handle;
                }

                // check why the item is restricted.
                String divID = "restricted";
                Message title = T_head_item;
                Message status = T_para_item_restricted;
                //if item is withdrawn, display withdrawn status info
                if (((Item) dso).isWithdrawn())
                {
                    divID = "withdrawn";
                    title = T_head_item_withdrawn;
                    status = T_para_item_withdrawn;
                    isWithdrawn = true;
                }//if user is not authenticated, display info to authenticate
                else if (context.getCurrentUser() == null)
                {
                    status = T_para_item_restricted_auth;
                }
                unauthorized = body.addDivision(divID, "primary");
                unauthorized.setHead(title);
                unauthorized.addPara(T_para_item.parameterize(identifier));
                unauthorized.addPara("item_status", status.getKey()).addContent(status);

            }
        } // end if Item
        else
        {
View Full Code Here


      {
        // Group's can not have blank names.
        result.setContinue(false);
        result.addError("group_name");
        result.setOutcome(false);
        result.setMessage(new Message("default","The group name may not be blank."));
       
        return result;
      }
     
      // Create a new group, check if the newName is already in use.
      Group potentialDuplicate = Group.findByName(context,newName);
     
      if (potentialDuplicate == null)
        {
        // All good, create the new group.
        group = Group.create(context);
        group.setName(newName);
        }
      else
      {
        // The name is already in use, return an error.
          result.setContinue(false);
          result.addError("group_name");
          result.addError("group_name_duplicate");
          result.setOutcome(false);
          result.setMessage(new Message("default","The group name is already in use"));
         
          return result;
      }
    }
    else
    {
      group = Group.find(context,groupID);
      String name = group.getName();
     
      // Only update the name if there has been a change.
      if (newName != null && newName.length() > 0 && !name.equals(newName))
      {
        // The group name is to be updated, check if the newName is already in use.
        Group potentialDuplicate = Group.findByName(context,newName);
       
        if (potentialDuplicate == null)
          {
          // All good, update the name
          group.setName(newName);
          }
        else
        {
          // The name is already in use, return an error.
            result.setContinue(false);
            result.addError("group_name");
            result.addError("group_name_duplicate");
            result.setOutcome(false);
            result.setMessage(new Message("default","The group name is already in use"));
           
            return result;
        }
      }
    }
View Full Code Here

     
      result.setContinue(true);
      result.setOutcome(true);
      if (added)
        {
            result.setMessage(new Message("default", "A new policy was created successfully"));
        }
      else
        {
            result.setMessage(new Message("default", "The policy was edited successfully"));
        }
     
      result.setParameter("policyID", policy.getID());
     
    return result;
View Full Code Here

      policyDeleted.delete();
      }
 
    result.setContinue(true);
    result.setOutcome(true);
    result.setMessage(new Message("default","The policies were deleted successfully"));
   
    return result;
  }
View Full Code Here

      }
      } 
   
    result.setContinue(true);
    result.setOutcome(true);
    result.setMessage(new Message("default","The policies were added successfully!"));
   
    return result;
  }
View Full Code Here

        }
    }
   
    result.setContinue(true);
    result.setOutcome(true);
    result.setMessage(new Message("default","The policies for the selected collections were cleared."));
   
    return result;
  }
View Full Code Here

                continue;
            }
     
            shown++;
     
            Message timeStampMessage = null;
            long ago = System.currentTimeMillis() - event.getTimeStamp();

            if (ago > 2*60*60*1000)
            {
                timeStampMessage = T_hours.parameterize((ago / (60 * 60 * 1000)));
 
View Full Code Here

        //Create a new section for this Initial Questions information
        List initSection = reviewList.addList("submit-review-" + this.stepAndPage, List.TYPE_FORM);
        initSection.setHead(T_head);
       
        //add information to review
        Message multipleTitles = ReviewStep.T_no;
        if (submission.hasMultipleTitles())
        {
            multipleTitles = ReviewStep.T_yes;
        }
   
        Message publishedBefore = ReviewStep.T_no;
        if (submission.isPublishedBefore())
        {
            publishedBefore = ReviewStep.T_yes;
        }
       
View Full Code Here

    }
    catch (AuthorizeException ae)
    {
      // give the exception error as a notice.
      result.setOutcome(false);
      result.setMessage(new Message(null,ae.getMessage()));
    }
   
    return result;
  }
View Full Code Here

            BitstreamFormat bitstreamFormat = bitstream.getFormat();
           
            String name = bitstream.getName();
            String url = makeBitstreamLink(item, bitstream);
            String format = bitstreamFormat.getShortDescription();
            Message support = ReviewStep.T_unknown;
            if (bitstreamFormat.getSupportLevel() == BitstreamFormat.KNOWN)
            {
                support = T_known;
            }
            else if (bitstreamFormat.getSupportLevel() == BitstreamFormat.SUPPORTED)
View Full Code Here

TOP

Related Classes of org.dspace.app.xmlui.wing.Message

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.