Author: julien(a)jboss.com
Date: 2008-04-09 11:16:45 -0400 (Wed, 09 Apr 2008)
New Revision: 10521
Removed:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/MediaType.java
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/SubtypeDef.java
Log:
added multipart/form-data as media type constant
Deleted:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java
===================================================================
---
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java 2008-04-09
09:52:31 UTC (rev 10520)
+++
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/URLFormat.java 2008-04-09
15:16:45 UTC (rev 10521)
@@ -1,87 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * 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.jboss.portal.common.net;
-
-/**
- * Defines how a URL should be formatted when rendered.
- *
- * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
- * @version $Revision: 630 $
- */
-public class URLFormat
-{
-
- /**
- * Factory creation of URLFormat objects.
- *
- * @param secure if the url should be secure
- * @param authenticated if the url should force the user to authenticate
- * @param relative if the url is relative or absolute
- * @param escapeXML if the url should have XML escaped
- * @return the rendered URL
- */
- public static URLFormat create(Boolean secure, Boolean authenticated, Boolean
relative, Boolean escapeXML)
- {
- return new URLFormat(secure, authenticated, relative, escapeXML);
- }
-
- /** . */
- private final Boolean secure;
-
- /** . */
- private final Boolean authenticated;
-
- /** . */
- private final Boolean relative;
-
- /** . */
- private final Boolean escapeXML;
-
- private URLFormat(Boolean secure, Boolean authenticated, Boolean relative, Boolean
escapeXML)
- {
- this.secure = secure;
- this.authenticated = authenticated;
- this.relative = relative;
- this.escapeXML = escapeXML;
- }
-
- public Boolean getSecure()
- {
- return secure;
- }
-
- public Boolean getAuthenticated()
- {
- return authenticated;
- }
-
- public Boolean getRelative()
- {
- return relative;
- }
-
- public Boolean getEscapeXML()
- {
- return escapeXML;
- }
-}
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/MediaType.java
===================================================================
---
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/MediaType.java 2008-04-09
09:52:31 UTC (rev 10520)
+++
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/MediaType.java 2008-04-09
15:16:45 UTC (rev 10521)
@@ -43,6 +43,9 @@
/** . */
public static final MediaType APPLICATION_X_WWW_FORM_URLENCODED = new
MediaType(TypeDef.APPLICATION, SubtypeDef.X_WWW_FORM_URLENCODED);
+ /** . */
+ public static final MediaType MULTIPART_FORM_DATA_MEDIA_TYPE = new
MediaType(TypeDef.MULTIPART, SubtypeDef.FORM_DATA);
+
/**
* Create a media type object by parsing a media type name. The media type name format
is defined by the
* section 5.1 of the <a
href="http://tools.ietf.org/html/rfc2045#section-5.1">RFC204... but
is limited
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/SubtypeDef.java
===================================================================
---
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/SubtypeDef.java 2008-04-09
09:52:31 UTC (rev 10520)
+++
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/SubtypeDef.java 2008-04-09
15:16:45 UTC (rev 10521)
@@ -49,6 +49,9 @@
/** . */
public static final SubtypeDef X_WWW_FORM_URLENCODED = new
SubtypeDef("x-www-form-urlencoded");
+ /** . */
+ public static final SubtypeDef FORM_DATA = new SubtypeDef("form-data");
+
/**
* Returns a corresponding subtype definition for the specified subtype name.
*