[jboss-svn-commits] JBL Code SVN: r6112 - labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Sep 8 08:42:35 EDT 2006


Author: wrzep
Date: 2006-09-08 08:42:32 -0400 (Fri, 08 Sep 2006)
New Revision: 6112

Added:
   labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/PackagedForDownloadPlugin.java
Log:
JBLAB-756
Packaged for download plugin.

Pawel


Added: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/PackagedForDownloadPlugin.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/PackagedForDownloadPlugin.java	2006-09-08 11:03:09 UTC (rev 6111)
+++ labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/plugins/PackagedForDownloadPlugin.java	2006-09-08 12:42:32 UTC (rev 6112)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.forge.status.plugins;
+
+import org.jboss.forge.common.projects.permissions.NullPermissionsChecker;
+import org.jboss.portal.common.context.DelegateContext;
+
+
+/**
+* @author Pawel Wrzeszcz
+*/
+
+public class PackagedForDownloadPlugin extends Plugin {
+
+	@Override
+	public long getValue(String projectId) {
+		
+		DelegateContext ds =
+			projects.getDownloadsContext(new NullPermissionsChecker(),
+										projectId, "");
+		
+		return (ds == null ? 0 : 1);
+		
+	}
+	
+	
+}




More information about the jboss-svn-commits mailing list