Author: julien(a)jboss.com
Date: 2007-03-24 06:27:17 -0400 (Sat, 24 Mar 2007)
New Revision: 6816
Added:
trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContentProvider.java
Log:
added NullContentProvider
Added:
trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContentProvider.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContentProvider.java
(rev 0)
+++
trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContentProvider.java 2007-03-24
10:27:17 UTC (rev 6816)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * 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.test.core.model.content;
+
+import org.jboss.portal.core.model.content.ContentProvider;
+import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.model.content.spi.handler.ContentHandler;
+import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet;
+import org.jboss.portal.common.util.LocalizedString;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class NullContentProvider implements ContentProvider
+{
+
+ /** . */
+ private final ContentType contentType;
+
+ /** . */
+ private final NullContentHandler handler;
+
+ public NullContentProvider(ContentType contentType)
+ {
+ this.contentType = contentType;
+ this.handler = new NullContentHandler();
+ }
+
+ public ContentType getContentType()
+ {
+ return contentType;
+ }
+
+ public LocalizedString getDisplayName()
+ {
+ return null;
+ }
+
+ public LocalizedString getDescription()
+ {
+ return null;
+ }
+
+ public ContentHandler getHandler()
+ {
+ return handler;
+ }
+
+ public ContentPortlet getPortletInfo()
+ {
+ return null;
+ }
+}