]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5492: More dependency shuffling to get things compiling again after authority...
authorRichard Millet <remillet@berkeley.edu>
Thu, 30 Aug 2012 18:09:31 +0000 (11:09 -0700)
committerRichard Millet <remillet@berkeley.edu>
Thu, 30 Aug 2012 18:09:31 +0000 (11:09 -0700)
27 files changed:
services/IntegrationTests/src/test/java/org/collectionspace/services/IntegrationTests/test/CollectionSpaceIntegrationTest.java
services/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java
services/acquisition/client/src/test/java/org/collectionspace/services/client/test/AcquisitionServiceTest.java
services/batch/service/src/main/java/org/collectionspace/services/batch/nuxeo/CreateAndLinkLoanOutBatchJob.java
services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/CollectionObjectResource.java
services/common-api/src/main/java/org/collectionspace/services/common/api/DateUtils.java [new file with mode: 0644]
services/common-api/src/main/java/org/collectionspace/services/common/api/GregorianCalendarDateTimeUtils.java [new file with mode: 0644]
services/common/src/main/java/org/collectionspace/services/common/datetime/DateTimeFormatUtils.java
services/common/src/main/java/org/collectionspace/services/common/datetime/GregorianCalendarDateTimeUtils.java [deleted file]
services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java
services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java
services/concept/client/src/test/java/org/collectionspace/services/client/test/ConceptAuthorityServiceTest.java
services/imports/service/src/main/java/org/collectionspace/services/imports/TemplateExpander.java
services/intake/client/src/test/java/org/collectionspace/services/client/test/IntakeAuthRefsTest.java
services/intake/client/src/test/java/org/collectionspace/services/client/test/IntakeServiceTest.java
services/intake/client/src/test/java/org/collectionspace/services/client/test/OrganizationAuthRefDocsTest.java
services/intake/client/src/test/java/org/collectionspace/services/client/test/PersonAuthRefDocsTest.java
services/loanin/client/src/test/java/org/collectionspace/services/client/test/LoaninAuthRefsTest.java
services/loanin/client/src/test/java/org/collectionspace/services/client/test/LoaninServiceTest.java
services/loanout/client/src/test/java/org/collectionspace/services/client/test/LoanoutAuthRefsTest.java
services/loanout/client/src/test/java/org/collectionspace/services/client/test/LoanoutServiceTest.java
services/location/client/src/test/java/org/collectionspace/services/client/test/LocationAuthorityServiceTest.java
services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementAuthRefsTest.java
services/movement/client/src/test/java/org/collectionspace/services/client/test/MovementServiceTest.java
services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitAuthRefsTest.java

index ce402cdf9cabfbee62b503eeb91d4a5001cbc164..03e9ef27903d61d2f4c26fced56bef0c585ccfad 100644 (file)
@@ -39,7 +39,7 @@ import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.collectionobject.CollectionobjectsCommon;\r
 import org.collectionspace.services.collectionobject.TitleGroup;\r
 import org.collectionspace.services.collectionobject.TitleGroupList;\r
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;\r
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;\r
 import org.collectionspace.services.intake.IntakesCommon;\r
 import org.collectionspace.services.relation.RelationsCommon;\r
 import org.jboss.resteasy.client.ClientResponse;\r
index 7ed9eef6a48f44bd8a56b7335069fc3d21fb4264..7276c2d3c0aad018ddb3244200e60edad476999a 100644 (file)
@@ -40,7 +40,6 @@ import org.collectionspace.services.place.PlaceAuthorityResource;
 import org.collectionspace.services.concept.ConceptAuthorityResource;
 import org.collectionspace.services.taxonomy.TaxonomyAuthorityResource;
 import org.collectionspace.services.movement.MovementResource;
-import org.collectionspace.services.relation.RelationResource;
 import org.collectionspace.services.report.ReportResource;
 import org.collectionspace.services.acquisition.AcquisitionResource;
 import org.collectionspace.services.dimension.DimensionResource;
@@ -68,6 +67,7 @@ import org.collectionspace.services.common.ResourceBase;
 import org.collectionspace.services.common.ResourceMap;
 import org.collectionspace.services.common.ResourceMapHolder;
 import org.collectionspace.services.common.ResourceMapImpl;
+import org.collectionspace.services.common.relation.RelationResource;
 import org.collectionspace.services.common.security.SecurityInterceptor;
 import org.jboss.resteasy.core.Dispatcher;
 import org.jboss.resteasy.spi.ResteasyProviderFactory;
index d00090568bae751881b382e08a9a7efa32b56346..18ed56d7eba06047046473cec210281b669cb3c9 100644 (file)
@@ -32,7 +32,7 @@ import org.collectionspace.services.client.CollectionSpaceClient;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 
 import org.collectionspace.services.acquisition.AcquisitionsCommon;
index 808976073d1572d63d2eba73e44f0c735e2a1204..c13420c0819125ece36ab1627e595deaf1e10bb6 100644 (file)
@@ -10,7 +10,7 @@ import org.collectionspace.services.batch.BatchInvocable;
 import org.collectionspace.services.client.CollectionSpaceClientUtils;
 import org.collectionspace.services.common.ResourceBase;
 import org.collectionspace.services.common.ResourceMap;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.invocable.InvocationContext;
 import org.collectionspace.services.common.invocable.InvocationResults;
 import org.collectionspace.services.client.LoanoutClient;
index 228f34e79b182c52b96f820b05c112536ba03a39..7b3228ccdce28cddc5a49907595415130750527f 100644 (file)
@@ -27,10 +27,9 @@ package org.collectionspace.services.collectionobject;
 
 import org.collectionspace.services.client.CollectionObjectClient;
 import org.collectionspace.services.client.IQueryManager;
