Package org.dspace.curate

Examples of org.dspace.curate.Curator


       */
        public static FlowResult processQueueItem(Context context, int itemID, Request request)
                                                                throws AuthorizeException, IOException, SQLException, Exception
  {
                String task = request.getParameter("curate_task");
                Curator curator = FlowCurationUtils.getCurator(task);
                String objId = String.valueOf(itemID);
                String taskQueueName = ConfigurationManager.getProperty("curate", "ui.queuename");
                boolean status = false;
                Item item = Item.find(context, itemID);
                if (item != null)
                {
                    objId = item.getHandle();
                    try
                    {
                        curator.queue(context, objId, taskQueueName);
                        status = true;
                    }
                    catch (IOException ioe)
                    {
                        // no-op (the Curator should have already logged any error that occurred)
View Full Code Here


    }

    private void processCurateObject(Context context, HttpServletRequest request, String handle)
    {
        String task   = request.getParameter("curate_task");
        Curator curator = getCurator(task);
        boolean success = false;
        try
        {
            curator.curate(context, handle);
            success = true;
        }
        catch (Exception e)
        {
            curator.setResult(task, e.getMessage());
        }

        request.setAttribute("task_result", getCurateMessage(context, curator, task, handle, success));
    }
View Full Code Here

        request.setAttribute("task_result", getCurateMessage(context, curator, task, handle, success));
    }

    private void processQueueObject(Context context, HttpServletRequest request, String handle)    {
        String task   = request.getParameter("curate_task");
        Curator curator = getCurator(task);
        boolean success = false;
        try
        {
            curator.queue(context, handle, TASK_QUEUE_NAME);
            success = true;
        }
        catch (Exception e)
        {
            // no-op (any error should be logged by the Curator itself)
View Full Code Here

    {
        if (task != null && task.length() == 0)
        {
            task = null;
        }
        Curator curator = new Curator();
        curator.addTask(task);
        curator.setInvoked(Curator.Invoked.INTERACTIVE);
        return curator;
    }
View Full Code Here

TOP

Related Classes of org.dspace.curate.Curator

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.