Package com.liusoft.dlog4j.beans

Examples of com.liusoft.dlog4j.beans.SiteBean


    ActionMessages msgs = validateSiteOwner(request, response, mbox);
    int mboxid = -1;
    if (msgs.isEmpty() && StringUtils.isEmpty(mbox.getName()))
      msgs.add("name", new ActionMessage("error.mbox.name_empty"));
    else if (msgs.isEmpty()) {
      SiteBean site = super.getSiteBean(request);
      MusicBoxBean mbean = new MusicBoxBean();
      mbean.setName(super.autoFiltrate(site, mbox.getName()));
      if (StringUtils.isNotEmpty(mbox.getDesc())){
        String desc = super.autoFiltrate(site, mbox.getDesc());
        mbean.setDesc(super.filterScriptAndStyle(desc));
View Full Code Here


      if (mbox == null || mbox.getSite().getId() != mform.getSid()) {
        msgs.add("name", new ActionMessage("error.mbox_not_available",
            new Integer(mform.getBox())));
        break;
      }
      SiteBean site = super.getSiteByID(mform.getSid());
      if(site==null){
        msgs.add("site", new ActionMessage("error.site_not_available"));
        break;
      }
      //��������
View Full Code Here

      if (mbox != null && mbox.getSite().getId() != mform.getSid()) {
        msgs.add("name", new ActionMessage("error.mbox_not_available",
            new Integer(mform.getBox())));
        break;
      }
      SiteBean site = super.getSiteBean(request);
      MusicBean mbean = new MusicBean();
      mbean.setSite(site);
      mbean.setMusicBox(mbox);
      mbean.setTitle(super.autoFiltrate(site, mform.getTitle()));
      if (StringUtils.isNotEmpty(mform.getAlbum()))
View Full Code Here

    MusicForm mform = (MusicForm) form;
    ActionMessages msgs = validateSiteOwner(request, response, mform);
    if (msgs.isEmpty()) {
      int music_id = Integer.parseInt(mid);
      MusicBean mbean = MusicDAO.getMusicByID(music_id);
      SiteBean site = super.getSiteBean(request);
      if (mbean != null && mbean.getSite().getId() == site.getId()) {
        MusicDAO.deleteMusic(mbean);
        SearchProxy.remove(mbean);
      }
    }
    return makeForward(mapping.findForward("music"), mform.getSid(), "box",
View Full Code Here

      ActionMessages msgs = super.validateSiteOwner(request, response, mform);
      if(!msgs.isEmpty()){
        saveMessages(request, msgs);
        break;
      }
      SiteBean site = super.getSiteBean(request);
      MusicBean mbean = MusicDAO.getMusicByID(mform.getId());
      //�ж��Ƿ�Ϊ��վ����
      if(mbean==null ||mbean.getSite().getId()!=site.getId()){
        break;
      }
      if (mbean.getStatus() == MusicBean.STATUS_NORMAL) {
        // ��֤�µ����ֺе���Ч��(�ƶ����������ֺ�)
        if ((mbean.getMusicBox() == null && mform.getBox() > 0)
            || (mbean.getMusicBox() != null && mform.getBox() != mbean
                .getMusicBox().getId())) {
          MusicBoxBean mbox = MusicDAO
              .getMusicBoxByID(mform.getBox());
          //�ж��Ƿ�Ϊ��վ�����ֺ�
          if(mbox!=null && mbox.getSite().getId()!=site.getId()){
            break;
          }
          //�任���ֺ�
          if (mbox != null
              && (mbean.getMusicBox() == null || mbean.getMusicBox()
View Full Code Here

      HttpServletResponse response) throws Exception {
    MusicForm mform = (MusicForm) form;
    ActionMessages msgs = validateSiteOwner(request, response, mform);
    if (msgs.isEmpty() && mform.getMid() != null
        && mform.getMid().length > 0) {
      SiteBean site = super.getSiteBean(request);
      MusicDAO.deleteMusics(site.getId(), mform.getMid());
    }
    return makeForward(mapping.findForward("music"), mform.getSid(), "box",
        mform.getBox());
  }
View Full Code Here

      HttpServletRequest request, HttpServletResponse response,
      String mboxid) throws Exception {
    MusicBoxForm mform = (MusicBoxForm) form;
    ActionMessages msgs = validateSiteOwner(request, response, mform);
    if (msgs.isEmpty()) {
      SiteBean site = super.getSiteBean(request);
      MusicBoxBean mbox = MusicDAO.getMusicBoxByID(Integer
          .parseInt(mboxid));
      if (mbox.getSite().getId() == site.getId())
        MusicDAO.deleteMusicBox(mbox);
    }
    return makeForward(mapping.findForward("music"), mform.getSid());
  }
View Full Code Here

    MusicBoxForm mform = (MusicBoxForm) form;
    super.validateClientId(request, mform);
    if (StringUtils.isNotEmpty(mform.getName())) {
      ActionMessages msgs = validateSiteOwner(request, response, mform);
      if (msgs.isEmpty()) {
        SiteBean site = super.getSiteBean(request);
        MusicBoxBean mbox = MusicDAO.getMusicBoxByID(mform.getId());
        if (mbox.getSite().getId() == site.getId()) {
          mbox.setName(super.autoFiltrate(site,mform.getName()));
          if (StringUtils.isNotEmpty(mform.getDesc())){
            String desc = super.autoFiltrate(site,mform.getDesc());
            mbox.setDesc(desc);
          }
View Full Code Here

      if (!msgs.isEmpty())
        break;
      String catalog = dform.getCatalog();
      if (StringUtils.isEmpty(catalog))
        break;
      SiteBean site = super.getSiteBean(request);     
      if (site.getCatalogs().size() > 0)
        break;
     
      CatalogBean cbean = new CatalogBean();
      cbean.setName(catalog);
      cbean.setCreateTime(new Date());
View Full Code Here

      } else if (!DiaryDAO.canUserEditDiary(loginUser, diary)) {
        msgs.add("editlog", new ActionMessage("error.access_deny"));
      } else {
        boolean catalog_can_access = false;
        if (diary.getCatalog().getId() != diaryForm.getCatalogId()) {
          SiteBean site = diary.getSite();
          CatalogBean catalog = null;
          // վ�����Է���վ�ڵ��κη���
          if (site.isOwner(loginUser)) {
            catalog = CatalogDAO.getCatalogByID(diaryForm
                .getCatalogId());
            if (catalog.getSite().getId() == site.getId())
              catalog_can_access = true;
          } else {
            // �г��û��ڸ�վ��ɷ��ʵ��ռǷ���
            List catalogs = CatalogDAO.listCatalogs(site, loginUser, true);
            for (int i = 0; catalogs != null && i < catalogs.size(); i++) {
              CatalogBean t_catalog = (CatalogBean) catalogs
                  .get(i);
              if (t_catalog.getId() == diaryForm.getCatalogId()) {
                catalog = t_catalog;
                catalog_can_access = true;
                break;
              }
            }
          }
          // �����ռ���������
          if (catalog != null) {
            diary.getCatalog().incArticleCount(-1);
            diary.setCatalog(catalog);
            catalog.incArticleCount(1);
          }
        } else
          catalog_can_access = true;
        if (catalog_can_access) {
          SiteBean site = diary.getSite();
          // �����ռ�
          boolean updateTags = false;
          if (!StringUtils.equals(diary.getKeyword(), diaryForm
              .getTags())) {
            updateTags = true;
View Full Code Here

TOP

Related Classes of com.liusoft.dlog4j.beans.SiteBean

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.