+import org.collectionspace.services.client.Profiler;
 import org.collectionspace.services.common.ResourceBase;
-import org.collectionspace.services.common.profile.Profiler;
 import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.relation.RelationResource;
 import org.collectionspace.services.relation.RelationsCommonList;
 import org.collectionspace.services.relation.RelationshipType;
 import org.jboss.resteasy.util.HttpResponseCodes;
diff --git a/services/common-api/src/main/java/org/collectionspace/services/common/api/DateUtils.java b/services/common-api/src/main/java/org/collectionspace/services/common/api/DateUtils.java
new file mode 100644 (file)
index 0000000..d76899a
--- /dev/null
@@ -0,0 +1,180 @@
+package org.collectionspace.services.common.api;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DateUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger(DateUtils.class);
+
+    final static String ISO_8601_DATE_PATTERN = "yyyy-MM-dd";
+    final static String UTC_TIMEZONE_IDENTIFIER = "UTC";
+    final static String ISO_8601_UTC_TIMESTAMP_PATTERN = "yyyy-MM-dd'T'HH:mm:ss'Z'";
+    final static Locale NULL_LOCALE = null;
+    public final static List<String> isoLanguageCodes = new ArrayList(Arrays.asList(Locale.getISOLanguages()));    
+
+    /**
+     * Returns the UTC time zone.
+     *
+     * @return The UTC time zone.  Defaults to the closely-related GMT time zone,
+     *         if for some reason the UTC time zone identifier cannot be understood.
+     */
+     public static TimeZone UTCTimeZone() {
+         return TimeZone.getTimeZone(UTC_TIMEZONE_IDENTIFIER);
+     }
+    
+      /**
+       * Parses a presumptive date or date/time, using a supplied format pattern.
+       *
+       * @param str      a String, possibly a date or date/time String.
+       * @param pattern  A date or date/time pattern.
+       *
+       * @return         A date value, resulting from parsing the String using the
+       *                 supplied pattern.  Returns null if the parsing attempt fails.
+       */
+      public static Date parseDate(String str, String pattern) {
+          if (pattern == null || pattern.trim().isEmpty()) {
+              return null;
+          }
+          if (str == null || str.trim().isEmpty()) {
+              return null;
+          }
+          DateFormat df = null;
+          Date date = null;
+          try {
+              df = new SimpleDateFormat(pattern);
+              date = parseDate(str, df);
+          } catch (IllegalArgumentException iae) {
+              return null;
+          }
+          return date;
+      }
+
+      /**
+       * Parses a presumptive date or date/time, using a supplied format pattern.
+       *
+       * @param str      a String, possibly a date or date/time String.
+       * @param df       A date formatter.
+       *
+       * @return         A date value, resulting from parsing the String using the
+       *                 supplied formatter.  Returns null if the parsing attempt fails.
+       */
+      public static Date parseDate(String str, DateFormat df) {
+          if (df == null) {
+              return null;
+          }
+          if (str == null || str.trim().isEmpty()) {
+              return null;
+          }
+          Date date = null;
+          try {
+              df.setLenient(false);
+              date = df.parse(str);
+          } catch (ParseException pe) {
+              return null;
+          }
+          return date;
+      }
+      
+      /**
+       * Returns the locale associated with a supplied ISO 639-1 language code.
+       *
+       * @param lang     A language code.
+       *
+       * @return         A locale based on that language code; or null
+       *                 if the code was null, empty, or invalid.
+       */
+      public static Locale getLocale(String lang) {
+          if (lang == null || lang.trim().isEmpty()) {
+              logger.warn("Null or empty date language code was provided when getting locale.");
+              return NULL_LOCALE;
+          }
+          if (!isoLanguageCodes.contains(lang.trim())) {
+              logger.warn("Invalid language code '" + lang + "'");
+              return NULL_LOCALE;
+          }
+          return new Locale(lang);
+      }
+
+      /**
+       * Returns a date formatter for a provided date or date/time pattern.
+       *
+       * @param pattern  A date or date/time pattern.
+       *
+       * @return         A date formatter using that pattern, or null
+       *                 if the pattern was null, empty, or invalid.
+       */
+      public static DateFormat getDateFormatter(String pattern) {
+          return getDateFormatter(pattern, NULL_LOCALE);
+      }
+      
+      /**
+       * Returns a date formatter for a supplied date or date/time pattern,
+       * in the supplied locale (if any).
+       *
+       * @param pattern  A date or date/time pattern.
+       * @param locale   A locale.
+       *
+       * @return         A date formatter using that pattern and locale (if any), or null
+       *                 if the pattern was null, empty, or invalid.
+       */
+      public static DateFormat getDateFormatter(String pattern, Locale locale) {
+          DateFormat df = null;
+          if (pattern == null || pattern.trim().isEmpty()) {
+              logger.warn("Null or empty date pattern string was provided when getting date formatter.");
+              return df;
+          }
+          try {
+              if (locale == null) {
+                  df = new SimpleDateFormat(pattern);
+              } else {
+                  df = new SimpleDateFormat(pattern, locale);
+              }
+              df.setLenient(false);
+          } catch (IllegalArgumentException iae) {
+              logger.warn("Invalid date pattern string '" + pattern + "': " + iae.getMessage());
+          }
+          return df;
+      }
+      
+      /**
+       * Identifies whether a presumptive date or date/time can be parsed
+       * by a date parser, using a supplied format pattern.
+       *
+       * @param str      a String, possibly a date or date/time String.
+       * @param pattern  A date or date/time pattern.
+       *
+       * @return         true, if the String can be parsed, using the pattern;
+       *                 false if the String cannot be parsed by the pattern,
+       *                 or if the String or pattern are null.
+       */
+      public static boolean isParseableByDatePattern(String str, String pattern) {
+          if (pattern == null || pattern.trim().isEmpty()) {
+              return false;
+          }
+          if (str == null || str.trim().isEmpty()) {
+              return false;
+          }
+          DateFormat df = null;
+          try {
+              df = new SimpleDateFormat(pattern);
+              df.parse(str);
+          } catch (ParseException pe) {
+              return false;
+          } catch (IllegalArgumentException iae) {
+              return false;
+          }
+          return true;
+      }
+     
+}
diff --git a/services/common-api/src/main/java/org/collectionspace/services/common/api/GregorianCalendarDateTimeUtils.java b/services/common-api/src/main/java/org/collectionspace/services/common/api/GregorianCalendarDateTimeUtils.java
new file mode 100644 (file)
index 0000000..1f0af89
--- /dev/null
@@ -0,0 +1,165 @@
+/**
+ *  This document is a part of the source code and related artifacts
+ *  for CollectionSpace, an open source collections management system
+ *  for museums and related institutions:
+
+ *  http://www.collectionspace.org
+ *  http://wiki.collectionspace.org
+
+ *  Copyright Â© 2009 University of California at Berkeley
+
+ *  Licensed under the Educational Community License (ECL), Version 2.0.
+ *  You may not use this file except in compliance with this License.
+
+ *  You may obtain a copy of the ECL 2.0 License at
+
+ *  https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services.common.api;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * GregorianCalendarDateTimeUtils.java
+ *
+ * $LastChangedRevision: $
+ * $LastChangedDate: $
+ *
+ */
+public class GregorianCalendarDateTimeUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger(GregorianCalendarDateTimeUtils.class);
+
+    /**
+     * Returns a String representing the current date and time instance.
+     * in the UTC time zone, formatted as an ISO 8601 timestamp.
+     *
+     * @return A String representing the current date and time instance.
+     */
+     public static String timestampUTC() {
+         return formatAsISO8601Timestamp(currentDateAndTime(DateUtils.UTCTimeZone()));
+     }
+     
+    /**
+     * Returns a String representing the current date and time instance.
+     * in the UTC time zone, formatted as an ISO 8601 date.
+     *
+     * @return A String representing the current date and time instance.
+     */
+     public static String currentDateUTC() {
+         return formatAsISO8601Date(currentDateAndTime(DateUtils.UTCTimeZone()));
+     }
+    
+   /**
+    * Returns a calendar date, representing the current date and time instance
+    * in the UTC time zone.
+    *
+    * @return The current date and time instance in the UTC time zone.
+    */
+    public static GregorianCalendar currentDateAndTimeUTC() {
+        return currentDateAndTime(DateUtils.UTCTimeZone());
+    }
+
+   /**
+    * Returns a calendar date, representing the current date and time instance
+    * in the specified time zone.
+    *
+    * @return The current date and time instance in the specified time zone.
+    *         If the time zone is null, will return the current time and
+    *         date in the time zone intrinsic to a new Calendar instance.
+    */
+    public static GregorianCalendar currentDateAndTime(TimeZone tz) {
+        GregorianCalendar gcal = new GregorianCalendar();
+        if (tz != null) {
+            gcal.setTimeZone(tz);
+        }
+        Date now = new Date();
+        gcal.setTime(now);
+        return gcal;
+    }
+
+    
+    /**
+     * Returns a representation of a calendar date and time instance,
+     * as an ISO 8601-formatted timestamp in the UTC time zone.
+     *
+     * @param cal a calendar date and time instance.
+     *
+     * @return    a representation of that calendar date and time instance,
+     *            as an ISO 8601-formatted timestamp in the UTC time zone.
+     */
+    public static String formatAsISO8601Timestamp(GregorianCalendar cal) {
+        return formatGregorianCalendarDate(cal, DateUtils.UTCTimeZone(),
+                       DateUtils.getDateFormatter(DateUtils.ISO_8601_UTC_TIMESTAMP_PATTERN));
+    }
+    
+    /**
+     * Returns a representation of a calendar date and time instance,
+     * as an ISO 8601-formatted date.
+     *
+     * @param cal a calendar date and time instance.
+     *
+     * @return    a representation of that calendar date and time instance,
+     *            as an ISO 8601-formatted date.
+     */
+    public static String formatAsISO8601Date(GregorianCalendar cal) {
+        return formatGregorianCalendarDate(cal, DateUtils.UTCTimeZone(),
+                       DateUtils.getDateFormatter(DateUtils.ISO_8601_DATE_PATTERN));
+    }
+
+    /**
+     * Formats a provided calendar date using a supplied date formatter,
+     * in the default system time zone.
+     *
+     * @param date  A calendar date to format.
+     * @param df    A date formatter to apply.
+     *
+     * @return      A formatted date string, or the empty string
+     *              if one or more of the parameter values were invalid.
+     */
+    public static String formatGregorianCalendarDate(GregorianCalendar gcal, DateFormat df) {
+        return formatGregorianCalendarDate(gcal, TimeZone.getDefault(), df);
+    }
+
+    /**
+     * Formats a provided calendar date using a provided date formatter,
+     * in a provided time zone.
+     *
+     * @param date  A calendar date to format.
+     * @param tz    The time zone qualifier for the calendar date to format.
+     * @param df    A date formatter to apply.
+     *
+     * @return      A formatted date string, or the empty string
+     *              if one or more of the parameter values were invalid.
+     */
+    public static String formatGregorianCalendarDate(GregorianCalendar gcal, TimeZone tz, DateFormat df) {
+        String formattedDate = "";
+        if (gcal == null) {
+            logger.warn("Null calendar date was provided when a non-null calendar date was required.");
+            return formattedDate;
+        }
+        if (tz == null) {
+            logger.warn("Null time zone was provided when a non-null time zone was required.");
+            return formattedDate;
+        }
+        if (df == null) {
+            logger.warn("Null date formatter was provided when a non-null date formatter was required.");
+            return formattedDate;
+        }
+        gcal.setTimeZone(tz);
+        Date date = gcal.getTime();
+        df.setTimeZone(tz);
+        formattedDate = df.format(date);
+        return formattedDate;
+    }    
+}
index eab1a2efa3ec2eec2b132f00a1c3f4bc4af22e56..cb8f98df09acb3d61e47e608a88b60c2a56b7269 100644 (file)
@@ -31,6 +31,8 @@ import java.util.Map;
 import java.util.TimeZone;
 
 import org.collectionspace.services.common.ServiceMain;
