Author: adietish
Date: 2011-10-05 13:00:12 -0400 (Wed, 05 Oct 2011)
New Revision: 35377
Added:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/utils/
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/utils/RFC822DateUtils.java
Removed:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java
Log:
[JBIDE-9793] moved RHC822DateUtils to visible package
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF 2011-10-05
16:37:27 UTC (rev 35376)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF 2011-10-05
17:00:12 UTC (rev 35377)
@@ -13,6 +13,7 @@
.
Export-Package:
org.jboss.dmr;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
org.jboss.tools.openshift.express.client,
+ org.jboss.tools.openshift.express.client.utils,
org.jboss.tools.openshift.express.internal.client;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
org.jboss.tools.openshift.express.internal.client.request;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
org.jboss.tools.openshift.express.internal.client.request.marshalling;x-friends:="org.jboss.ide.eclipse.as.openshift.test",
Copied:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/utils/RFC822DateUtils.java
(from rev 35354,
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java)
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/utils/RFC822DateUtils.java
(rev 0)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/utils/RFC822DateUtils.java 2011-10-05
17:00:12 UTC (rev 35377)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.client.utils;
+
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+
+/**
+ * @author André Dietisheim
+ */
+public class RFC822DateUtils {
+
+ public static Date getDate(String rfc822DateString) throws
DatatypeConfigurationException {
+ // SimpleDateFormat can't handle RFC822 (-04:00 instead of GMT-04:00)
+ // date formats
+ //
+ // SimpleDateFormat dateFormat = new
+ // SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
+ // return dateFormat.parse(propertyNode.asString());
+ GregorianCalendar calendar =
+ DatatypeFactory.newInstance().newXMLGregorianCalendar(rfc822DateString).toGregorianCalendar();
+ return calendar.getTime();
+ }
+
+ public static String getString(Date date) throws DatatypeConfigurationException {
+ GregorianCalendar calendar = (GregorianCalendar) GregorianCalendar.getInstance();
+ return DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar).toXMLFormat();
+ }
+}
Property changes on:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/utils/RFC822DateUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java 2011-10-05
16:37:27 UTC (rev 35376)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/response/unmarshalling/AbstractOpenshiftJsonResponseUnmarshaller.java 2011-10-05
17:00:12 UTC (rev 35377)
@@ -17,9 +17,9 @@
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.ModelType;
import org.jboss.tools.openshift.express.client.OpenshiftException;
+import org.jboss.tools.openshift.express.client.utils.RFC822DateUtils;
import org.jboss.tools.openshift.express.internal.client.IOpenshiftJsonConstants;
import org.jboss.tools.openshift.express.internal.client.response.OpenshiftResponse;
-import org.jboss.tools.openshift.express.internal.client.utils.RFC822DateUtils;
/**
* @author André Dietisheim
Deleted:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java 2011-10-05
16:37:27 UTC (rev 35376)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/internal/client/utils/RFC822DateUtils.java 2011-10-05
17:00:12 UTC (rev 35377)
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.openshift.express.internal.client.utils;
-
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-
-/**
- * @author André Dietisheim
- */
-public class RFC822DateUtils {
-
- public static Date getDate(String rfc822DateString) throws
DatatypeConfigurationException {
- // SimpleDateFormat can't handle RFC822 (-04:00 instead of GMT-04:00)
- // date formats
- //
- // SimpleDateFormat dateFormat = new
- // SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
- // return dateFormat.parse(propertyNode.asString());
- GregorianCalendar calendar =
- DatatypeFactory.newInstance().newXMLGregorianCalendar(rfc822DateString).toGregorianCalendar();
- return calendar.getTime();
- }
-
- public static String getString(Date date) throws DatatypeConfigurationException {
- GregorianCalendar calendar = (GregorianCalendar) GregorianCalendar.getInstance();
- return DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar).toXMLFormat();
- }
-}