Author: unibrew Date: 2005-11-04 12:54:21 -0500 (Fri, 04 Nov 2005) New Revision: 1513 Added: trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/DownloadCounter.java trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/ trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/DownloadCounterPortlet.java trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/DownloadCounterTools.java trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-app.xml trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-portlet.xml trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-service.xml trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-web.xml trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet-instances.xml trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet.xml trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/tld/portlet.tld Modified: trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/FileAccessFilter.java trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/web.xml Log: [JBLAB-263] DownloadCounter sources. Added: trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/DownloadCounter.java =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/DownloadCounter.java 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/DownloadCounter.java 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,163 @@ + + /* + * 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.fileaccess; + +import java.io.File; +import java.io.InputStream; + +import org.apache.xerces.parsers.DOMParser; +import org.jboss.forge.common.XmlTools; +import org.jboss.forge.common.projects.DomToXmlTransformer; +import org.jboss.forge.common.projects.ProjectsHelper; +import org.jboss.shotoku.ContentManager; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; + +public class DownloadCounter { + + // Name the main xml file containing download counter data. + public static final String DOWNLOADCOUNTER_FILE="counters.xml"; + + // Name of tag in counters.xml containing counter value. + public static final String VALUE = "value"; + + // Name of tag in counters.xml containing counter link. + public static final String LINK = "link"; + + // Name of tag in counters.xml containing counter. + public static final String COUNTER = "counter"; + + synchronized public static void increment (String link,ContentManager contentManager) { + if (link==null) { + return; + } + String portalName = resolvePortalName(link); + + link = File.separator + link; + + String pathToCountersXml = File.separator + portalName + File.separator + + ProjectsHelper.MEMBERS_DIR + File.separator + DOWNLOADCOUNTER_FILE; + + try { + DOMParser parser = new DOMParser(); + + // Getting stream of counters.xml file. + InputStream is = contentManager.getNode(pathToCountersXml).getContentInputStream(); + parser.parse(new InputSource(is)); + Document doc = parser.getDocument(); + NodeList nodes = doc.getDocumentElement().getChildNodes(); + + // This variable will reference Node containing counter for searched link. + Node linkNode = findLinkNode (nodes, link); + + // If the linkNode variable isn't NULL it means that we count this link and should increment it. + if (linkNode!=null) { + NodeList linkNodeChildren=linkNode.getChildNodes(); + Node tempNode = null; + for (int i=0;i<linkNodeChildren.getLength();i++) { + tempNode = linkNodeChildren.item(i); + if (tempNode.getNodeType()== Node.ELEMENT_NODE){ + + // Searching for VALUE node to change its value. + + if (tempNode.getNodeName().equals(VALUE)) { + String nodeTextCnt = XmlTools.unmarshallText(tempNode); + if (nodeTextCnt!=null && !nodeTextCnt.equals("")) { + long value = 1; + try { + // Trying to get the old value from the node. + value = Long.valueOf(nodeTextCnt) + 1; + } catch (NumberFormatException e) { + System.out.println ("[DownloadCounter] Incorrect "+DOWNLOADCOUNTER_FILE+" syntax."); + e.printStackTrace(); + } + NodeList content = tempNode.getChildNodes(); + for (int j=0;j<content.getLength();j++) { + if (content.item(j).getNodeType() == Node.TEXT_NODE){ + // Setting the new node value. + content.item(j).setNodeValue(Long.toString(value)); + break; + } else { + // Removing some inapropriate content of this node. + tempNode.removeChild(content.item(j)); + } + } + } else { + // Situation when the VALUE node is empty + Node newValueText = doc.createTextNode("1"); + tempNode.appendChild(newValueText); + } + break; + } + } + } + DomToXmlTransformer xht = new DomToXmlTransformer(); + String xmlString = xht.transformNode(doc.getDocumentElement()); + // Saving the updated xml. + org.jboss.shotoku.Node xmlFile = contentManager.getNode(pathToCountersXml); + xmlFile.setContent(xmlString); + xmlFile.save ("[DownlaodCounter] Main xml descriptor file update."); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Method used to resolve portal name to which the download link aims. + * @param link + * @return + */ + private static String resolvePortalName (String link) { + return link.split(File.separator)[0]; + } + + private static Node findLinkNode (NodeList nodes, String link) { + + // Temporary variables used for parsing. + Node n=null,property=null; + + for (int i = 0; i < nodes.getLength(); i++) { + n = nodes.item(i); + if (n.getNodeType() == Node.ELEMENT_NODE) { + if (n.getNodeName().equals(COUNTER)) { + NodeList counterProps = n.getChildNodes(); + for (int j=0;j< counterProps.getLength() ; j++) { + property = counterProps.item(j); + if (property.getNodeType()== Node.ELEMENT_NODE){ + String nodeTextCnt = XmlTools.unmarshallText(property); + if (property.getNodeName().equals(LINK) && nodeTextCnt != null && nodeTextCnt.trim().equals(link)) { + return n; + } + } + } + } + } + } + return null; + } + +} Modified: trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/FileAccessFilter.java =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/FileAccessFilter.java 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/FileAccessFilter.java 2005-11-04 17:54:21 UTC (rev 1513) @@ -75,7 +75,7 @@ private ContentManager contentManager; public void init(FilterConfig conf) { - + } private void checkResource(String resource) throws Exception { @@ -94,7 +94,6 @@ || (toCheck.indexOf(DOWNLOADS_ACCESS) != -1) || (toCheck.indexOf(KOSMOS_CACHE_ACCESS) != -1) || (toCheck.indexOf(FREEZONE_ACCESS) != -1)) { - // Allowing access to images, downloads and docs } else // Not images, nor downloads - wrong request. throw new Exception(); @@ -120,7 +119,13 @@ try { // Checking if we can allow access to this resource. checkResource(requestedRes); - + + if (requestedRes.indexOf(DOWNLOADS_ACCESS)!=-1) { + // Sending the request to the DownloadCounter to increment + // counter for this link if it's one of the tracked links. + DownloadCounter.increment(requestedRes,contentManager); + } + Node requestedNode = contentManager.getNode(requestedRes); String mimeType = requestedNode.getMimeType(); Added: trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/DownloadCounterPortlet.java =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/DownloadCounterPortlet.java 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/DownloadCounterPortlet.java 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,78 @@ + + /* + * 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.fileaccess.portlet; + + +import java.io.IOException; + +import javax.portlet.PortletException; +import javax.portlet.PortletRequestDispatcher; + +import org.jboss.forge.common.ForgeHelper; +import org.jboss.forge.common.projects.ProjectsHelper; +import org.jboss.portal.common.context.DelegateContext; +import org.jboss.portal.core.servlet.jsp.PortalJsp; +import org.jboss.portlet.JBossPortlet; +import org.jboss.portlet.JBossRenderRequest; +import org.jboss.portlet.JBossRenderResponse; +import org.jboss.shotoku.ContentManager; +import org.jboss.shotoku.aop.Inject; + +/** + * @author Ryszard Kozmik + * Downlaod Counter portlet. + */ +public class DownloadCounterPortlet extends JBossPortlet { + + @Inject + private ContentManager contentManager; + + public void doView(JBossRenderRequest request, JBossRenderResponse response) + throws IOException, PortletException { + + // Getting name of the project on which the download counter is used. + //String projectId = (String)request.getAttribute("project"); + String projectId = ProjectsHelper.getSelectedProjectId(request); + + ProjectsHelper.prepareRequest(request); + response.setContentType("text/html"); + String portalName = ForgeHelper.getPortalName(request); + + DelegateContext context = null; + try { + context = DownloadCounterTools.getContext(portalName,projectId,contentManager); + // Adding content context to request for JSP file. + request.setAttribute(PortalJsp.CTX_REQUEST, context); + } catch (Exception e) { + e.printStackTrace(); + throw new PortletException(e); + } + + PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher( + ForgeHelper.createRepoAccessPath(portalName,DownloadCounterTools.getJspCmPath())); + rd.include(request, response); + } + + +} Added: trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/DownloadCounterTools.java =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/DownloadCounterTools.java 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/java/org/jboss/forge/fileaccess/portlet/DownloadCounterTools.java 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,130 @@ + + /* + * 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.fileaccess.portlet; + +import java.io.File; +import java.io.InputStream; +import java.util.Hashtable; +import java.util.Map; + +import org.apache.xerces.parsers.DOMParser; +import org.jboss.forge.common.XmlTools; +import org.jboss.forge.common.projects.ProjectsHelper; +import org.jboss.forge.fileaccess.DownloadCounter; +import org.jboss.portal.common.context.DelegateContext; +import org.jboss.shotoku.ContentManager; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; + +public class DownloadCounterTools { + + public static final String FORGE_FILE_ACCESS_DIR="file-access"; + public static final String DOWNLOADCOUNTER_JSP="normal.jsp"; + + public static DelegateContext getContext (String portalName,String projectId,ContentManager contentManager) throws Exception { + + // If the projectId is null method returns empty DelegateContext object. + if (projectId==null) { + return new DelegateContext(); + } + + String pathToCountersXml = File.separator + portalName + File.separator + + ProjectsHelper.MEMBERS_DIR + File.separator + DownloadCounter.DOWNLOADCOUNTER_FILE; + + DOMParser parser = new DOMParser(); + + // Getting stream of counters.xml file. + InputStream is = contentManager.getNode(pathToCountersXml).getContentInputStream(); + parser.parse(new InputSource(is)); + Document doc = parser.getDocument(); + NodeList nodes = doc.getDocumentElement().getChildNodes(); + + // This Map will contain links as map keys and, counter values as map values. + Map<String,String> values = getValuesFromNodes (nodes); + + // Filling the context for portlet. + DelegateContext ctx = new DelegateContext(); + for (String keyLink:values.keySet()) { + // Getting project ID from the counter + String counterProjectId = null; + if (keyLink.split(File.separator).length>=4) + counterProjectId = keyLink.split(File.separator)[3]; + if (counterProjectId!=null && counterProjectId.compareTo(projectId)==0) { + DelegateContext counter = ctx.next("counter"); + String fileName = keyLink.split(File.separator)[keyLink.split(File.separator).length-1]; + counter.put("link",fileName); + counter.put("value",values.get(keyLink)); + } + } + return ctx; + } + + /** + * Method used for pulling the links and counter values out from the + * xml file nodes to the <String,String> Map. + * @param nodes + * @return + */ + private static Map<String,String> getValuesFromNodes (NodeList nodes) { + Map<String,String> values = new Hashtable<String,String>(); + + // Temporary variables used for parsing. + Node n=null,property=null; + + // Parsing main Download Counter descriptor. + for (int i = 0; i < nodes.getLength(); i++) { + n = nodes.item(i); + if (n.getNodeType() == Node.ELEMENT_NODE) { + if (n.getNodeName().equals(DownloadCounter.COUNTER)) { + NodeList counterProps = n.getChildNodes(); + String tempLink = null; + String tempValue = null; + for (int j=0;j< counterProps.getLength() ; j++) { + property = counterProps.item(j); + if (property.getNodeType()== Node.ELEMENT_NODE){ + String nodeTextCnt = XmlTools.unmarshallText(property); + if (property.getNodeName().equals("link") && nodeTextCnt != null && !nodeTextCnt.trim().equals("")) { + tempLink = nodeTextCnt.trim(); + } else if (property.getNodeName().equals("value") && nodeTextCnt !=null && !nodeTextCnt.trim().equals("")) { + tempValue = nodeTextCnt.trim(); + } + } + } + if (tempLink!=null && tempValue!=null) { + values.put(tempLink,tempValue); + } + } + } + } + return values; + } + + + public static String getJspCmPath() { + return FORGE_FILE_ACCESS_DIR + File.separator + DOWNLOADCOUNTER_JSP; + } + +} \ No newline at end of file Added: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-app.xml =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-app.xml 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-app.xml 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,3 @@ +<jboss-app> + <app-name>counter</app-name> +</jboss-app> Property changes on: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-app.xml ___________________________________________________________________ Name: svn:executable + * Added: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-portlet.xml =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-portlet.xml 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-portlet.xml 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,6 @@ +<portlet-app> + <portlet> + <portlet-name>DownloadCounterPortlet</portlet-name> + <security></security> + </portlet> +</portlet-app> Property changes on: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-portlet.xml ___________________________________________________________________ Name: svn:executable + * Added: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-service.xml =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-service.xml 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-service.xml 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,2 @@ +<server> +</server> Property changes on: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-service.xml ___________________________________________________________________ Name: svn:executable + * Added: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-web.xml =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-web.xml 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-web.xml 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<jboss-web> +</jboss-web> Property changes on: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/jboss-web.xml ___________________________________________________________________ Name: svn:executable + * Added: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet-instances.xml =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet-instances.xml 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet-instances.xml 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,7 @@ +<?xml version="1.0" standalone="yes"?> +<instances> + <instance> + <instance-name>DownloadCounterPortletInstance</instance-name> + <component-ref>DownloadCounterPortlet</component-ref> + </instance> +</instances> Property changes on: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet-instances.xml ___________________________________________________________________ Name: svn:executable + * Added: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet.xml =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet.xml 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet.xml 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd /opt/SUNWps/dtd/portlet.xsd" version="1.0"> + <portlet> + <portlet-name>DownloadCounterPortlet</portlet-name> + <portlet-class>org.jboss.forge.fileaccess.portlet.DownloadCounterPortlet</portlet-class> + <supported-locale>en</supported-locale> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>VIEW</portlet-mode> + </supports> + <portlet-info> + <title>JBoss Download Counter Portlet</title> + </portlet-info> + </portlet> +</portlet-app> Property changes on: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:executable + * Added: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/tld/portlet.tld =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/tld/portlet.tld 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/tld/portlet.tld 2005-11-04 17:54:21 UTC (rev 1513) @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + JBoss, the OpenSource J2EE webOS + Distributable under LGPL license. + See terms of license at gnu.org. + --> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + + <tlib-version>1.0</tlib-version> + <jsp-version>1.2</jsp-version> + <short-name>portlet</short-name> + + <uri>http://java.sun.com/portlet</uri> + + <tag> + + <name>param</name> + <tag-class>org.jboss.portal.portlet.taglib.URLParameterTag</tag-class> + <body-content>empty</body-content> + + <attribute> + <name>name</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + + </attribute> + <attribute> + <name>value</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + + </attribute> + </tag> + <function> + <name>i18n</name> + <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class> + <function-signature>java.lang.String getMessage(java.lang.String)</function-signature> + </function> + + <function> + <name>out</name> + <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class> + <function-signature>java.lang.String out(java.lang.String)</function-signature> + </function> + + <function> + <name>i18nout</name> + <function-class>org.jboss.portal.core.servlet.jsp.taglib.PortalLib</function-class> + <function-signature>java.lang.String i18nOut(java.lang.String)</function-signature> + </function> + + <tag> + <name>if</name> + <tagclass>org.jboss.portal.core.servlet.jsp.taglib.IfTag</tagclass> + <attribute> + <name>ctx</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + + <tag> + <name>iterate</name> + <tagclass>org.jboss.portal.core.servlet.jsp.taglib.IterateTag</tagclass> + <attribute> + <name>ctx</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + + <tag> + <name>include</name> + <tagclass>org.jboss.portal.core.servlet.jsp.taglib.IncludeTag</tagclass> + <attribute> + <name>page</name> + <required>true</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + + <tag> + + <name>defineObjects</name> + <tag-class>org.jboss.portal.portlet.taglib.DefineObjectsTag</tag-class> + <tei-class>org.jboss.portal.portlet.taglib.DefineObjectsTagTEI</tei-class> + <body-content>empty</body-content> + + </tag> + <tag> + + <name>namespace</name> + <tag-class>org.jboss.portal.portlet.taglib.NamespaceTag</tag-class> + <body-content>empty</body-content> + + </tag> + <tag> + + <name>renderURL</name> + <tag-class>org.jboss.portal.portlet.taglib.RenderURLTag</tag-class> + <tei-class>org.jboss.portal.portlet.taglib.GenerateURLTagTEI</tei-class> + <body-content>JSP</body-content> + + <attribute> + <name>portletMode</name> + <rtexprvalue>true</rtexprvalue> + + </attribute> + <attribute> + <name>secure</name> + <rtexprvalue>true</rtexprvalue> + + </attribute> + <attribute> + <name>var</name> + <rtexprvalue>true</rtexprvalue> + + </attribute> + <attribute> + <name>windowState</name> + <rtexprvalue>true</rtexprvalue> + + </attribute> + </tag> + <tag> + + <name>actionURL</name> + <tag-class>org.jboss.portal.portlet.taglib.ActionURLTag</tag-class> + <tei-class>org.jboss.portal.portlet.taglib.GenerateURLTagTEI</tei-class> + <body-content>JSP</body-content> + + <attribute> + <name>portletMode</name> + <rtexprvalue>true</rtexprvalue> + + </attribute> + <attribute> + <name>secure</name> + <rtexprvalue>true</rtexprvalue> + + </attribute> + <attribute> + <name>var</name> + <rtexprvalue>true</rtexprvalue> + + </attribute> + <attribute> + <name>windowState</name> + <rtexprvalue>true</rtexprvalue> + + </attribute> + </tag> + +</taglib> Property changes on: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/tld/portlet.tld ___________________________________________________________________ Name: svn:executable + * Modified: trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/web.xml =================================================================== --- trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/web.xml 2005-11-04 17:52:25 UTC (rev 1512) +++ trunk/forge/portal-extensions/forge-file-access/src/web/WEB-INF/web.xml 2005-11-04 17:54:21 UTC (rev 1513) @@ -13,4 +13,14 @@ <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> </filter-mapping> -</web-app> \ No newline at end of file + <filter> + <filter-name>filesFromRepoFilter</filter-name> + <filter-class>org.jboss.forge.common.FilesFromRepoFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>filesFromRepoFilter</filter-name> + <url-pattern>/repo-access/*</url-pattern> + <dispatcher>INCLUDE</dispatcher> + </filter-mapping> +</web-app> |