public ModelAndView handleRequest( Object requestModel, Map request, Map session, Map application, Errors errors) { StructuredArtifactDefinitionBean sad = (StructuredArtifactDefinitionBean) requestModel; checkPermission(SharedFunctionConstants.DELETE_ARTIFACT_DEF); try { getStructuredArtifactDefinitionManager().delete(sad); } catch (PersistenceException e) { errors.rejectValue(e.getField(), e.getErrorCode(), e.getErrorInfo(), e.getDefaultMessage()); } return prepareListView(request, sad.getId().getValue()); }
protected List processAdditionalForms(List formTypes) { List retList = new ArrayList(); for (Iterator iter = formTypes.iterator(); iter.hasNext(); ) { String strFormDefId = (String) iter.next(); StructuredArtifactDefinitionBean bean = getStructuredArtifactDefinitionManager().loadHome(strFormDefId); if (bean != null) { bean.getDescription(); // cwm use a different bean below, as the name has implications retList.add( new CommonFormBean( strFormDefId, bean.getDescription(), strFormDefId, bean.getOwner().getName(), bean.getModified())); } } return retList; }