@Override public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, parameters); authorized = true; try { String stepID = parameters.getParameter("step_id"); String beanID = parameters.getParameter("bean_id"); int workspaceID = Integer.valueOf(parameters.getParameter("workspace_item_id").substring(1)); WorkspaceService wi = WorkspaceService.find(context, workspaceID); SubmissionProcess process = SubmissionProcessFactory.getSubmissionProcess(context, wi.getCollection()); SubmissionStep step = process.getStep(context, Integer.parseInt(stepID)); xmluiActionUI = (AbstractXMLUIAction) SubmissionProcessXMLUIFactory.getActionInterface(beanID); // authorized = step.getActionConfig(beanID).getProcessingAction().isAuthorized(context, // ObjectModelHelper.getRequest(objectModel), wi); if (xmluiActionUI != null) xmluiActionUI.setup(resolver, objectModel, src, parameters); // else // throw new ProcessingException("SubmissionStep class is null! We do not have // a valid AbstractStep in " + this.transformerClassName + ". "); } catch (Exception e) { log.error( LogManager.getHeader(context, "error while setting up SubmissionTransformer", ""), e); e.printStackTrace(); throw new ProcessingException("Something went wrong while setting up the workflow"); } // TODO: throw exception ! }
/** Recycle */ public void recycle() { if (xmluiActionUI != null) { this.xmluiActionUI.recycle(); this.xmluiActionUI = null; } super.recycle(); }
/** Recycle */ public void recycle() { this.validity = null; this.userParams = null; this.browseInfo = null; this.titleMessage = null; this.trailMessage = null; super.recycle(); }
/* * Creates a Map of the browse control options (sort by / ordering / results * per page / authors per item) */ Map<String, String> getControlParameters() throws UIException { Map<String, String> paramMap = new HashMap<String, String>(); paramMap.put(BrowseParams.SORT_BY, Integer.toString(this.scope.getSortBy())); paramMap.put(BrowseParams.ORDER, AbstractDSpaceTransformer.URLEncode(this.scope.getOrder())); paramMap.put(BrowseParams.RESULTS_PER_PAGE, Integer.toString(this.scope.getResultsPerPage())); paramMap.put(BrowseParams.ETAL, Integer.toString(this.etAl)); return paramMap; }
/* * Creates a map of the browse options common to all pages (type / value / * value language) */ Map<String, String> getCommonParameters() throws UIException { Map<String, String> paramMap = new HashMap<String, String>(); paramMap.put( BrowseParams.TYPE, AbstractDSpaceTransformer.URLEncode(scope.getBrowseIndex().getName())); if (scope.getFilterValue() != null) { paramMap.put( BrowseParams.FILTER_VALUE, AbstractDSpaceTransformer.URLEncode(scope.getFilterValue())); } if (scope.getFilterValueLang() != null) { paramMap.put( BrowseParams.FILTER_VALUE_LANG, AbstractDSpaceTransformer.URLEncode(scope.getFilterValueLang())); } return paramMap; }
/** Recycle */ public void recycle() { this.queryResults = null; this.validity = null; super.recycle(); }
/** Recycle */ public void recycle() { // Clear out our item's cache. this.queryResults = null; this.validity = null; super.recycle(); }
/** Recycle */ public void recycle() { // Clear out our item's cache. this.recentSubmissionItems = null; this.validity = null; super.recycle(); }