Examples of TypeBean


Examples of com.liusoft.dlog4j.beans.TypeBean

      }
      cbean.setType(catalog.getType());
      cbean.setSite(site);
      cbean.setCreateTime(new Date());
      if(catalog.getCatalog()>0){
        cbean.setCatalog(new TypeBean(catalog.getCatalog()));
      }
      try{
        CatalogDAO.create(cbean, catalog.getId(), catalog.getDirection()==1);
      }catch(Exception e){
        msgs.add("catalog", new ActionMessage("error.database", e.getMessage()));
View Full Code Here

Examples of com.liusoft.dlog4j.beans.TypeBean

        cbean.setArticleCount(logCount);
       
        //�����������
        if(catalog.getCatalog()>0){
          if(cbean.getCatalog()==null)
            cbean.setCatalog(new TypeBean(catalog.getCatalog()));
          else if(cbean.getCatalog().getId()!=catalog.getCatalog())
            cbean.setCatalog(new TypeBean(catalog.getCatalog()));           
        }
        else if(cbean.getCatalog()!=null){
          cbean.setCatalog(null);
        }
       
View Full Code Here

Examples of com.liusoft.dlog4j.beans.TypeBean

   */
  protected void doListSubTypes(ActionMapping mapping, ActionForm form,
      HttpServletRequest req, HttpServletResponse res, String s_type_id)
      throws Exception {
    int type_id = Integer.parseInt(s_type_id);
    TypeBean tbean = DlogTypeDAO.getTypeByID(type_id);
    StringBuffer xml = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");
    if(tbean==null)
      xml.append("<type-not-found/>");   
    else{
      List types = tbean.getSubTypes();
      xml.append("<type id=\"");
      xml.append(tbean.getId());
      xml.append("\" name=\"");
      xml.append(tbean.getName());
      xml.append("\">\r\n");
      xml.append("\t<subTypes>\r\n");
      for(int i=0;types!=null&&i<types.size();i++){
        TypeBean subType = (TypeBean)types.get(i);
        xml.append("\t\t<subType id=\"");
        xml.append(subType.getId());
        xml.append("\" name=\">");
        xml.append(subType.getName());
        xml.append("\"/>\r\n");
      }
      xml.append("\t</subTypes>\r\n");
      xml.append("</type>");
    }
View Full Code Here

Examples of com.liusoft.dlog4j.beans.TypeBean

          fbean.setStatus(forum.getStatus());
      }
      //�����������
      if(forum.getCatalog()>0){
        if(fbean.getCatalog()==null)
          fbean.setCatalog(new TypeBean(forum.getCatalog()));
        else if(fbean.getCatalog().getId()!=forum.getCatalog())
          fbean.setCatalog(new TypeBean(forum.getCatalog()));           
      }
      else if(fbean.getCatalog()!=null){
        fbean.setCatalog(null);
      }
     
View Full Code Here

Examples of com.liusoft.dlog4j.beans.TypeBean

      if(s==ForumBean.STATUS_NORMAL||s==ForumBean.STATUS_HIDDEN||s==ForumBean.STATUS_LOCKED)
        fbean.setStatus(forum.getStatus());
      else
        fbean.setStatus(ForumBean.STATUS_NORMAL);
      if(forum.getCatalog()>0){
        fbean.setCatalog(new TypeBean(forum.getCatalog()));
      }
      BBSForumDAO.createForum(fbean, forum.getId(), forum.getDirection()==1);
    }
    if(!msgs.isEmpty()){
      saveMessages(request, msgs);
View Full Code Here

Examples of com.liusoft.dlog4j.beans.TypeBean

      try {
        //1: ֮ǰ; 2: ֮��; 3: ֮��
        if(album.getDirection()==3)
          album.setParent(album.getId());
        if(album.getCatalog()>0)
          abean.setCatalog(new TypeBean(album.getCatalog()));
        AlbumDAO.create(album.getParent(), abean, album.getId(), album
            .getDirection());
        new_album_id = abean.getId();
      } catch (CapacityExceedException e) {
        msgs.add("album",
View Full Code Here

Examples of com.liusoft.dlog4j.beans.TypeBean

          abean.setVerifyCode(null);
        }
        //�����������
        if(album.getCatalog()>0){
          if(abean.getCatalog()==null)
            abean.setCatalog(new TypeBean(album.getCatalog()));
          else if(abean.getCatalog().getId()!=album.getCatalog())
            abean.setCatalog(new TypeBean(album.getCatalog()));           
        }
        else if(abean.getCatalog()!=null){
          abean.setCatalog(null);
        }
       
View Full Code Here

Examples of org.nextime.ion.backoffice.bean.TypeBean

    }
    // validate metadata
    try {
      Enumeration names = request.getParameterNames();
      // dangerous ?
      TypeBean type = SectionTypes.getSectionBean(null, getTemplate());
      while (names.hasMoreElements()) {
        String name = names.nextElement() + "";
        if (name.startsWith("META_")) {
          String tname = name.substring(5);
          String value = request.getParameter(name);
          PropertyBean prop = type.getProperty(tname);
          if ("".equals(value.trim())) {
            if ("true".equalsIgnoreCase(prop.getRequired())) {
              ActionError error =
                new ActionError("error.editSection.propertyMissing");
              errors.add("META_" + tname, error);
View Full Code Here

Examples of org.nextime.ion.backoffice.bean.TypeBean

      try {
        Mapping.begin();
       
        Section section = Section.getInstance(id);
        String template = section.getMetaData("template")+"";
        TypeBean type = SectionTypes.getSectionBean(servlet,template);
        request.setAttribute("types",type.getPublicationTypes());
        request.setAttribute("workflows",Workflow.listTypes());

        Mapping.rollback();
      } catch (Exception e) {
        Mapping.rollback();
        throw new ServletException(e);
      }

      // Forward to the view page
      return (mapping.findForward("view"));
    }

    // fill data | errors
    if (errors.size() > 0) {
      try {
        Mapping.begin();
       
        Section section = Section.getInstance(id);
        String template = section.getMetaData("template")+"";
        TypeBean type = SectionTypes.getSectionBean(servlet,template);
        request.setAttribute("types",type.getPublicationTypes());
        request.setAttribute(ERROR_KEY,errors);

        Mapping.rollback();
      } catch (Exception e) {
        Mapping.rollback();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.