Author: julien_viet
Date: 2010-11-30 03:49:27 -0500 (Tue, 30 Nov 2010)
New Revision: 5379
Added:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java
Removed:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.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 MediaType to MimeType
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-30
08:49:05 UTC (rev 5378)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java 2010-11-30
08:49:27 UTC (rev 5379)
@@ -48,7 +48,7 @@
protected ParameterMap queryParams;
/** . */
- protected MediaType mimeType;
+ protected MimeType 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 MediaType#XHTML}}).
+ * there is no guarantees about the mime type that will be used as target but it's
likely to be {@link MimeType#XHTML}}).
*
* @return the current mime type
*/
- public MediaType getMimeType()
+ public MimeType getMimeType()
{
return mimeType;
}
@@ -165,7 +165,7 @@
*
* @param mimeType the new mime type
*/
- public void setMimeType(MediaType mimeType)
+ public void setMimeType(MimeType mimeType)
{
this.mimeType = mimeType;
}
Deleted:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.java 2010-11-30
08:49:05 UTC (rev 5378)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.java 2010-11-30
08:49:27 UTC (rev 5379)
@@ -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 media type enumeration that is used when a URL is generated.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-public enum MediaType
-{
-
- XHTML, PLAIN
-
-}
Copied:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java
(from rev 5248,
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MediaType.java)
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java
(rev 0)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/MimeType.java 2010-11-30
08:49:27 UTC (rev 5379)
@@ -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 mime type enumeration that is used when a URL is generated.
+ *
+ * @author <a href="mailto:julien.viet@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-30
08:49:05 UTC (rev 5378)
+++
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLRenderContext.java 2010-11-30
08:49:27 UTC (rev 5379)
@@ -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.MediaType;
+import org.exoplatform.web.url.MimeType;
import java.util.ArrayList;
import java.util.Collections;
@@ -38,12 +38,12 @@
{
/** . */
- private static final Map<MediaType, String> AMP_MAP = new EnumMap<MediaType,
String>(MediaType.class);
+ private static final Map<MimeType, String> AMP_MAP = new EnumMap<MimeType,
String>(MimeType.class);
static
{
- AMP_MAP.put(MediaType.XHTML, "&");
- AMP_MAP.put(MediaType.PLAIN, "&");
+ AMP_MAP.put(MimeType.XHTML, "&");
+ AMP_MAP.put(MimeType.PLAIN, "&");
}
/** . */
@@ -62,7 +62,7 @@
private List<String[]> queryParams;
/** . */
- private MediaType mimeType;
+ private MimeType mimeType;
PortalURLRenderContext(StringBuilder buffer)
@@ -71,12 +71,12 @@
this.queryParams = EMPTY;
}
- public MediaType getMimeType()
+ public MimeType getMimeType()
{
return mimeType;
}
- public void setMimeType(MediaType mimeType)
+ public void setMimeType(MimeType mimeType)
{
this.mimeType = mimeType;
}
@@ -128,10 +128,10 @@
*/
void flush()
{
- MediaType mt = mimeType;
+ MimeType mt = mimeType;
if (mt == null)
{
- mt = MediaType.XHTML;
+ mt = MimeType.XHTML;
}
String amp = AMP_MAP.get(mt);