Package org.sete.service.admin

Examples of org.sete.service.admin.TemplateProjectService


      HttpServletRequest request, HttpServletResponse response)
      throws Exception
    {
    checkAuthorization( request);
       
    final TemplateProjectService service = getService(TemplateProjectService.class);
   
        //This segment valildates the UploadFormFile form manually because automatic Struts validation does not work.
    final ActionErrors errors = new ActionErrors();
    final String typeId = ((UploadFileForm) form).getMyFileTypeId().trim();
    if(typeId.length()< 1)
        { 
      errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("uploadFile.typeId"));
    }   
   
        if(((UploadFileForm) form).getMyFile().getFileSize()< 1)
        {
      errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("uploadFile.file"));     
    }

    if(!errors.isEmpty())
        {     
      saveErrors(request, errors);
      return mapping.getInputForward();
    }
   
    final UploadFileVo ufvo = new UploadFileVo()
    BeanUtils.copyProperties(ufvo, form);
       
    service.saveProjectFile(ufvo);

        return mapping.findForward(WebConstants.FORWARD_VIEW);
  }
View Full Code Here


    public ActionForward init(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) throws Exception
    {
      checkAuthorization(request);
       
        final TemplateProjectService service = getService(TemplateProjectService.class);
        TemplateProjectVo refProj = service.getTemplateProject();
       
        if( null == refProj ) //no reference project
        //create one
            final BootstrapService bs = getService(BootstrapService.class);
            bs.loadReferenceProjects();
           
            //and load again
            refProj = service.getTemplateProject();
        }
               
        request.setAttribute("project", refProj);

        return mapping.findForward(WebConstants.FORWARD_VIEW);       
View Full Code Here

            HttpServletRequest request, HttpServletResponse response)
            throws Exception
    {
        checkAuthorization(request);

        final TemplateProjectService service = getService(TemplateProjectService.class);
       
        final Integer id = new Integer(request.getParameter("key"));
       
        final AttachmentVo data = service.loadProjectFileData(id);
        String fileName = data.getName();
        if(fileName == null)
        {
            return;
        }
View Full Code Here

TOP

Related Classes of org.sete.service.admin.TemplateProjectService

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.