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

Modified Files:
        NewsletterUtil.java 
Log Message:
CMSC-1347 - Remove the NewsletterContentPortlet: removed too much code..


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


Index: NewsletterUtil.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/util/NewsletterUtil.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- NewsletterUtil.java 25 Mar 2009 16:34:05 -0000      1.48
+++ NewsletterUtil.java 26 Mar 2009 16:54:18 -0000      1.49
@@ -460,6 +460,35 @@
       }
    }
 
+   public static String getTermURL(String url, Set<Term> terms, int 
publicationId) {
+      if (null != terms) {
+         log.debug("get publication " + publicationId + " with " + 
terms.size() + " terms");
+         Cloud cloud = CloudProviderFactory.getCloudProvider().getCloud();
+         Node publicationNode = cloud.getNode(publicationId);
+
+         List<Node> relatedportlets = publicationNode.getRelatedNodes(PORTLET);
+
+         String termIds = "";
+         for (Term term : terms) {
+            termIds += term.getId() + ",";
+         }
+         if (termIds.endsWith(",")) {
+            termIds = termIds.substring(0, termIds.length() - 1);
+         }
+         for (Node portlet : relatedportlets) {
+            List<Node> portletdefNodes = 
portlet.getRelatedNodes(PORTLETDEFINITION);
+            String portletDefinition = 
portletdefNodes.get(0).getStringValue("definition");
+//            if 
(portletDefinition.equals(NewsletterContentPortlet.DEFINITION)) {
+//               RelationList relations = portlet.getRelations(PORTLETREL, 
publicationNode.getNodeManager());
+//               String name = relations.getRelation(0).getStringValue("name");
+//               url += 
"/_rp_".concat(name).concat("_").concat(NewsletterContentPortlet.NEWSLETTER_TERMS_PARAM).concat("/1_").concat(termIds);
+//           }
+         }
+      }
+      return url;
+   }
+
+
 
    public static String getServerURL() {
       String hostUrl = PropertiesUtil.getProperty(SYSTEM_LIVEPATH);
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to