Package org.dspace.app.util

Examples of org.dspace.app.util.SubmissionConfig


  {
    // Get actionable URL
    Collection collection = submission.getCollection();
    String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue";

        SubmissionConfig subConfig = submissionInfo.getSubmissionConfig();
       
        //Part A:
        // Build the main Review Form!
        Division div = body.addInteractiveDivision("submit-upload", actionURL, Division.METHOD_POST, "primary submission");
        div.setHead(T_submission_head);
        addSubmissionProgressList(div);
       
        List review = div.addList("submit-review", List.TYPE_FORM);
        review.setHead(T_head);
       
        // Part B:
        // Add review section for each step
       
        //get a list of all pages in progress bar
        //(this is to ensure we are no looping through non-interactive steps)
        Set submissionPagesSet = submissionInfo.getProgressBarInfo().keySet();
        String[] submissionPages = (String[]) submissionPagesSet.toArray(new String[submissionPagesSet.size()]);
       
        //loop through each page in progress bar,
        //adding each as a separate section to the review form
        for(int i=0; i<submissionPages.length; i++)
        {
            double currentStepAndPage = Double.valueOf(submissionPages[i]).doubleValue();
           
            //If the step we are looking at is this current
            // Review/Verify step, exit the for loop,
            // since we have completed all steps up to this one!
            if(currentStepAndPage==this.stepAndPage)
            {
                break;
            }
           
            //load up step configuration
            SubmissionStepConfig stepConfig = subConfig.getStep(FlowUtils.getStep(currentStepAndPage));
           
            //load the step's XML-UI Class
            AbstractStep stepUIClass = loadXMLUIClass(stepConfig.getXMLUIClassName());
           
            try
View Full Code Here


            throws ServletException, IOException, SQLException,
            AuthorizeException
    {
        // load the current submission process config
        // to get the list of steps the user went through
        SubmissionConfig subProcessConfig = subInfo.getSubmissionConfig();

        // create a HashMap of step data to review for the Verify JSP
        // This HashMap will be the following format:
        // key = stepNumber.pageNumber
        // value = path to review JSP for this Step (which will load the users
        // answers)
        LinkedHashMap reviewData = new LinkedHashMap();

        // this shouldn't happen...but just in case!
        if (subInfo.getProgressBarInfo() == null)
        {
            // progress bar information is lost!
            log.warn(LogManager.getHeader(context, "integrity_error", UIUtil
                    .getRequestLogInfo(request)));
            JSPManager.showIntegrityError(request, response);
            return;
        }

        // loop through the steps in our Progress Bar
        // (since these are steps the user visited)
        Iterator stepIterator = subInfo.getProgressBarInfo().keySet()
                .iterator();
        while (stepIterator.hasNext())
        {
            // remember, the keys of the progressBar hashmap is in the
            // format: stepNumber.pageNumber
            String stepAndPage = (String) stepIterator.next();

            // extract out the step number (which is before the period)
            String[] fields = stepAndPage.split("\\."); // split on period
            int stepNum = Integer.parseInt(fields[0]);

            // only include this step if it is BEFORE the current "verify" step
            // (We cannot review steps that we haven't gotten to!!)
            if (stepNum < SubmissionController.getCurrentStepConfig(request,
                    subInfo).getStepNumber())
            {
                // load this step's information
                SubmissionStepConfig s = subProcessConfig.getStep(stepNum);

                try
                {
                    JSPStepManager stepManager = JSPStepManager.loadStep(s);
               
View Full Code Here

            // Load the Submission Process for the collection this WSI is
            // associated with
            Collection c = wsi.getCollection();
            SubmissionConfigReader subConfigReader = new SubmissionConfigReader();
            SubmissionConfig subConfig = subConfigReader.getSubmissionConfig(c
                    .getHandle(), false);

            // Set the "stage_reached" column on the workspace item
            // to the LAST page of the LAST step in the submission process
            // (i.e. the page just before "Complete")
            int lastStep = subConfig.getNumberOfSteps() - 2;
            wsi.setStageReached(lastStep);
            wsi.setPageReached(AbstractProcessingStep.LAST_PAGE_REACHED);
            wsi.update();

            JSPManager
View Full Code Here

            WorkspaceItem wsi = WorkflowManager.reject(context, workflowItem,context.getCurrentUser(), reason);
     
      //Load the Submission Process for the collection this WSI is associated with
            Collection c = wsi.getCollection();
            SubmissionConfigReader subConfigReader = new SubmissionConfigReader();
            SubmissionConfig subConfig = subConfigReader.getSubmissionConfig(c.getHandle(), false);
           
            // Set the "stage_reached" column on the workspace item
            // to the LAST page of the LAST step in the submission process
            // (i.e. the page just before "Complete", which is at NumSteps-1)
            int lastStep = subConfig.getNumberOfSteps()-2;
            wsi.setStageReached(lastStep);
            wsi.setPageReached(AbstractProcessingStep.LAST_PAGE_REACHED);
            wsi.update();
           
            context.commit();
View Full Code Here

            throws ServletException, IOException, SQLException,
            AuthorizeException
    {
        // load the current submission process config
        // to get the list of steps the user went through
        SubmissionConfig subProcessConfig = subInfo.getSubmissionConfig();

        // create a HashMap of step data to review for the Verify JSP
        // This HashMap will be the following format:
        // key = stepNumber.pageNumber
        // value = path to review JSP for this Step (which will load the users
        // answers)
        Map<String, String> reviewData = new LinkedHashMap<String, String>();

        // this shouldn't happen...but just in case!
        if (subInfo.getProgressBarInfo() == null)
        {
            // progress bar information is lost!
            log.warn(LogManager.getHeader(context, "integrity_error", UIUtil
                    .getRequestLogInfo(request)));
            JSPManager.showIntegrityError(request, response);
            return;
        }

        // loop through the steps in our Progress Bar
        // (since these are steps the user visited)
        Iterator<String> stepIterator = subInfo.getProgressBarInfo().keySet()
                .iterator();
        while (stepIterator.hasNext())
        {
            // remember, the keys of the progressBar hashmap is in the
            // format: stepNumber.pageNumber
            String stepAndPage = stepIterator.next();

            // extract out the step number (which is before the period)
            String[] fields = stepAndPage.split("\\."); // split on period
            int stepNum = Integer.parseInt(fields[0]);

            // only include this step if it is BEFORE the current "verify" step
            // (We cannot review steps that we haven't gotten to!!)
            if (stepNum < SubmissionController.getCurrentStepConfig(request,
                    subInfo).getStepNumber())
            {
                // load this step's information
                SubmissionStepConfig s = subProcessConfig.getStep(stepNum);

                try
                {
                    JSPStepManager stepManager = JSPStepManager.loadStep(s);
               
View Full Code Here

            // Load the Submission Process for the collection this WSI is
            // associated with
            Collection c = wsi.getCollection();
            SubmissionConfigReader subConfigReader = new SubmissionConfigReader();
            SubmissionConfig subConfig = subConfigReader.getSubmissionConfig(c
                    .getHandle(), false);

            // Set the "stage_reached" column on the workspace item
            // to the LAST page of the LAST step in the submission process
            // (i.e. the page just before "Complete")
            int lastStep = subConfig.getNumberOfSteps() - 2;
            wsi.setStageReached(lastStep);
            wsi.setPageReached(AbstractProcessingStep.LAST_PAGE_REACHED);
            wsi.update();

            JSPManager
View Full Code Here

  {
    // Get actionable URL
    Collection collection = submission.getCollection();
    String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue";

        SubmissionConfig subConfig = submissionInfo.getSubmissionConfig();
       
        //Part A:
        // Build the main Review Form!
        Division div = body.addInteractiveDivision("submit-upload", actionURL, Division.METHOD_POST, "primary submission");
        div.setHead(T_submission_head);
        addSubmissionProgressList(div);
       
        List review = div.addList("submit-review", List.TYPE_FORM);
        review.setHead(T_head);
       
        // Part B:
        // Add review section for each step
       
        //get a list of all pages in progress bar
        //(this is to ensure we are no looping through non-interactive steps)
        Set submissionPagesSet = submissionInfo.getProgressBarInfo().keySet();
        String[] submissionPages = (String[]) submissionPagesSet.toArray(new String[submissionPagesSet.size()]);
       
        //loop through each page in progress bar,
        //adding each as a separate section to the review form
        for(int i=0; i<submissionPages.length; i++)
        {
            StepAndPage currentStepAndPage = new StepAndPage(submissionPages[i]);
           
            //If the step we are looking at is this current
            // Review/Verify step, exit the for loop,
            // since we have completed all steps up to this one!
            if(currentStepAndPage.equals(this.stepAndPage))
            {
                break;
            }
           
            //load up step configuration
            SubmissionStepConfig stepConfig = subConfig.getStep(currentStepAndPage.getStep());
           
            //load the step's XML-UI Class
            AbstractStep stepUIClass = loadXMLUIClass(stepConfig.getXMLUIClassName());
           
            try
View Full Code Here

TOP

Related Classes of org.dspace.app.util.SubmissionConfig

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.