Update of
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/util
In directory
james.mmbase.org:/tmp/cvs-serv16168/portlets-newsletter/src/java/com/finalist/newsletter/util
Modified Files:
Tag: b1_5
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.40.2.4
retrieving revision 1.40.2.5
diff -u -b -r1.40.2.4 -r1.40.2.5
--- NewsletterUtil.java 25 Mar 2009 16:34:37 -0000 1.40.2.4
+++ NewsletterUtil.java 26 Mar 2009 16:54:24 -0000 1.40.2.5
@@ -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
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs