本文整理汇总了Java中org.kuali.rice.kns.web.struts.form.KualiMaintenanceForm.getDocId方法的典型用法代码示例。如果您正苦于以下问题:Java KualiMaintenanceForm.getDocId方法的具体用法?Java KualiMaintenanceForm.getDocId怎么用?Java KualiMaintenanceForm.getDocId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kns.web.struts.form.KualiMaintenanceForm
的用法示例。
在下文中一共展示了KualiMaintenanceForm.getDocId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: docHandler
import org.kuali.rice.kns.web.struts.form.KualiMaintenanceForm; //导入方法依赖的package包/类
/**
* Handles creating and loading of documents.
*/
@Override
public ActionForward docHandler(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
ActionForward af = super.docHandler(mapping, form, request, response);
if (af.getName().equals(KRADConstants.KRAD_INITIATED_DOCUMENT_VIEW_NAME))
{
return af;
}
KualiMaintenanceForm kualiMaintenanceForm = (KualiMaintenanceForm) form;
if (KewApiConstants.ACTIONLIST_COMMAND.equals(kualiMaintenanceForm.getCommand()) || KewApiConstants.DOCSEARCH_COMMAND.equals(kualiMaintenanceForm.getCommand()) || KewApiConstants.SUPERUSER_COMMAND.equals(kualiMaintenanceForm.getCommand()) || KewApiConstants.HELPDESK_ACTIONLIST_COMMAND.equals(kualiMaintenanceForm.getCommand()) && kualiMaintenanceForm.getDocId() != null) {
if (kualiMaintenanceForm.getDocument() instanceof MaintenanceDocument) {
kualiMaintenanceForm.setReadOnly(true);
kualiMaintenanceForm.setMaintenanceAction(((MaintenanceDocument) kualiMaintenanceForm.getDocument()).getNewMaintainableObject().getMaintenanceAction());
//Retrieving the FileName from BO table
Maintainable tmpMaintainable = ((MaintenanceDocument) kualiMaintenanceForm.getDocument()).getNewMaintainableObject();
if(tmpMaintainable.getBusinessObject() instanceof PersistableAttachment) {
PersistableAttachment bo = (PersistableAttachment) getBusinessObjectService().retrieve(tmpMaintainable.getBusinessObject());
if (bo != null) {
request.setAttribute("fileName", bo.getFileName());
}
}
}
else {
LOG.error("Illegal State: document is not a maintenance document");
throw new IllegalArgumentException("Document is not a maintenance document");
}
}
else if (KewApiConstants.INITIATE_COMMAND.equals(kualiMaintenanceForm.getCommand())) {
kualiMaintenanceForm.setReadOnly(false);
return setupMaintenance(mapping, form, request, response, KRADConstants.MAINTENANCE_NEW_ACTION);
}
else {
LOG.error("We should never have gotten to here");
throw new IllegalArgumentException("docHandler called with invalid parameters");
}
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}