Package org.dspace.content

Examples of org.dspace.content.InProgressSubmission


                    }
                }

                // get this WSI
                int id = Integer.parseInt(pathElt[1].substring(7));
                InProgressSubmission ips = WorkspaceItem.find(context, id);
                if (ips == null)
                {
                    log.warn("invalid WorkspaceItem DB ID in DAV URI, " + "id="
                            + pathElt[1]);
                    throw new DAVStatusException(
View Full Code Here


                    }
                }

                // get this WFI
                int id = Integer.parseInt(pathElt[1].substring(7));
                InProgressSubmission ips = WorkflowItem.find(context, id);
                if (ips == null)
                {
                    log.warn("invalid WorkflowItem DB ID in DAV URI, " + "id="
                            + pathElt[1]);
                    throw new DAVStatusException(
View Full Code Here

    public int doProcessing(Context context, HttpServletRequest request,
            HttpServletResponse response, SubmissionInfo subInfo)
            throws ServletException, IOException, SQLException,
            AuthorizeException
    {
        InProgressSubmission submissionItem = subInfo.getSubmissionItem();
        submissionItem.setMultipleFiles(true);
        submissionItem.setMultipleTitles(true);
        submissionItem.setPublishedBefore(true);
        submissionItem.update();
        return STATUS_COMPLETE;
    }
View Full Code Here

     */
    public static boolean isItemInSubmission(Context context, Item item)
            throws SQLException
    {
        WorkspaceItem workspaceItem = WorkspaceItem.findByItem(context, item);
        InProgressSubmission workflowItem = WorkflowItem.findByItem(context,
                item);

        return workspaceItem != null || workflowItem != null;
    }
View Full Code Here

        WorkspaceItem wsi = wft.getWorkspaceItem(context, item);
        wsi.deleteAll();
      }
      else if (wft.isItemInWorkflow(context, item))
      {
        InProgressSubmission wfi = wft.getWorkflowItem(context, item);
        wfi.deleteWrapper();
      }

      // then delete the item
      Collection[] collections = item.getCollections();
      for (Collection collection : collections)
View Full Code Here

   * @param context
   * @param inProgressSubmissionID
   * @return The found workspaceitem or null if none found.
   */
  public static WorkspaceItem findWorkspace(Context context, String inProgressSubmissionID) throws SQLException, AuthorizeException, IOException {
    InProgressSubmission submission = findSubmission(context, inProgressSubmissionID);
    if (submission instanceof WorkspaceItem)
        {
            return (WorkspaceItem) submission;
        }
    return null;
View Full Code Here

         
        //try loading subInfo from HTTP request
        SubmissionInfo subInfo = (SubmissionInfo) request.getAttribute(DSPACE_SUBMISSION_INFO);
       
        //get the submission represented by the WorkspaceID
        InProgressSubmission submission = findSubmission(context, workspaceID);

        //if no submission info, or wrong submission info, reload it!
        if ((subInfo == null && submission!=null) ||
            (subInfo!=null && submission!=null && subInfo.getSubmissionItem().getID()!=submission.getID()))
        {
            try
            {
                final HttpServletRequest httpRequest = (HttpServletRequest) objectModel
                    .get(HttpEnvironment.HTTP_REQUEST_OBJECT);
View Full Code Here

     * @param page the page (within the step) the user has just reached
     */
    public static void setPageReached(Context context, String id, int step, int page)
            throws SQLException, AuthorizeException, IOException
    {
        InProgressSubmission submission = findSubmission(context, id);
   
    if (submission instanceof WorkspaceItem)
    {
      WorkspaceItem workspaceItem = (WorkspaceItem) submission;
     
View Full Code Here

     * @param page the page (within the step) to set as reached, can be also a previous reached page
     */
    public static void setBackPageReached(Context context, String id, int step,
            int page) throws SQLException, AuthorizeException, IOException
    {
        InProgressSubmission submission = findSubmission(context, id);

        if (submission instanceof WorkspaceItem)
        {
            WorkspaceItem workspaceItem = (WorkspaceItem) submission;

View Full Code Here

     * @param context The current DSpace content
   * @param id The unique ID of the current workflow/workspace
     */
  public static int getMaximumStepReached(Context context, String id) throws SQLException, AuthorizeException, IOException {
   
    InProgressSubmission submission = findSubmission(context, id);
   
    if (submission instanceof WorkspaceItem)
    {
      WorkspaceItem workspaceItem = (WorkspaceItem) submission;
      int stage = workspaceItem.getStageReached();
View Full Code Here

TOP

Related Classes of org.dspace.content.InProgressSubmission

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.