Update of
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/util
In directory
james.mmbase.org:/tmp/cvs-serv12857/portlets-newsletter/src/java/com/finalist/newsletter/util
Modified Files:
Tag: b1_5
NewsletterPublicationUtil.java
Log Message:
CMSC-1153 - Newsletter: Generic improvements on code, by removing casts and
improving translations.
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-1153
Index: NewsletterPublicationUtil.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/util/NewsletterPublicationUtil.java,v
retrieving revision 1.26.2.11
retrieving revision 1.26.2.12
diff -u -b -r1.26.2.11 -r1.26.2.12
--- NewsletterPublicationUtil.java 18 Dec 2008 10:09:22 -0000
1.26.2.11
+++ NewsletterPublicationUtil.java 18 Dec 2008 13:29:48 -0000
1.26.2.12
@@ -148,16 +148,19 @@
return pub;
}
- public static String getPublicationURL(Cloud cloud,int publciationId) {
- Node publicationNode = cloud.getNode(publciationId);
+
+ public static String getPublicationURL(Cloud cloud, int publicationId) {
+ Node publicationNode = cloud.getNode(publicationId);
String hostUrl = NewsletterUtil.getServerURL();
String newsletterPath = getNewsletterPath(publicationNode);
return "".concat(hostUrl).concat(newsletterPath);
}
+
public static String getNewsletterPath(Node newsletterPublicationNode) {
return NavigationUtil.getPathToRootString(newsletterPublicationNode,
true);
}
- public static STATUS getStatus(Cloud cloud,int publicationId) {
+
+ public static STATUS getStatus(Cloud cloud, int publicationId) {
return getPublication(cloud,publicationId).getStatus();
}
@@ -166,7 +169,7 @@
Publish.publish(node);
}
}
- public static void publish(Cloud cloud ,Integer number) {
+ public static void publish(Cloud cloud, int number) {
Node node = cloud.getNode(number);
publish(node);
}
@@ -193,6 +196,7 @@
edition.setStringValue("static_html", null);
edition.commit();
}
+
/**
* Approve a edition
*/
@@ -202,6 +206,7 @@
edition.setStringValue("approved_by", user);
edition.commit();
}
+
/**
* Revoke approval of a edition
*/
@@ -211,19 +216,19 @@
}
/**
- * change the status of the edition to be beingsent
+ * change the status of the edition to be beingsend
*/
- public static void setBeingSent(Node edition) {
+ public static void setBeingSend(Node edition) {
edition.setStringValue("process_status",
EditionStatus.BEING_SENT.value());
edition.commit();
}
/**
- * change the status of the edition to be beingsent
+ * change the status of the edition to be beingsend
*/
- public static void setBeingSent(Integer number) {
+ public static void setBeingSend(int number) {
Cloud cloud = CloudProviderFactory.getCloudProvider().getCloud();
Node edition = cloud.getNode(number);
- setBeingSent(edition);
+ setBeingSend(edition);
}
/**
* change the status of a edition to be issent
@@ -232,14 +237,6 @@
edition.setStringValue("process_status", EditionStatus.IS_SENT.value());
edition.commit();
}
- /**
- * change the status of a edition to be issent
- */
- public static void setIsSent(Integer number) {
- Cloud cloud = CloudProviderFactory.getCloudProvider().getCloud();
- Node edition = cloud.getNode(number);
- setIsSent(edition);
- }
/**
* get the process status of a edition
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs