[gatein-commits] gatein SVN: r5013 - in portal/branches/navcontroller: webui/portal/src/main/java/org/exoplatform/portal/url and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Nov 10 09:00:57 EST 2010


Author: julien_viet
Date: 2010-11-10 09:00:56 -0500 (Wed, 10 Nov 2010)
New Revision: 5013

Added:
   portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.java
Removed:
   portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java
Modified:
   portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java
   portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLRenderContext.java
Log:
rename MimeType to MediaType


Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java	2010-11-10 13:29:48 UTC (rev 5012)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java	2010-11-10 14:00:56 UTC (rev 5013)
@@ -48,7 +48,7 @@
    protected ParameterMap queryParams;
 
    /** . */
-   protected MimeType mimeType;
+   protected MediaType mimeType;
 
    /**
     * Create a resource URL instance.
@@ -150,11 +150,11 @@
 
    /**
     * Returns the current mime type that this URL will be generated for, or null if none is set (which means
-    * there is no guarantees about the mime type that will be used as target but it's likely to be {@link MimeType#XHTML}}).
+    * there is no guarantees about the mime type that will be used as target but it's likely to be {@link MediaType#XHTML}}).
     *
     * @return the current mime type
     */
-   public MimeType getMimeType()
+   public MediaType getMimeType()
    {
       return mimeType;
    }
@@ -165,7 +165,7 @@
     *
     * @param mimeType the new mime type
     */
-   public void setMimeType(MimeType mimeType)
+   public void setMimeType(MediaType mimeType)
    {
       this.mimeType = mimeType;
    }

Copied: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.java (from rev 4981, portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java)
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.java	                        (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.java	2010-11-10 14:00:56 UTC (rev 5013)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.web.url;
+
+/**
+ * A simple media type enumeration that is used when a URL is generated.
+ *
+ * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public enum MediaType
+{
+
+   XHTML, PLAIN
+
+}

Deleted: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java	2010-11-10 13:29:48 UTC (rev 5012)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java	2010-11-10 14:00:56 UTC (rev 5013)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2010 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.exoplatform.web.url;
-
-/**
- * A simple mime type enumeration that is used when a URL is generated.
- *
- * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public enum MimeType
-{
-
-   XHTML, PLAIN
-
-}

Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLRenderContext.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLRenderContext.java	2010-11-10 13:29:48 UTC (rev 5012)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLRenderContext.java	2010-11-10 14:00:56 UTC (rev 5013)
@@ -22,7 +22,7 @@
 import org.exoplatform.commons.utils.CharEncoder;
 import org.exoplatform.commons.utils.CharsetCharEncoder;
 import org.exoplatform.web.controller.router.RenderContext;
-import org.exoplatform.web.url.MimeType;
+import org.exoplatform.web.url.MediaType;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -38,12 +38,12 @@
 {
 
    /** . */
-   private static final Map<MimeType, String> AMP_MAP = new EnumMap<MimeType, String>(MimeType.class);
+   private static final Map<MediaType, String> AMP_MAP = new EnumMap<MediaType, String>(MediaType.class);
 
    static
    {
-      AMP_MAP.put(MimeType.XHTML, "&amp;");
-      AMP_MAP.put(MimeType.PLAIN, "&");
+      AMP_MAP.put(MediaType.XHTML, "&amp;");
+      AMP_MAP.put(MediaType.PLAIN, "&");
    }
 
    /** . */
@@ -62,7 +62,7 @@
    private List<String[]> queryParams;
 
    /** . */
-   private MimeType mimeType;
+   private MediaType mimeType;
 
 
    PortalURLRenderContext(StringBuilder buffer)
@@ -71,12 +71,12 @@
       this.queryParams = EMPTY;
    }
 
-   public MimeType getMimeType()
+   public MediaType getMimeType()
    {
       return mimeType;
    }
 
-   public void setMimeType(MimeType mimeType)
+   public void setMimeType(MediaType mimeType)
    {
       this.mimeType = mimeType;
    }
@@ -128,10 +128,10 @@
     */
    void flush()
    {
-      MimeType mt = mimeType;
+      MediaType mt = mimeType;
       if (mt == null)
       {
-         mt = MimeType.XHTML;
+         mt = MediaType.XHTML;
       }
       String amp = AMP_MAP.get(mt);
 



More information about the gatein-commits mailing list