Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.SubscriptionFilterVO


       
        String andParagraph = this.getRequest().getParameter("andParagraph_" + i);
        if(andParagraph == null || andParagraph.equals(""))
          andParagraph = "true";
       
        SubscriptionFilterVO subscriptionFilterVO = new SubscriptionFilterVO();
        subscriptionFilterVO.setFilterType(filterType);
        subscriptionFilterVO.setFilterCondition(filterConditionStringBuffer.toString());
        subscriptionFilterVO.setIsAndCondition(new Boolean(andParagraph));
        subscriptionFilterVOList.add(subscriptionFilterVO);

        i++;
        filterType = this.getRequest().getParameter("filterType_" + i);
      }
View Full Code Here


        String andParagraph = this.getRequest().getParameter("andParagraph_" + i);
        if(andParagraph == null || andParagraph.equals(""))
          andParagraph = "true";
       
        SubscriptionFilterVO subscriptionFilterVO = new SubscriptionFilterVO();
        subscriptionFilterVO.setFilterType(filterType);
        subscriptionFilterVO.setFilterCondition(filterConditionStringBuffer.toString());
        subscriptionFilterVO.setIsAndCondition(new Boolean(andParagraph));
        subscriptionFilterVOList.add(subscriptionFilterVO);

        i++;
        filterType = this.getRequest().getParameter("filterType_" + i);
        logger.info("filterType[" + i + "]:" + filterType);
View Full Code Here

      int i = 0;
      int size = subscriptionVO.getSubscriptionFilterVOList().size();
      Iterator<SubscriptionFilterVO> subscriptionFilterVOListIterator = subscriptionVO.getSubscriptionFilterVOList().iterator();
      while(subscriptionFilterVOListIterator.hasNext())
      {
        SubscriptionFilterVO subscriptionFilterVO = subscriptionFilterVOListIterator.next();
       
        sb.append("  <div id=\"filterRow_" + i + "\" class=\"formRow\" style=\"min-height: 50px; border: 0px solid red; border-bottom: 1px solid #bbb;\">");
        sb.append("    <label for=\"filterType_" + i + "\">" + getLocalizedString(getLocale(), "tool.common.subscriptionFilterType.label") + "</label>");
        sb.append("    <select id=\"filterType_" + i + "\" name=\"filterType_" + i + "\" onchange=\"updateConditionInput(" + i + ");\">");
        sb.append("      <option value=\"0\"" + (subscriptionFilterVO.getFilterType().equals("0") ? "selected='selected'" : "") + ">Content types</option>");
        sb.append("      <option value=\"1\"" + (subscriptionFilterVO.getFilterType().equals("1") ? "selected='selected'" : "") + ">Categories</option>");
        sb.append("    </select>");
     
         sb.append("    <label for=\"filterCondition_" + i + "\">" + getLocalizedString(getLocale(), "tool.common.subscriptionFilterCondition.label") + "</label>");
         sb.append("    <select id=\"filterCondition_" + i + "\" name=\"filterCondition_" + i + "\" multiple=\"multiple\" size=\"3\" style=\"width: 130px;\">");
        
         if(subscriptionFilterVO.getFilterType().equals("0"))
         {
           Iterator contentTypeDefintionVOListIterator = contentTypeDefintionVOList.iterator();
           while(contentTypeDefintionVOListIterator.hasNext())
           {
             ContentTypeDefinitionVO ctd = (ContentTypeDefinitionVO)contentTypeDefintionVOListIterator.next();
             sb.append("<option value=\"" + ctd.getId() + "\"" + (hasValue(subscriptionFilterVO.getFilterCondition(), ctd.getId().toString()) ? "selected='selected'" : "") + ">" + ctd.getName() + "</option>");
           }
         }
         else if(subscriptionFilterVO.getFilterType().equals("1"))
         {
           Iterator categoryVOListIterator = categoryVOList.iterator();
           while(categoryVOListIterator.hasNext())
           {
             CategoryVO categoryVO = (CategoryVO)categoryVOListIterator.next();
             sb.append("<option value=\"" + categoryVO.getId() + "\"" + (hasValue(subscriptionFilterVO.getFilterCondition(), categoryVO.getId().toString()) ? "selected='selected'" : "") + ">" + categoryVO.getName() + "</option>");
           }          
         }
        
         sb.append("    </select>");
         
         sb.append("    &nbsp; <a id=\"removeFilterRowLink" + i + "\" href=\"javascript:removeFilterRow(" + i + ");\">" + getLocalizedString(getLocale(), "tool.common.deleteFilter.label") + "</a>");
         
         if(size-1 > i)
           sb.append("    <p id=\"andParagraph_" + i + "\" style=\"padding: 30px; display: block;\">");
         else
           sb.append("    <p id=\"andParagraph_" + i + "\" style=\"padding: 30px; display: none;\">");
          
         sb.append("      <label for=\"isAndCondition_" + i + "\">" + getLocalizedString(getLocale(), "tool.common.subscriptionFilterIsAndCondition.label") + "</label>");
      sb.append("      <select id=\"isAndCondition_" + i + "\" name=\"isAndCondition_0\">';");
      sb.append("        <option value=\"true\"" + (subscriptionFilterVO.getIsAndCondition().booleanValue() ? "selected='selected'" : "") + ">AND</option>';");
      sb.append("        <option value=\"false\"" + (!subscriptionFilterVO.getIsAndCondition().booleanValue() ? "selected='selected'" : "") + ">OR</option>';");
      sb.append("      </select>");
      sb.append("    </p>");
      sb.append("  </div>");
                 
      sb.append("  <div id=\"break_" + i + "\" style=\"clear:both\"></div>");
View Full Code Here

        subscription = (Subscription) createEntity(subscription, db);

    Iterator<SubscriptionFilterVO> subscriptionFilterVOListIterator = subscriptionFilterVOList.iterator();
    while(subscriptionFilterVOListIterator.hasNext())
    {
      SubscriptionFilterVO subscriptionFilterVO = subscriptionFilterVOListIterator.next();
        SubscriptionFilterImpl subscriptionFilter = new SubscriptionFilterImpl();
        subscriptionFilter.setValueObject(subscriptionFilterVO);
        subscriptionFilter.setSubscription(subscription);
        subscription.getSubscriptionFilters().add(subscriptionFilter);                 
    }
View Full Code Here

      subscription.setSubscriptionFilters(new ArrayList());
     
      Iterator<SubscriptionFilterVO> subscriptionFilterVOListIterator = subscriptionFilterVOList.iterator();
      while(subscriptionFilterVOListIterator.hasNext())
      {
        SubscriptionFilterVO subscriptionFilterVO = subscriptionFilterVOListIterator.next();
          SubscriptionFilterImpl subscriptionFilter = new SubscriptionFilterImpl();
          subscriptionFilter.setValueObject(subscriptionFilterVO);
          subscriptionFilter.setSubscription(subscription);
          logger.info("Adding subscriptionFilter:" + subscriptionFilter);
          subscription.getSubscriptionFilters().add(subscriptionFilter);                 
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.SubscriptionFilterVO

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.