|
From: <be...@us...> - 2007-05-03 17:10:45
|
Revision: 250
http://svn.sourceforge.net/objectlabkit/?rev=250&view=rev
Author: benoitx
Date: 2007-05-03 10:10:45 -0700 (Thu, 03 May 2007)
Log Message:
-----------
Added 2 methods to check if a given calendar is registered (useful when it is built on-the-fly)
Also changed version to 1.1.0-SNAPSHOT until release.
Modified Paths:
--------------
trunk/common-build/project.xml
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/KitCalculatorsFactory.java
trunk/pom.xml
trunk/src/site/changes.xml
trunk/src/site/index.xml
Modified: trunk/common-build/project.xml
===================================================================
--- trunk/common-build/project.xml 2007-01-25 10:37:59 UTC (rev 249)
+++ trunk/common-build/project.xml 2007-05-03 17:10:45 UTC (rev 250)
@@ -27,7 +27,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/3.0.0 http://maven.apache.org/maven-v3_0_0.xsd">
<pomVersion>3</pomVersion>
<groupId>net.objectlab.kit.datecalc</groupId>
- <currentVersion>1.1.0</currentVersion>
+ <currentVersion>1.1.0-SNAPSHOT</currentVersion>
<organization>
<name>ObjectLab Financial Ltd</name>
<url>http://www.objectlab.co.uk</url>
@@ -157,7 +157,7 @@
<versions>
<version>
- <id>1.1.0</id>
+ <id>1.1.0-SNAPSHOT</id>
<name>1.1.0</name>
<tag>v1.1.0</tag>
</version>
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java 2007-01-25 10:37:59 UTC (rev 249)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java 2007-05-03 17:10:45 UTC (rev 250)
@@ -105,6 +105,21 @@
}
/**
+ * @return true if the holiday name is registered.
+ */
+ public boolean isHolidayCalendarRegistered(final String name) {
+ return this.holidays.containsKey(name);
+ }
+
+ /**
+ * @return an immutable Holiday Calendar that is registered, null if not registered.
+ */
+ public HolidayCalendar<E> getHolidayCalendar(final String name) {
+ return holidays.get(name);
+ }
+
+
+ /**
* Used by extensions to set holidays in a DateCalculator.
*
* @param name
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/KitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/KitCalculatorsFactory.java 2007-01-25 10:37:59 UTC (rev 249)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/KitCalculatorsFactory.java 2007-05-03 17:10:45 UTC (rev 250)
@@ -89,6 +89,16 @@
* the holiday calendar (non-working days with boundaries).
*/
void registerHolidays(final String name, HolidayCalendar<E> holidaysCalendar);
+
+ /**
+ * @return true if the holiday name is registered.
+ */
+ boolean isHolidayCalendarRegistered(final String name);
+
+ /**
+ * @return an immutable Holiday Calendar that is registered.
+ */
+ HolidayCalendar<E> getHolidayCalendar(final String name);
// -----------------------------------------------------------------------
//
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-01-25 10:37:59 UTC (rev 249)
+++ trunk/pom.xml 2007-05-03 17:10:45 UTC (rev 250)
@@ -7,7 +7,7 @@
<artifactId>datecalc</artifactId>
<packaging>pom</packaging>
<name>ObjectLab Kit</name>
- <version>1.1.0</version>
+ <version>1.2.0-SNAPSHOT</version>
<url>http://objectlabkit.sourceforge.net/</url>
<description>
ObjectLab Kit provides a generic Business Calendar for calculating dates given set(s) of holidays. Why
@@ -119,9 +119,9 @@
</profiles>
<scm>
- <connection>scm:svn:https://svn.sourceforge.net/svnroot/objectlabkit/tags/1.1.0</connection>
- <developerConnection>scm:svn:https://svn.sourceforge.net/svnroot/objectlabkit/tags/1.1.0</developerConnection>
- <url>http://svn.sourceforge.net/objectlabkit/tags/1.1.0</url>
+ <connection>scm:svn:https://objectlabkit.svn.sourceforge.net/svnroot/objectlabkit/tags/1.1.0</connection>
+ <developerConnection>scm:svn:https://objectlabkit.svn.sourceforge.net/svnroot/objectlabkit/tags/1.1.0</developerConnection>
+ <url>http://objectlabkit.svn.sourceforge.net/objectlabkit/tags/1.1.0</url>
</scm>
<distributionManagement>
Modified: trunk/src/site/changes.xml
===================================================================
--- trunk/src/site/changes.xml 2007-01-25 10:37:59 UTC (rev 249)
+++ trunk/src/site/changes.xml 2007-05-03 17:10:45 UTC (rev 250)
@@ -9,6 +9,7 @@
</properties>
<body>
<release version="1.1.0" date="in SVN" description="Maintenance">
+ <action dev="benoitx" type="add">Added 2 methods on factory to check if a calendar is registered.</action>
<action dev="marchy" type="fix">Deprecated ACT/UST and END/365 Day Count Conventions, which weren't very common. Also added a link to some documentation.</action>
<action dev="benoitx" type="add">Added method calculateTenorDates with/without a spot lag to enable calculation of a series of Tenor dates without changing the current business date in the calculator.</action>
<action dev="benoitx" type="add">Added method moveByTenor without a spot lag to allow tenor calculation based on the CURRENT date and not the spot lag.</action>
Modified: trunk/src/site/index.xml
===================================================================
--- trunk/src/site/index.xml 2007-01-25 10:37:59 UTC (rev 249)
+++ trunk/src/site/index.xml 2007-05-03 17:10:45 UTC (rev 250)
@@ -21,6 +21,7 @@
<body>
<!-- The body of the document contains a number of sections -->
<section name="Quick News">
+ <p style="margin-top:10px; margin-bottom:0; padding-bottom:0; text-align:center; line-height:0"><a href="http://feeds.feedburner.com/~r/ObjectlabOpenSourceNews/~6/1"><img src="http://feeds.feedburner.com/ObjectlabOpenSourceNews.1.gif" alt="ObjectLab Open Source News" style="border:0"/></a></p><p style="margin-top:5px; padding-top:0; font-size:x-small; text-align:center"><a href="http://www.feedburner.com/fb/a/headlineanimator/install?id=829470&w=1" onclick="window.open(this.href, 'haHowto', 'width=520,height=600,toolbar=no,address=no,resizable=yes,scrollbars'); return false" target="_blank">Grab this Headline Animator</a></p>
<p>2007-01-xx: version 1.1.0 is out and contains a couple of changes, a new HolidayHandler and the ability to define a valid range for the holiday (and
if the calculation is beyond that range, an exception is thrown). This is done via HolidayCalendar which should replace the simple Set<E> for holidays.
More info on the changes <a href="changes-report.html">here</a>.</p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|