Package ch.bfh.egov.internetapps.tos

Examples of ch.bfh.egov.internetapps.tos.Customizing


      logger.debug("customizingId wird in Session gesetzt");
      session.setAttribute(Constants.CUSTOMIZING_ID, customizingId);
    }
    logger.debug("---" + (Integer) session.getAttribute(Constants.CUSTOMIZING_ID));
    if (isUpdate(request, customizingForm)) {
      Customizing c = createCustomizing(request);
      customizingId = (Integer) session.getAttribute(Constants.CUSTOMIZING_ID);
      c.setCustomizingId(customizingId);
      Customizing customizing = service.getById(c);
      customizingForm.set(Constants.CUSTOMIZING_ID, customizingId);
      customizingForm.set("name", customizing.getName());
      customizingForm.set("update", true);
      service.setStatus(request);
    }
    return mapping.findForward(Constants.FORM);
  }
View Full Code Here


      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    Customizing customizing = getCustomizing(request);
    if(customizing == null) {
      service.populate(request);
      logger.debug("customizing = null");
      return mapping.findForward(Constants.LIST);
    }
    ActionMessages messages = new ActionMessages();
    messages.add(ActionMessages.GLOBAL_MESSAGE,
        new ActionMessage("messages.question.delete", customizing.getName()));
    saveMessages(request, messages);
    request.setAttribute(Constants.ACTION, Constants.CUSTOMIZING_ACTION);
    request.setAttribute(Constants.DISPATCH_YES, Constants.DELETE);
    request.setAttribute(Constants.DISPATCH_NO, Constants.LIST);
    request.setAttribute(Constants.ID_NAME, Constants.CUSTOMIZING_ID);
    request.setAttribute(Constants.ID_VALUE, customizing.getCustomizingId());
    return mapping.findForward(Constants.QUESTION);
  }
View Full Code Here

      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    Customizing customizing = getCustomizing(request);
    if(customizing == null) {
      service.populate(request);
      logger.debug("customizing = null");
      return mapping.findForward(Constants.LIST);
    }
View Full Code Here

    // Formulardaten holen
    DynaActionForm customizingForm = (DynaActionForm) form;
    Integer customizingId = (Integer) customizingForm.get("customizingId");
    Integer mandantId = (Integer) request.getSession().getAttribute(Constants.MANDANT_ID);
    String name = (String) customizingForm.get("name");
    Customizing customizing = new Customizing();
    customizing.setCustomizingId(customizingId);
    customizing.setMandantId(mandantId);
    customizing.setName(name);
    customizing.setStatus(true);
    customizing.setNaStatus(true);
    customizing.setOpNuStatus(true);

    // customizingname check auf unique
    if (exists(request, customizingForm)) {
      ActionMessages errors = new ActionMessages();
      errors.add("name",
View Full Code Here

      customizingId = new Integer(param);
    } catch (Exception ex) {
      logger.warn("Fehlende customizingId!");
      return null;
    }
    Customizing c = createCustomizing(request);
    c.setCustomizingId(customizingId);
    c = service.getById(c);
    if (c == null) {
      logger.warn("Customizing mit der id " + customizingId + " wurde nicht gefunden.");
      return null;
    }
View Full Code Here

  }
 
  private boolean exists(HttpServletRequest request, DynaActionForm customizingForm) {
    Integer id = (Integer) customizingForm.get("customizingId");
    String name = (String) customizingForm.get("name");
    Customizing c = createCustomizing(request);
    c.setCustomizingId(id);
    c.setName(name);
   
    // update?
    if (id != null && id != 0) {
      Customizing customizing = service.getById(c);
     
      // customizingname ge�ndert, �berpr�fen
      if (!name.equals(customizing.getName())) {
        return service.getByName(c) != null;
      }
    }
   
    // insert
View Full Code Here

   *
   * @param request               der HttpServletRequest
   * @return                      ein Customizing mit gesetzem Mandant
   */
  private Customizing createCustomizing(HttpServletRequest request) {
    Customizing c = new Customizing();
    c.setMandantId(
        (Integer) request.getSession().getAttribute(Constants.MANDANT_ID));
    return c;
  }
View Full Code Here

 
  /**
   * @see ch.bfh.egov.internetapps.persistence.customizing.CustomizingIbatisDao#getByNaOpNuUID(Long)
   */
  public Customizing getByNaOpNuUID(Long naOpNuUID) {
  Customizing c = dao.getByNaOpNuUID(naOpNuUID);
  c = this.addUIDs(c);
    return c;
  }
View Full Code Here

  public List getAll(Integer mandantId) {
  List<Customizing> all = dao.getAll(mandantId);
    ListIterator it = all.listIterator();
    List<Customizing> list = new ArrayList<Customizing>();
    while (it.hasNext()) {
      Customizing c = (Customizing) it.next();
      list.add(addUIDs(c));
    }
    return list;
  }
View Full Code Here

    if (customizingId == null) {
      return;
    }
   
    // Customizing holen
    Customizing c = new Customizing();
    c.setCustomizingId(customizingId);
    c.setMandantId(mandantId);
    c = dao.getById(c);

    // Customizing kopieren
    String name = c.getName();
    c.setName(name + " (1)");
    Integer newCustomizingId = dao.insert(c);
   
    // Nutzenattraktivit�t und Operativer Nutzen kopieren
    cService.insertCustomizingParts(newCustomizingId);
   
View Full Code Here

TOP

Related Classes of ch.bfh.egov.internetapps.tos.Customizing

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.