+import org.collectionspace.services.common.api.DateUtils;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
 import org.collectionspace.services.common.config.TenantBindingUtils;
 import org.collectionspace.services.common.context.ServiceContext;
@@ -52,10 +54,6 @@ public class DateTimeFormatUtils {
     private static final Logger logger = LoggerFactory.getLogger(DateTimeFormatUtils.class);
     final static String DATE_FORMAT_PATTERN_PROPERTY_NAME = "datePattern";
     final static String LOCALE_LANGUAGE_CODE_PROPERTY_NAME = "localeLanguage";
-    final static Locale NULL_LOCALE = null;
-    final static List<String> isoLanguageCodes = new ArrayList(Arrays.asList(Locale.getISOLanguages()));
-    final static String ISO_8601_DATE_PATTERN = "yyyy-MM-dd";
-    final static String ISO_8601_UTC_TIMESTAMP_PATTERN = "yyyy-MM-dd'T'HH:mm:ss'Z'";
     static Map<String,List<DateFormat>> dateFormatters = new HashMap<String,List<DateFormat>>();
     static Map<String,List<String>> datePatterns = new HashMap<String,List<String>>();
     static Map<String,List<String>> localeLanguageCodes = new HashMap<String,List<String>>();
@@ -118,9 +116,9 @@ public class DateTimeFormatUtils {
         if (hasLanguageCodes) {
             for (String languageCode : languageCodes) {
                 if (languageCode != null && ! languageCode.trim().isEmpty()) {
-                    locale = getLocale(languageCode);
+                    locale = DateUtils.getLocale(languageCode);
                     for (String pattern : patterns) {
-                        df = getDateFormatter(pattern, locale);
+                        df = DateUtils.getDateFormatter(pattern, locale);
                         if (df != null)  {
                             formatters.add(df);
                         }
@@ -129,7 +127,7 @@ public class DateTimeFormatUtils {
             }
         } else {
             for (String pattern : patterns) {
-                df = getDateFormatter(pattern, locale);
+                df = DateUtils.getDateFormatter(pattern, locale);
                 if (df != null)  {
                     formatters.add(df);
                 }
@@ -215,7 +213,7 @@ public class DateTimeFormatUtils {
         List<String> validPatterns = new ArrayList<String>();
         for (String pattern : patterns) {
             try {
-                df = getDateFormatter(pattern);
+                df = DateUtils.getDateFormatter(pattern);
                 validPatterns.add(pattern);
             } catch (IllegalArgumentException iae) {
                 logger.warn("Invalid " + DATE_FORMAT_PATTERN_PROPERTY_NAME + " property: " + pattern);
@@ -294,7 +292,7 @@ public class DateTimeFormatUtils {
         }
         List<String> validLanguageCodes = new ArrayList<String>();
         for (String code : languageCodes) {
-            if (code != null && isoLanguageCodes.contains(code.trim())) {
+            if (code != null && DateUtils.isoLanguageCodes.contains(code.trim())) {
                 validLanguageCodes.add(code);
             }
         }
@@ -318,7 +316,7 @@ public class DateTimeFormatUtils {
         Date date = null;
         List<DateFormat> formatters = getDateFormattersForTenant(tenantId);
         for (DateFormat formatter : formatters) {
-            date = parseDate(dateStr, formatter);
+            date = DateUtils.parseDate(dateStr, formatter);
             if (date != null) {
                 break;
             }
@@ -328,227 +326,8 @@ public class DateTimeFormatUtils {
         } else {
             GregorianCalendar gcal = new GregorianCalendar();
             gcal.setTime(date);
-            String isoStr = formatAsISO8601Timestamp(gcal);
+            String isoStr = GregorianCalendarDateTimeUtils.formatAsISO8601Timestamp(gcal);
             return isoStr;
         }
     }
-
-    /**
-     * Returns a representation of a calendar date and time instance,
-     * as an ISO 8601-formatted timestamp in the UTC time zone.
-     *
-     * @param cal a calendar date and time instance.
-     *
-     * @return    a representation of that calendar date and time instance,
-     *            as an ISO 8601-formatted timestamp in the UTC time zone.
-     */
-    public static String formatAsISO8601Timestamp(GregorianCalendar cal) {
-        return formatGregorianCalendarDate(cal, GregorianCalendarDateTimeUtils.UTCTimeZone(),
-                getDateFormatter(ISO_8601_UTC_TIMESTAMP_PATTERN));
-    }
-    
-    /**
-     * Returns a representation of a calendar date and time instance,
-     * as an ISO 8601-formatted date.
-     *
-     * @param cal a calendar date and time instance.
-     *
-     * @return    a representation of that calendar date and time instance,
-     *            as an ISO 8601-formatted date.
-     */
-    public static String formatAsISO8601Date(GregorianCalendar cal) {
-        return formatGregorianCalendarDate(cal, GregorianCalendarDateTimeUtils.UTCTimeZone(),
-                getDateFormatter(ISO_8601_DATE_PATTERN));
-    }
-
-    /**
-     * Formats a provided calendar date using a supplied date formatter,
-     * in the default system time zone.
-     *
-     * @param date  A calendar date to format.
-     * @param df    A date formatter to apply.
-     *
-     * @return      A formatted date string, or the empty string
-     *              if one or more of the parameter values were invalid.
-     */
-    public static String formatGregorianCalendarDate(GregorianCalendar gcal, DateFormat df) {
-        return formatGregorianCalendarDate(gcal, TimeZone.getDefault(), df);
-    }
-
-    /**
-     * Formats a provided calendar date using a provided date formatter,
-     * in a provided time zone.
-     *
-     * @param date  A calendar date to format.
-     * @param tz    The time zone qualifier for the calendar date to format.
-     * @param df    A date formatter to apply.
-     *
-     * @return      A formatted date string, or the empty string
-     *              if one or more of the parameter values were invalid.
-     */
-    public static String formatGregorianCalendarDate(GregorianCalendar gcal, TimeZone tz, DateFormat df) {
-        String formattedDate = "";
-        if (gcal == null) {
-            logger.warn("Null calendar date was provided when a non-null calendar date was required.");
-            return formattedDate;
-        }
-        if (tz == null) {
-            logger.warn("Null time zone was provided when a non-null time zone was required.");
-            return formattedDate;
-        }
-        if (df == null) {
-            logger.warn("Null date formatter was provided when a non-null date formatter was required.");
-            return formattedDate;
-        }
-        gcal.setTimeZone(tz);
-        Date date = gcal.getTime();
-        df.setTimeZone(tz);
-        formattedDate = df.format(date);
-        return formattedDate;
-    }
-
-    /**
-     * Identifies whether a presumptive date or date/time can be parsed
-     * by a date parser, using a supplied format pattern.
-     *
-     * @param str      a String, possibly a date or date/time String.
-     * @param pattern  A date or date/time pattern.
-     *
-     * @return         true, if the String can be parsed, using the pattern;
-     *                 false if the String cannot be parsed by the pattern,
-     *                 or if the String or pattern are null.
-     */
-    public static boolean isParseableByDatePattern(String str, String pattern) {
-        if (pattern == null || pattern.trim().isEmpty()) {
-            return false;
-        }
-        if (str == null || str.trim().isEmpty()) {
-            return false;
-        }
-        DateFormat df = null;
-        try {
-            df = new SimpleDateFormat(pattern);
-            df.parse(str);
-        } catch (ParseException pe) {
-            return false;
-        } catch (IllegalArgumentException iae) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Parses a presumptive date or date/time, using a supplied format pattern.
-     *
-     * @param str      a String, possibly a date or date/time String.
-     * @param pattern  A date or date/time pattern.
-     *
-     * @return         A date value, resulting from parsing the String using the
-     *                 supplied pattern.  Returns null if the parsing attempt fails.
-     */
-    public static Date parseDate(String str, String pattern) {
-        if (pattern == null || pattern.trim().isEmpty()) {
-            return null;
-        }
-        if (str == null || str.trim().isEmpty()) {
-            return null;
-        }
-        DateFormat df = null;
-        Date date = null;
-        try {
-            df = new SimpleDateFormat(pattern);
-            date = parseDate(str, df);
-        } catch (IllegalArgumentException iae) {
-            return null;
-        }
-        return date;
-    }
-
-       /**
-     * Parses a presumptive date or date/time, using a supplied format pattern.
-     *
-     * @param str      a String, possibly a date or date/time String.
-     * @param df       A date formatter.
-     *
-     * @return         A date value, resulting from parsing the String using the
-     *                 supplied formatter.  Returns null if the parsing attempt fails.
-     */
-    public static Date parseDate(String str, DateFormat df) {
-        if (df == null) {
-            return null;
-        }
-        if (str == null || str.trim().isEmpty()) {
-            return null;
-        }
-        Date date = null;
-        try {
-            df.setLenient(false);
-            date = df.parse(str);
-        } catch (ParseException pe) {
-            return null;
-        }
-        return date;
-    }
-
-    /**
-     * Returns the locale associated with a supplied ISO 639-1 language code.
-     *
-     * @param lang     A language code.
-     *
-     * @return         A locale based on that language code; or null
-     *                 if the code was null, empty, or invalid.
-     */
-    public static Locale getLocale(String lang) {
-        if (lang == null || lang.trim().isEmpty()) {
-            logger.warn("Null or empty date language code was provided when getting locale.");
-            return NULL_LOCALE;
-        }
-        if (! isoLanguageCodes.contains(lang.trim())) {
-            logger.warn("Invalid language code '" + lang + "'");
-            return NULL_LOCALE;
-        }
-        return new Locale(lang);
-    }
-
-    /**
-     * Returns a date formatter for a provided date or date/time pattern.
-     *
-     * @param pattern  A date or date/time pattern.
-     *
-     * @return         A date formatter using that pattern, or null
-     *                 if the pattern was null, empty, or invalid.
-     */
-    public static DateFormat getDateFormatter(String pattern) {
-        return getDateFormatter(pattern, NULL_LOCALE);
-    }
-
-    /**
-     * Returns a date formatter for a supplied date or date/time pattern,
-     * in the supplied locale (if any).
-     *
-     * @param pattern  A date or date/time pattern.
-     * @param locale   A locale.
-     *
-     * @return         A date formatter using that pattern and locale (if any), or null
-     *                 if the pattern was null, empty, or invalid.
-     */
-    public static DateFormat getDateFormatter(String pattern, Locale locale) {
-        DateFormat df = null;
-        if (pattern == null || pattern.trim().isEmpty()) {
-            logger.warn("Null or empty date pattern string was provided when getting date formatter.");
-            return df;
-        }
-        try {
-            if (locale == null) {
-                df = new SimpleDateFormat(pattern);
-            } else {
-                df = new SimpleDateFormat(pattern, locale);
-            }
-            df.setLenient(false);
-        } catch (IllegalArgumentException iae) {
-            logger.warn("Invalid date pattern string '" + pattern + "': " + iae.getMessage());
-        }
-        return df;
-    }
-
 }
diff --git a/services/common/src/main/java/org/collectionspace/services/common/datetime/GregorianCalendarDateTimeUtils.java b/services/common/src/main/java/org/collectionspace/services/common/datetime/GregorianCalendarDateTimeUtils.java
deleted file mode 100644 (file)
index ec2217a..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- *  This document is a part of the source code and related artifacts
- *  for CollectionSpace, an open source collections management system
- *  for museums and related institutions:
-
- *  http://www.collectionspace.org
- *  http://wiki.collectionspace.org
-
- *  Copyright Â© 2009 University of California at Berkeley
-
- *  Licensed under the Educational Community License (ECL), Version 2.0.
- *  You may not use this file except in compliance with this License.
-
- *  You may obtain a copy of the ECL 2.0 License at
-
- *  https://source.collectionspace.org/collection-space/LICENSE.txt
- */
-package org.collectionspace.services.common.datetime;
-
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * GregorianCalendarDateTimeUtils.java
- *
- * $LastChangedRevision: $
- * $LastChangedDate: $
- *
- */
-public class GregorianCalendarDateTimeUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger(GregorianCalendarDateTimeUtils.class);
-
-    final static String UTC_TIMEZONE_IDENTIFIER = "UTC";
-    final static String ISO_8601_UTC_TIMESTAMP_PATTERN = "yyyy-MM-dd'T'HH:mm:ss'Z'";
-
-   /**
-    * Returns the UTC time zone.
-    *
-    * @return The UTC time zone.  Defaults to the closely-related GMT time zone,
-    *         if for some reason the UTC time zone identifier cannot be understood.
-    */
-    public static TimeZone UTCTimeZone() {
-        return TimeZone.getTimeZone(UTC_TIMEZONE_IDENTIFIER);
-    }
-
-   /**
-    * Returns a calendar date, representing the current date and time instance
-    * in the UTC time zone.
-    *
-    * @return The current date and time instance in the UTC time zone.
-    */
-    public static GregorianCalendar currentDateAndTimeUTC() {
-        return currentDateAndTime(UTCTimeZone());
-    }
-
-   /**
-    * Returns a calendar date, representing the current date and time instance
-    * in the specified time zone.
-    *
-    * @return The current date and time instance in the specified time zone.
-    *         If the time zone is null, will return the current time and
-    *         date in the time zone intrinsic to a new Calendar instance.
-    */
-    public static GregorianCalendar currentDateAndTime(TimeZone tz) {
-        GregorianCalendar gcal = new GregorianCalendar();
-        if (tz != null) {
-            gcal.setTimeZone(tz);
-        }
-        Date now = new Date();
-        gcal.setTime(now);
-        return gcal;
-    }
-
-   /**
-    * Returns a String representing the current date and time instance.
-    * in the UTC time zone, formatted as an ISO 8601 timestamp.
-    *
-    * @return A String representing the current date and time instance.
-    */
-    public static String timestampUTC() {
-        return DateTimeFormatUtils.formatAsISO8601Timestamp(currentDateAndTime(UTCTimeZone()));
-    }
-    
-   /**
-    * Returns a String representing the current date and time instance.
-    * in the UTC time zone, formatted as an ISO 8601 date.
-    *
-    * @return A String representing the current date and time instance.
-    */
-    public static String currentDateUTC() {
-        return DateTimeFormatUtils.formatAsISO8601Date(currentDateAndTime(UTCTimeZone()));
-    }
-
-}
index a02b1f86a6ff110ccd7aab31c4974aaf9e78b506..113729df2d5324c9d16ae3c07e8b393d2094e709 100644 (file)
  */\r
 package org.collectionspace.services.common.imaging.nuxeo;\r
 \r
-import java.awt.Color;\r
-import java.awt.Font;\r
-import java.awt.Graphics;\r
-import java.awt.image.BufferedImage;\r
-import java.io.ByteArrayInputStream;\r
 import java.io.File;\r
 import java.io.ByteArrayOutputStream;\r
-import java.io.FileDescriptor;\r
-import java.io.FileInputStream;\r
 import java.io.FileNotFoundException;\r
 import java.io.InputStream;\r
 import java.io.BufferedInputStream;\r
@@ -45,11 +38,6 @@ import java.math.BigInteger;
 import java.util.HashMap;\r
 import java.util.List;\r
 import java.util.Map;\r
-import java.util.Random;\r
-import java.util.Set;\r
-import java.lang.reflect.Field;\r
-\r
-import javax.imageio.ImageIO;\r
 \r
 import org.nuxeo.runtime.api.Framework;\r
 //import org.nuxeo.runtime.api.ServiceManager;\r
@@ -112,7 +100,7 @@ import org.slf4j.LoggerFactory;
 import org.collectionspace.services.common.ServiceMain;\r
 import org.collectionspace.services.common.blob.BlobInput;\r
 import org.collectionspace.services.common.context.ServiceContext;\r
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;\r
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;\r
 import org.collectionspace.services.blob.BlobsCommon;\r
 import org.collectionspace.services.blob.DimensionSubGroup;\r
 import org.collectionspace.services.blob.DimensionSubGroupList;\r
index 22c7f1355b4aba6c0d8311a9a7620771fbb67056..cee119ce0c571feb1298e04f72972f8382a7125c 100644 (file)
@@ -36,17 +36,15 @@ import org.collectionspace.services.client.CollectionSpaceClient;
 import org.collectionspace.services.client.IQueryManager;\r
 import org.collectionspace.services.client.IRelationsManager;\r
 import org.collectionspace.services.common.ReflectionMapper;\r
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;\r
 import org.collectionspace.services.common.api.Tools;\r
 import org.collectionspace.services.common.context.AbstractServiceContextImpl;\r
-import org.collectionspace.services.common.context.MultipartServiceContext;\r
-import org.collectionspace.services.common.datetime.DateTimeFormatUtils;\r
 import org.collectionspace.services.common.document.DocumentException;\r
 import org.collectionspace.services.common.document.DocumentWrapper;\r
 import org.collectionspace.services.common.query.QueryContext;\r
 import org.collectionspace.services.common.relation.nuxeo.RelationsUtils;\r
 import org.collectionspace.services.config.service.DocHandlerParams;\r
 import org.collectionspace.services.config.service.ListResultField;\r
-import org.collectionspace.services.config.service.ServiceBindingType;\r
 import org.collectionspace.services.jaxb.AbstractCommonList;\r
 import org.collectionspace.services.nuxeo.client.java.CommonList;\r
 import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;\r
@@ -156,7 +154,7 @@ public abstract class DocHandlerBase<T> extends RemoteDocumentModelHandlerImpl<T
                        GregorianCalendar cal = (GregorianCalendar)\r
                                                                docModel.getProperty(CollectionSpaceClient.COLLECTIONSPACE_CORE_SCHEMA,\r
                                                                                CollectionSpaceClient.COLLECTIONSPACE_CORE_UPDATED_AT);\r
-                       String updatedAt = DateTimeFormatUtils.formatAsISO8601Timestamp(cal);\r
+                       String updatedAt = GregorianCalendarDateTimeUtils.formatAsISO8601Timestamp(cal);\r
                        return updatedAt;\r
        }\r
 \r
index 3525d88c64e3fc2ed8ce48a8e176fd4853e535a9..5cdd32abe0a5e34a1f1b2f278bbdc421daf74fb2 100644 (file)
@@ -34,9 +34,9 @@ import org.collectionspace.services.client.IQueryManager;
 import org.collectionspace.services.client.IRelationsManager;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.authorityref.AuthorityRefList;
 import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.document.AbstractMultipartDocumentHandlerImpl;
 import org.collectionspace.services.common.document.DocumentFilter;
 import org.collectionspace.services.common.document.DocumentWrapper;
index aa525b748852d0ed863e31d778c1143b348bd8c7..c6219809f0b88314c1d19c2cc4353dbaea50c562 100644 (file)
@@ -35,6 +35,7 @@ import org.collectionspace.services.client.CollectionSpaceClient;
 import org.collectionspace.services.client.IQueryManager;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.api.Tools;
 import org.collectionspace.services.common.context.ServiceBindingUtils;
 import org.collectionspace.services.common.context.ServiceContext;
@@ -758,7 +759,7 @@ public class NuxeoUtils {
                        if (value == null) {
                                // Nothing to do - leave returnVal null
                        } else if (value instanceof GregorianCalendar) {
-                               returnVal = DateTimeFormatUtils.formatAsISO8601Timestamp((GregorianCalendar) value);
+                               returnVal = GregorianCalendarDateTimeUtils.formatAsISO8601Timestamp((GregorianCalendar) value);
                        } else {
                                returnVal = value.toString();
                        }
index b9afc75e60a1b1a6a397f005c9766c9c02bb94da..e3462f9dcc9ebfc275f5bf076b08f2729638ac51 100644 (file)
@@ -31,8 +31,7 @@ import org.collectionspace.services.client.CollectionSpaceClient;
 import org.collectionspace.services.client.ConceptAuthorityClient;
 import org.collectionspace.services.client.ConceptAuthorityClientUtils;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
-import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.concept.ConceptTermGroup;
 import org.collectionspace.services.concept.ConceptTermGroupList;
 import org.collectionspace.services.concept.ConceptauthoritiesCommon;
index 2ef9d3be65671c228516d48752cee5d04633def1..ff40a3c489e95d7514f199d43b1c74f56c640357 100644 (file)
@@ -37,11 +37,11 @@ import org.collectionspace.services.common.ServiceMain;
 import org.collectionspace.services.common.XmlSaxFragmenter;
 import org.collectionspace.services.common.XmlTools;
 import org.collectionspace.services.common.api.FileTools;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.api.Tools;
 import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
 import org.collectionspace.services.common.config.URIUtils;
 import org.collectionspace.services.common.context.ServiceBindingUtils;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.config.service.ServiceBindingType;
 import org.collectionspace.services.nuxeo.util.NuxeoUtils;
 import org.dom4j.Attribute;
index e2e05f43699f7663d684c6bab3e7b298e7de7133..be7fbdff1310ca4003d79f16199b96d8bfd94214 100644 (file)
@@ -37,8 +37,8 @@ import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.client.PersonAuthorityClientUtils;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.authorityref.AuthorityRefList;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.intake.ConditionCheckerOrAssessorList;
 import org.collectionspace.services.intake.IntakesCommon;
 import org.collectionspace.services.intake.InsurerList;
index 57198ae8286601cde938f223ac87db1955ed0384..08f7ac1bafd5e7042c4925857111fa419f10f1d3 100644 (file)
@@ -33,7 +33,7 @@ import org.collectionspace.services.client.PayloadInputPart;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.intake.EntryMethodList;
 import org.collectionspace.services.intake.FieldCollectionEventNameList;
 import org.collectionspace.services.intake.CurrentLocationGroup;
index f49d8cdcc06b88fd406277945af6e1f985e18454..95f4d90566c0b8eb9b486d577502bfff9b8d895e 100644 (file)
@@ -37,8 +37,8 @@ import org.collectionspace.services.client.OrgAuthorityClient;
 import org.collectionspace.services.client.OrgAuthorityClientUtils;\r
 import org.collectionspace.services.client.PayloadOutputPart;\r
 import org.collectionspace.services.client.PoxPayloadOut;\r
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;\r
 import org.collectionspace.services.common.authorityref.AuthorityRefDocList;\r
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;\r
 import org.collectionspace.services.intake.ConditionCheckerOrAssessorList;\r
 import org.collectionspace.services.intake.IntakesCommon;\r
 import org.collectionspace.services.intake.InsurerList;\r
index 58ea504116701c12699cffc8c802d45f3409e74f..d1fd4b6a6b3b8089113387c43e5b1401e1da29a0 100644 (file)
@@ -36,8 +36,8 @@ import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.client.PersonAuthorityClientUtils;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.authorityref.AuthorityRefDocList;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.intake.ConditionCheckerOrAssessorList;
 import org.collectionspace.services.intake.IntakesCommon;
 import org.collectionspace.services.intake.InsurerList;
index e79023f937113d64266d7d8f3050db9a771ebbee..9837fe0a1f677375cdcad359dba1a883b0cc13fb 100644 (file)
@@ -27,7 +27,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
 import org.collectionspace.services.PersonJAXBSchema;
@@ -38,8 +37,8 @@ import org.collectionspace.services.client.PersonAuthorityClientUtils;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.authorityref.AuthorityRefList;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.loanin.LenderGroup;
 import org.collectionspace.services.loanin.LenderGroupList;
index 0c6157c9831338fe40736cd7fa1e9f88f0299553..9cf4a86dbe9a48aaf6989f6963b16771bced5939 100644 (file)
@@ -24,7 +24,6 @@ package org.collectionspace.services.client.test;
 
 //import java.util.ArrayList;
 import java.util.List;
-import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
 import org.collectionspace.services.client.AbstractCommonListUtils;
@@ -34,7 +33,7 @@ import org.collectionspace.services.client.PayloadInputPart;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.loanin.LenderGroup;
 import org.collectionspace.services.loanin.LenderGroupList;
index dc2d037654f95f2b75b5db5fd58f36d31bcff284..2a4869438bd6a1bd88d7da26cae254975f8abcf5 100644 (file)
@@ -37,8 +37,8 @@ import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.client.PersonAuthorityClientUtils;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.authorityref.AuthorityRefList;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.loanout.LoansoutCommon;
 import org.collectionspace.services.person.PersonTermGroup;
index 2b0ae6c160f42f5e03cf311fc976979c9ad049f2..ce50a7b9b245c10d300a3e7cdded64a6b4a769f5 100644 (file)
@@ -33,7 +33,7 @@ import org.collectionspace.services.client.PayloadInputPart;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.loanout.LoanStatusGroup;
 import org.collectionspace.services.loanout.LoanStatusGroupList;
index e151c1ea1a16c8833dc2d268a07c3a59c6bf524d..55c909eed44bf3323a23767339396605150fd340 100644 (file)
@@ -34,9 +34,9 @@ import org.collectionspace.services.client.CollectionSpaceClient;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.client.LocationAuthorityClient;
 import org.collectionspace.services.client.LocationAuthorityClientUtils;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.location.LocTermGroup;
 import org.collectionspace.services.location.LocTermGroupList;
index 473a109a2009f111c9a57022cb3391666ae47e81..325266c82e5e5bcd066d5867cd06e0b65bda548d 100644 (file)
@@ -39,8 +39,8 @@ import org.collectionspace.services.client.PayloadInputPart;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.authorityref.AuthorityRefList;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.movement.MovementsCommon;
 import org.collectionspace.services.person.PersonTermGroup;
index 9dcef12048db771fbc84fe85eb3098da65224172..4a37cbcb194372b9fa95c135fd06ed06d35145fc 100644 (file)
@@ -26,7 +26,6 @@ import java.util.List;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.client.CollectionSpaceClient;
 import org.collectionspace.services.client.MovementClient;
 import org.collectionspace.services.jaxb.AbstractCommonList;
@@ -40,6 +39,7 @@ import org.collectionspace.services.client.PayloadInputPart;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
index afe004f9ec874690d5e52317cf4f2d7aa1fe4a58..c517d0b83a72c94974a1e93779306f406b1026cf 100644 (file)
@@ -38,8 +38,8 @@ import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.client.PersonAuthorityClientUtils;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.api.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.common.authorityref.AuthorityRefList;
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.objectexit.StructuredDateGroup;
 import org.collectionspace.services.objectexit.ObjectexitCommon;