[jboss-cvs] JBossAS SVN: r80664 - projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 7 10:19:32 EST 2008


Author: alesj
Date: 2008-11-07 10:19:32 -0500 (Fri, 07 Nov 2008)
New Revision: 80664

Added:
   projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/VDFConnector.java
Modified:
   projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/AbstractVDFConnector.java
Log:
Add VDFConnector interface.

Modified: projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/AbstractVDFConnector.java
===================================================================
--- projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/AbstractVDFConnector.java	2008-11-07 15:15:39 UTC (rev 80663)
+++ projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/AbstractVDFConnector.java	2008-11-07 15:19:32 UTC (rev 80664)
@@ -25,13 +25,12 @@
 
 /**
  * Abstract VDF connector.
- * It knows how to access vdf utils from ServletContext.
  *
  * @param <U> exact vdf utility type
  * @param <T> exact attribute type
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
  */
-public abstract class AbstractVDFConnector<U, T>
+public abstract class AbstractVDFConnector<U, T> implements VDFConnector<U>
 {
    private ServletContext servletContext;
    private U utility;
@@ -57,24 +56,11 @@
     */
    protected abstract String getAttributeKey();
 
-   /**
-    * Is VDF connector valid.
-    * 
-    * Normally this means that servlet context's attribute is present
-    * or some utility from attibute can be derived.
-    *
-    * @return true is connector exists, false otherwise
-    */
    public boolean isValid()
    {
       return getUtility() != null;
    }
 
-   /**
-    * Get the underlying vdf utility.
-    *
-    * @return the utility
-    */
    public U getUtility()
    {
       if (utility == null)

Copied: projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/VDFConnector.java (from rev 80663, projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/AbstractVDFConnector.java)
===================================================================
--- projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/VDFConnector.java	                        (rev 0)
+++ projects/jboss-seam-int/trunk/jbossas/src/main/java/org/jboss/seam/integration/jbossas/vdf/VDFConnector.java	2008-11-07 15:19:32 UTC (rev 80664)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., 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.seam.integration.jbossas.vdf;
+
+/**
+ * VDF connector.
+ * It knows how to access vdf utils from ServletContext.
+ *
+ * @param <U> exact vdf utility type
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface VDFConnector<U>
+{
+   /**
+    * Is VDF connector valid.
+    *
+    * Normally this means that servlet context's attribute is present
+    * or some utility from attibute can be derived.
+    *
+    * @return true if utility exists, false otherwise
+    */
+   boolean isValid();
+
+   /**
+    * Get the underlying vdf utility.
+    *
+    * @return the utility
+    */
+   U getUtility();
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list