[jboss-cvs] JBossAS SVN: r102641 - projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Mar 19 17:33:26 EDT 2010


Author: alesj
Date: 2010-03-19 17:33:26 -0400 (Fri, 19 Mar 2010)
New Revision: 102641

Added:
   projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/HibernateScanningPlugin.java
   projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/HibernateScanningPluginFactory.java
Log:
Hib plugin and its factory.

Copied: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/HibernateScanningPlugin.java (from rev 102640, projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/ScannerImpl.java)
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/HibernateScanningPlugin.java	                        (rev 0)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/HibernateScanningPlugin.java	2010-03-19 21:33:26 UTC (rev 102641)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.scanning.hibernate;
+
+import org.jboss.classloading.spi.visitor.ResourceContext;
+import org.jboss.classloading.spi.visitor.ResourceFilter;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.scanning.plugins.AbstractScanningPlugin;
+
+import org.hibernate.ejb.packaging.Scanner;
+
+/**
+ * Hibernate's scanning plugin.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class HibernateScanningPlugin extends AbstractScanningPlugin<ScannerImpl, Scanner>
+{
+   /** The scanner */
+   private final ScannerImpl scanner;
+
+   public HibernateScanningPlugin(DeploymentUnit unit)
+   {
+      this.scanner = new ScannerImpl(unit);
+   }
+
+   protected ScannerImpl doCreateHandle()
+   {
+      return scanner;
+   }
+
+   public Class<Scanner> getHandleInterface()
+   {
+      return Scanner.class;
+   }
+
+   public ResourceFilter getFilter()
+   {
+      return null; // TODO
+   }
+
+   public void visit(ResourceContext resource)
+   {
+      // TODO
+   }
+}
\ No newline at end of file

Added: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/HibernateScanningPluginFactory.java
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/HibernateScanningPluginFactory.java	                        (rev 0)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/HibernateScanningPluginFactory.java	2010-03-19 21:33:26 UTC (rev 102641)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.scanning.hibernate;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.scanning.plugins.DeploymentScanningPluginFactory;
+import org.jboss.scanning.spi.ScanningPlugin;
+
+import org.hibernate.ejb.packaging.Scanner;
+
+/**
+ * Hibernate's scanning plugin factory.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class HibernateScanningPluginFactory implements DeploymentScanningPluginFactory<ScannerImpl, Scanner>
+{
+   public ScanningPlugin<ScannerImpl, Scanner> create(DeploymentUnit unit)
+   {
+      return new HibernateScanningPlugin(unit);
+   }
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list