/tags/release/7020-RC1/aipo/portlets/workflow/src/main/java/com/aimluck/eip/modules/screens/WorkflowFileRawScreen.java

http://aipo.googlecode.com/ · Java · 60 lines · 26 code · 7 blank · 27 comment · 0 complexity · 3a62ca3ce44602ad26549f423d996e74 MD5 · raw file

  1. /*
  2. * Aipo is a groupware program developed by Aimluck,Inc.
  3. * Copyright (C) 2004-2011 Aimluck,Inc.
  4. * http://www.aipo.com
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.aimluck.eip.modules.screens;
  20. import org.apache.jetspeed.services.logging.JetspeedLogFactoryService;
  21. import org.apache.jetspeed.services.logging.JetspeedLogger;
  22. import org.apache.turbine.util.RunData;
  23. import com.aimluck.eip.cayenne.om.portlet.EipTWorkflowFile;
  24. import com.aimluck.eip.orm.Database;
  25. import com.aimluck.eip.workflow.util.WorkflowUtils;
  26. /**
  27. * ???????????????????????????? <br />
  28. */
  29. public class WorkflowFileRawScreen extends FileuploadRawScreen {
  30. /** logger */
  31. private static final JetspeedLogger logger = JetspeedLogFactoryService
  32. .getLogger(WorkflowFileRawScreen.class.getName());
  33. /**
  34. *
  35. * @param rundata
  36. * @throws Exception
  37. */
  38. @Override
  39. protected void doOutput(RunData rundata) throws Exception {
  40. try {
  41. EipTWorkflowFile workflowfile =
  42. WorkflowUtils.getEipTWorkflowFile(rundata);
  43. super.setFilePath(WorkflowUtils.getSaveDirPath(
  44. Database.getDomainName(),
  45. workflowfile.getOwnerId().intValue())
  46. + workflowfile.getFilePath());
  47. super.setFileName(workflowfile.getFileName());
  48. super.doOutput(rundata);
  49. } catch (Exception e) {
  50. logger.error("[ERROR]", e);
  51. }
  52. }
  53. }