Update of 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/forms
In directory 
james.mmbase.org:/tmp/cvs-serv9455/portlets-newsletter/src/java/com/finalist/newsletter/forms

Modified Files:
        SubscriptioManagementAction.java 
        NewsletterSubscriberSearchAction.java 
Log Message:
CMSC-1139 - Check if the dependencies in newsletter are correct and all needed


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/forms
See also: http://www.mmbase.org/jira/browse/CMSC-1139


Index: SubscriptioManagementAction.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/forms/SubscriptioManagementAction.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- SubscriptioManagementAction.java    6 Feb 2009 16:12:52 -0000       1.18
+++ SubscriptioManagementAction.java    13 Apr 2009 08:19:54 -0000      1.19
@@ -27,7 +27,6 @@
 import com.finalist.newsletter.services.NewsletterPublicationService;
 import com.finalist.newsletter.services.NewsletterService;
 import com.finalist.newsletter.services.NewsletterSubscriptionServices;
-import com.finalist.newsletter.services.SubscriptionHibernateService;
 import com.finalist.newsletter.util.ComparisonUtil;
 
 
@@ -61,7 +60,6 @@
    NewsletterSubscriptionServices subscriptionServices;
    NewsletterPublicationService publicationService;
    PersonService personServices;
-   SubscriptionHibernateService subscriptionHService;
 
    /**
     * Initialize service objects : newsletterService, subscriptionServices, 
personServices, publicationService,
@@ -74,7 +72,6 @@
             .getBean("subscriptionServices");
       personServices = (PersonService) 
getWebApplicationContext().getBean("personService");
       publicationService = (NewsletterPublicationService) 
getWebApplicationContext().getBean("publicationService");
-      subscriptionHService = (SubscriptionHibernateService) 
getWebApplicationContext().getBean("subscriptionHService");
    }
 
    /**
@@ -168,7 +165,7 @@
 
       Set<Long> authenticationIds = new HashSet<Long>();
       authenticationIds = 
subscriptionServices.getAuthenticationIdsByNewsletter(newsletterId);
-      List<Object[]> qResults = subscriptionHService
+      List<Object[]> qResults = subscriptionServices
             .getSubscribersRelatedInfo(authenticationIds, name, "", email, 
true);
       for (Object[] result : qResults) {
          String tmpFullName = result[0].toString(); //Firstname
@@ -209,7 +206,7 @@
       Set<Long> authenticationIds = new HashSet<Long>();
       authenticationIds = 
subscriptionServices.getAuthenticationIdsByNewsletter(newsletterId);
       if (authenticationIds.size() > 0) {
-         resultCount = 
subscriptionHService.getSubscribersRelatedInfoCount(authenticationIds, name, 
"", email, false);
+         resultCount = 
subscriptionServices.getSubscribersRelatedInfoCount(authenticationIds, name, 
"", email, false);
       }
       return resultCount;
    }
@@ -251,7 +248,7 @@
 
       Set<Long> authenticationIds = new HashSet<Long>();
       authenticationIds = subscriptionServices.getAuthenticationIds();
-      List<Object[]> qResults = 
subscriptionHService.getSubscribersRelatedInfo(authenticationIds, fullname, "", 
email, true);
+      List<Object[]> qResults = 
subscriptionServices.getSubscribersRelatedInfo(authenticationIds, fullname, "", 
email, true);
       for (Object[] result : qResults) {
          String tmpFullName = result[0].toString(); //Firstname
          if(StringUtils.isNotEmpty(result[1].toString())) { //If infix is not 
empty, add it
@@ -271,7 +268,7 @@
       Set<Long> authenticationIds = new HashSet<Long>();
       authenticationIds = subscriptionServices.getAuthenticationIds();
       if (authenticationIds.size() > 0) {
-         resultCount = 
subscriptionHService.getSubscribersRelatedInfoCount(authenticationIds, 
fullname, "", email, false);
+         resultCount = 
subscriptionServices.getSubscribersRelatedInfoCount(authenticationIds, 
fullname, "", email, false);
       }
       return resultCount;
    }


Index: NewsletterSubscriberSearchAction.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/forms/NewsletterSubscriberSearchAction.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- NewsletterSubscriberSearchAction.java       6 Feb 2009 16:12:52 -0000       
1.14
+++ NewsletterSubscriberSearchAction.java       13 Apr 2009 08:19:54 -0000      
1.15
@@ -24,7 +24,6 @@
 import com.finalist.newsletter.services.NewsletterPublicationService;
 import com.finalist.newsletter.services.NewsletterService;
 import com.finalist.newsletter.services.NewsletterSubscriptionServices;
-import com.finalist.newsletter.services.SubscriptionHibernateService;
 
 /**
  * using for searching Newsletter Subscriber
@@ -40,7 +39,6 @@
    private NewsletterSubscriptionServices subscriptionService;
    private AuthenticationService authenticationService;
    private NewsletterService newsletterService;
-   private SubscriptionHibernateService subscriptionHService;
 
    /**
     * Initialize service object: publicationService , personService, 
subscriptionService, authenticationService,
@@ -53,8 +51,6 @@
       subscriptionService = (NewsletterSubscriptionServices) 
getWebApplicationContext().getBean("subscriptionServices");
       authenticationService = (AuthenticationService) 
getWebApplicationContext().getBean("authenticationService");
       newsletterService = (NewsletterService) 
getWebApplicationContext().getBean("newsletterServices");
-      subscriptionHService = (SubscriptionHibernateService) 
getWebApplicationContext().getBean("subscriptionHService");
-
    }
 
    /**
@@ -158,7 +154,7 @@
       List<Map<Object, Object>> results = new ArrayList<Map<Object, Object>>();
 
       authenticationIds = 
subscriptionService.getAuthenticationIdsByTerms(newsletterId, terms);
-      List<Object[]> qResults = 
subscriptionHService.getSubscribersRelatedInfo(authenticationIds, fullName, 
userName,
+      List<Object[]> qResults = 
subscriptionService.getSubscribersRelatedInfo(authenticationIds, fullName, 
userName,
                email, true);
       for (Object[] result : qResults) {
 
@@ -194,7 +190,7 @@
 
       authenticationIds = 
subscriptionService.getAuthenticationIdsByTerms(newsletterId, terms);
       if (authenticationIds.size() > 0) {
-         resultCount = 
subscriptionHService.getSubscribersRelatedInfoCount(authenticationIds, 
fullName, userName, email, false);
+         resultCount = 
subscriptionService.getSubscribersRelatedInfoCount(authenticationIds, fullName, 
userName, email, false);
       }
       return resultCount;
    }
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to