Author: julien(a)jboss.com
Date: 2007-06-21 07:58:51 -0400 (Thu, 21 Jun 2007)
New Revision: 7502
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/ContentTypeConverter.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/PortalObjectIdConverter.java
Removed:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ContentTypeConverter.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectIdConverter.java
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
Log:
moved converters in a conversion package
Deleted:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ContentTypeConverter.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ContentTypeConverter.java 2007-06-21
10:40:41 UTC (rev 7501)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ContentTypeConverter.java 2007-06-21
11:58:51 UTC (rev 7502)
@@ -1,47 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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.core.admin.ui;
-
-import org.jboss.portal.core.model.content.ContentType;
-
-import javax.faces.convert.Converter;
-import javax.faces.convert.ConverterException;
-import javax.faces.context.FacesContext;
-import javax.faces.component.UIComponent;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class ContentTypeConverter implements Converter
-{
- public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String
string) throws ConverterException
- {
- return string == null ? null : ContentType.create(string);
- }
-
- public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object
object) throws ConverterException
- {
- return object == null ? null : object.toString();
- }
-}
Deleted:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectIdConverter.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectIdConverter.java 2007-06-21
10:40:41 UTC (rev 7501)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectIdConverter.java 2007-06-21
11:58:51 UTC (rev 7502)
@@ -1,48 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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.core.admin.ui;
-
-import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.PortalObjectPath;
-
-import javax.faces.convert.Converter;
-import javax.faces.convert.ConverterException;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class PortalObjectIdConverter implements Converter
-{
- public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String
string) throws ConverterException
- {
- return string == null ? null : PortalObjectId.parse(string,
PortalObjectPath.LEGACY_BASE64_FORMAT);
- }
-
- public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object
object) throws ConverterException
- {
- return object == null ? null :
((PortalObjectId)object).toString(PortalObjectPath.LEGACY_BASE64_FORMAT);
- }
-}
Copied:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/ContentTypeConverter.java
(from rev 7501,
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ContentTypeConverter.java)
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/ContentTypeConverter.java
(rev 0)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/ContentTypeConverter.java 2007-06-21
11:58:51 UTC (rev 7502)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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.core.admin.ui.conversion;
+
+import org.jboss.portal.core.model.content.ContentType;
+
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.context.FacesContext;
+import javax.faces.component.UIComponent;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ContentTypeConverter implements Converter
+{
+ public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String
string) throws ConverterException
+ {
+ return string == null ? null : ContentType.create(string);
+ }
+
+ public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object
object) throws ConverterException
+ {
+ return object == null ? null : object.toString();
+ }
+}
Copied:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/PortalObjectIdConverter.java
(from rev 7501,
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectIdConverter.java)
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/PortalObjectIdConverter.java
(rev 0)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/conversion/PortalObjectIdConverter.java 2007-06-21
11:58:51 UTC (rev 7502)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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.core.admin.ui.conversion;
+
+import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.PortalObjectPath;
+
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortalObjectIdConverter implements Converter
+{
+ public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String
string) throws ConverterException
+ {
+ return string == null ? null : PortalObjectId.parse(string,
PortalObjectPath.LEGACY_BASE64_FORMAT);
+ }
+
+ public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object
object) throws ConverterException
+ {
+ return object == null ? null :
((PortalObjectId)object).toString(PortalObjectPath.LEGACY_BASE64_FORMAT);
+ }
+}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-21
10:40:41 UTC (rev 7501)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-21
11:58:51 UTC (rev 7502)
@@ -34,12 +34,12 @@
<converter>
<converter-for-class>org.jboss.portal.core.model.content.ContentType</converter-for-class>
-
<converter-class>org.jboss.portal.core.admin.ui.ContentTypeConverter</converter-class>
+
<converter-class>org.jboss.portal.core.admin.ui.conversion.ContentTypeConverter</converter-class>
</converter>
<converter>
<converter-for-class>org.jboss.portal.core.model.portal.PortalObjectId</converter-for-class>
-
<converter-class>org.jboss.portal.core.admin.ui.PortalObjectIdConverter</converter-class>
+
<converter-class>org.jboss.portal.core.admin.ui.conversion.PortalObjectIdConverter</converter-class>
</converter>
<!-- The portal object manager bean -->