portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shins...@apache.org
Subject svn commit: r499006 [2/2] - in /portals/jetspeed-2/trunk: ./ applications/j2-admin/ applications/j2-admin/src/java/org/apache/jetspeed/portlets/rpad/ applications/j2-admin/src/java/org/apache/jetspeed/portlets/rpad/portlet/ applications/j2-admin/src/ja...
Date Tue, 23 Jan 2007 12:41:39 GMT
Added: portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/rpad/simple/SimpleRepository.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/rpad/simple/SimpleRepository.java?view=auto&rev=499006
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/rpad/simple/SimpleRepository.java
(added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/rpad/simple/SimpleRepository.java
Tue Jan 23 04:41:36 2007
@@ -0,0 +1,226 @@
+/*
+ * Copyright 2007 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.portlets.rpad.simple;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.apache.jetspeed.portlets.rpad.PortletApplication;
+import org.apache.jetspeed.portlets.rpad.Repository;
+import org.xml.sax.InputSource;
+
+public class SimpleRepository implements Repository
+{
+    /**
+     * Logger for this class
+     */
+    private static final Log log = LogFactory.getLog(SimpleRepository.class);
+
+    private String name;
+
+    private String configPath;
+
+    private List portletApplications;
+
+    private boolean available;
+
+    public SimpleRepository()
+    {
+        available = false;
+    }
+
+    public void init()
+    {
+        if (log.isDebugEnabled())
+        {
+            log.debug("Loading a repository: " + configPath);
+        }
+
+        if (configPath == null)
+        {
+            throw new IllegalStateException("The configuration path is null.");
+        }
+        //load config
+        try
+        {
+            InputSource inputSource = getInputSource(configPath);
+            if (inputSource == null)
+            {
+                log.error("Failed to load: " + configPath);
+                return;
+            }
+            SAXParserFactory spfactory = SAXParserFactory.newInstance();
+            SAXParser parser = spfactory.newSAXParser();
+            SimpleConfigHandler repoConfigHandler = new SimpleConfigHandler();
+            parser.parse(inputSource, repoConfigHandler);
+            portletApplications = repoConfigHandler.getPortletApplications();
+            if (portletApplications == null)
+            {
+                if (log.isDebugEnabled())
+                {
+                    log.debug("No portlet application.");
+                }
+                portletApplications = new ArrayList();
+            }
+            available = true;
+        }
+        catch (Exception e)
+        {
+            log.error("Could not load a repository.", e);
+            portletApplications = new ArrayList();
+            available = false;
+        }
+    }
+
+    protected InputSource getInputSource(String path)
+    {
+        if (path.startsWith("http:") || path.startsWith("https:"))
+        {
+            try
+            {
+                URL url = new URL(path);
+                return new InputSource(url.openStream());
+            }
+            catch (MalformedURLException e)
+            {
+                log.error("Wrong url: " + path, e);
+            }
+            catch (IOException e)
+            {
+                log.error("Could not load " + path, e);
+            }
+        }
+        else if (path.startsWith("file:"))
+        {
+            try
+            {
+                return new InputSource(new FileInputStream(new File(path
+                        .substring(5))));
+            }
+            catch (FileNotFoundException e)
+            {
+                log.error("Could not load " + path, e);
+            }
+        }
+        return null;
+    }
+
+    public PortletApplication getPortletApplication(String groupId,
+            String artifactId, String version, String packaging)
+    {
+        if (groupId != null && artifactId != null && version != null
+                && packaging != null)
+        {
+            Iterator ite = portletApplications.iterator();
+            while (ite.hasNext())
+            {
+                PortletApplication portletApp = (PortletApplication) ite.next();
+                if (groupId.equals(portletApp.getGroupId())
+                        && artifactId.equals(portletApp.getArtifactId())
+                        && version.equals(portletApp.getVersion())
+                        && packaging.equals(portletApp.getPackaging()))
+                {
+                    return portletApp;
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @return the configPath
+     */
+    public String getConfigPath()
+    {
+        return configPath;
+    }
+
+    /**
+     * @param configPath the configPath to set
+     */
+    public void setConfigPath(String configPath)
+    {
+        this.configPath = configPath;
+    }
+
+    /**
+     * @return the portletApplications
+     */
+    public List getPortletApplications()
+    {
+        return portletApplications;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public String toXMLString()
+    {
+        return "  <repository>\n" //
+                + "    <name>"
+                + getName()
+                + "</name>\n" //
+                + "    <class name=\""
+                + "org.apache.jetspeed.portlets.rpad.simple.SimpleRepository"
+                + "\"/>\n" //
+                + "    <property name=\"configPath\">"
+                + getConfigPath()
+                + "</property>\n" //
+                + "  </repository>\n";
+    }
+
+    /**
+     * @return the available
+     */
+    public boolean isAvailable()
+    {
+        return available;
+    }
+
+    /**
+     * @param available the available to set
+     */
+    public void setAvailable(boolean available)
+    {
+        this.available = available;
+    }
+}

Propchange: portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/rpad/simple/SimpleRepository.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/faces-config.xml?view=diff&rev=499006&r1=499005&r2=499006
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/faces-config.xml (original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/faces-config.xml Tue
Jan 23 04:41:36 2007
@@ -28,6 +28,7 @@
       <supported-locale>de</supported-locale>
       <supported-locale>fr</supported-locale>
       <supported-locale>es</supported-locale>
+      <supported-locale>ja</supported-locale>
     </locale-config>
   </application>
 
@@ -47,6 +48,31 @@
     </navigation-case>
   </navigation-rule>
 
+  <!-- RPAD -->
+  <navigation-rule>
+    <from-view-id>*</from-view-id>
+    <navigation-case>
+      <from-outcome>deployer_displayPortlets</from-outcome>
+      <to-view-id>/WEB-INF/view/deployer/displayPortlets.jsp</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+  
+  <navigation-rule>
+    <from-view-id>*</from-view-id>
+    <navigation-case>
+      <from-outcome>deployer_displayRepositories</from-outcome>
+      <to-view-id>/WEB-INF/view/deployer/displayRepositories.jsp</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+  
+  <navigation-rule>
+    <from-view-id>*</from-view-id>
+    <navigation-case>
+      <from-outcome>deployer_editRepository</from-outcome>
+      <to-view-id>/WEB-INF/view/deployer/editRepository.jsp</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
   <managed-bean>
     <managed-bean-name>tableData</managed-bean-name>
     <managed-bean-class>org.apache.jetspeed.portlets.site.beans.TableData</managed-bean-class>
@@ -82,6 +108,35 @@
     <managed-bean-name>criterion</managed-bean-name>
     <managed-bean-class>org.apache.jetspeed.portlets.profiler.ProfileCriterionForm</managed-bean-class>
     <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+
+  <!-- RPAD -->
+  <managed-bean>
+    <managed-bean-name>deployer_displayPortlets</managed-bean-name>
+    <managed-bean-class>org.apache.jetspeed.portlets.rpad.portlet.web.deployer.DisplayPortletsPage</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+    <managed-property>
+      <property-name>portletDeployer</property-name>
+      <value>#{portletDeployer}</value>
+    </managed-property>
+  </managed-bean>
+
+  <managed-bean>
+    <managed-bean-name>deployer_displayRepositories</managed-bean-name>
+    <managed-bean-class>org.apache.jetspeed.portlets.rpad.portlet.web.deployer.DisplayRepositoriesPage</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+
+  <managed-bean>
+    <managed-bean-name>deployer_editRepository</managed-bean-name>
+    <managed-bean-class>org.apache.jetspeed.portlets.rpad.portlet.web.deployer.EditRepositoryPage</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+
+  <managed-bean>
+    <managed-bean-name>portletDeployer</managed-bean-name>
+    <managed-bean-class>org.apache.jetspeed.portlets.rpad.portlet.deployer.impl.JetspeedPortletDeployer</managed-bean-class>
+    <managed-bean-scope>application</managed-bean-scope>
   </managed-bean>
 
 </faces-config>

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml?view=diff&rev=499006&r1=499005&r2=499006
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/portlet.xml Tue Jan
23 04:41:36 2007
@@ -1477,6 +1477,42 @@
         </preference>                        
     </portlet-preferences>
 </portlet>    
-                 
+
+  <portlet>
+    <description>Remote Portlet Application Deployer for Jetspeed.</description>
+    <portlet-name>RPADPortlet</portlet-name>
+    <display-name>Remote Portlet Application Deployer</display-name>
+    <portlet-class>org.apache.portals.bridges.portletfilter.FilterPortlet</portlet-class>
+    <init-param>
+      <name>portlet-class</name>
+      <value>org.apache.portals.bridges.jsf.FacesPortlet</value>
+    </init-param>
+    <init-param>
+      <name>portlet-filters</name>
+      <value>org.apache.jetspeed.portlets.rpad.portlet.RPADPortletFilter</value>
+    </init-param>
+    <init-param>
+      <name>ViewPage</name>
+      <value>/WEB-INF/view/deployer/displayPortlets.jsp</value>
+    </init-param>
+    <init-param>
+      <name>EditPage</name>
+      <value>/WEB-INF/view/deployer/displayRepositories.jsp</value>
+    </init-param>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>VIEW</portlet-mode>
+      <portlet-mode>EDIT</portlet-mode>
+    </supports>
+    <supported-locale>en</supported-locale>
+    <supported-locale>ja</supported-locale>
+    <!-- resource-bundle></resource-bundle -->
+    <portlet-info>
+      <title>RPAD</title>
+      <short-title>RPAD</short-title>
+      <keywords>RPAD,Portlet Repository</keywords>
+    </portlet-info>
+  </portlet>
+
 </portlet-app>
 

Added: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/rpad-config.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/rpad-config.xml?view=auto&rev=499006
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/rpad-config.xml (added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/rpad-config.xml Tue
Jan 23 04:41:36 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2007 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<repositories>
+  <repository>
+    <name>PALab</name>
+    <class name="org.apache.jetspeed.portlets.rpad.simple.SimpleRepository"/>
+    <property name="configPath">http://pal.sourceforge.jp/portlet-repository.xml</property>
+  </repository>
+</repositories>

Propchange: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/rpad-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayPortlets.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayPortlets.jsp?view=auto&rev=499006
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayPortlets.jsp
(added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayPortlets.jsp
Tue Jan 23 04:41:36 2007
@@ -0,0 +1,117 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+  <h:form>
+
+    <t:div>
+      <h:outputText value="Repository:"/>
+      <h:selectOneMenu value="#{deployer_displayPortlets.repositoryName}">
+        <f:selectItems value="#{deployer_displayPortlets.repositoryNames}"/>
+      </h:selectOneMenu>
+      <h:commandButton value="Select"
+        action="#{deployer_displayPortlets.doSearch}"/>
+      <h:commandButton value="Update Repository"
+        action="#{deployer_displayPortlets.jumpUpdateRepository}" 
+        rendered="false" immediate="true"/>
+      <h:commandButton value="Refresh"
+        action="#{deployer_displayPortlets.doRefresh}" 
+        immediate="true"/>
+    </t:div>
+
+    <t:div rendered="false">
+      <h:outputText value="Search:"/>
+      <h:inputText value="#{deployer_displayPortlets.search}" />
+      <h:commandButton value="Search"
+        action="#{deployer_displayPortlets.doSearch}"/>
+    </t:div>
+
+    <h:messages styleClass="portlet-msg-success" 
+      errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+      warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+
+    <t:dataTable id="portletTable" var="portlet"
+      value="#{deployer_displayPortlets.portlets}"
+      headerClass="portlet-section-header"
+      rowClasses="portlet-section-body,portlet-section-alternate"
+      style="width:100%" rows="#{deployer_displayPortlets.pageSize}">
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="Group ID" />
+        </f:facet>
+        <h:outputText value="#{portlet.groupId}" />
+      </h:column>
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="Artifact ID" />
+        </f:facet>
+        <h:outputText value="#{portlet.artifactId}" />
+      </h:column>
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="Name" />
+        </f:facet>
+        <h:outputText value="#{portlet.name}" />
+      </h:column>
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="Version" />
+        </f:facet>
+        <h:outputText value="#{portlet.version}" />
+      </h:column>
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="Type" />
+        </f:facet>
+        <h:outputText value="#{portlet.packaging}" />
+      </h:column>
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="Action" />
+        </f:facet>
+        <h:commandLink action="#{deployer_displayPortlets.doDeploy}"
+          rendered="#{deployer_displayPortlets.deployable}">
+          <h:outputText value="Deploy" />
+        </h:commandLink>
+        <h:outputText value="Deploy" rendered="#{!deployer_displayPortlets.deployable}"/>
+      </h:column>
+    </t:dataTable>
+    <h:panelGrid columns="1" styleClass="portlet-section-footer"
+      style="width:100%">
+      <t:dataScroller for="portletTable" fastStep="10" pageCountVar="pageCount"
+        pageIndexVar="pageIndex" paginator="true" paginatorMaxPages="9">
+        <f:facet name="first">
+          <t:outputText value="First" rendered="#{pageIndex>1}"/>
+        </f:facet>
+        <f:facet name="last">
+          <t:outputText value="Last" rendered="#{pageIndex<pageCount}"/>
+        </f:facet>
+        <f:facet name="previous">
+          <t:outputText value="Previous" rendered="#{pageIndex>1}"/>
+        </f:facet>
+        <f:facet name="next">
+          <t:outputText value="Next" rendered="#{pageIndex<pageCount}"/>
+        </f:facet>
+      </t:dataScroller>
+      <t:dataScroller for="portletTable" rowsCountVar="rowsCount"
+        displayedRowsCountVar="displayedRowsCountVar"
+        firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex"
+        pageCountVar="pageCount" immediate="true" pageIndexVar="pageIndex">
+        <h:outputFormat value="{0} found ({4} / {5})" rendered="#{rowsCount!=0}">
+          <f:param value="#{rowsCount}" />
+          <f:param value="#{displayedRowsCountVar}" />
+          <f:param value="#{firstRowIndex}" />
+          <f:param value="#{lastRowIndex}" />
+          <f:param value="#{pageIndex}" />
+          <f:param value="#{pageCount}" />
+        </h:outputFormat>
+        <h:outputText value="No portlet."
+          rendered="#{rowsCount==0}" />
+      </t:dataScroller>
+    </h:panelGrid>
+        
+  </h:form>
+</f:view>

Propchange: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayPortlets.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayRepositories.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayRepositories.jsp?view=auto&rev=499006
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayRepositories.jsp
(added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayRepositories.jsp
Tue Jan 23 04:41:36 2007
@@ -0,0 +1,90 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+  <h:form>
+
+    <t:div>
+      <h:commandButton value="Add Repository"
+        action="#{deployer_displayRepositories.doAddRepository}"/>
+      <h:commandButton value="Reload Repositories"
+        action="#{deployer_displayRepositories.doReloadRepositories}"/>
+      <h:commandButton value="Deploy Portlet"
+        action="#{deployer_displayRepositories.jumpDisplayPortlets}" 
+        rendered="false" immediate="true"/>
+    </t:div>
+
+    <h:messages styleClass="portlet-msg-success" 
+      errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+      warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+    <t:dataTable id="repositoryTable" var="repository"
+      value="#{deployer_displayRepositories.repositories}"
+      headerClass="portlet-section-header"
+      rowClasses="portlet-section-body,portlet-section-alternate"
+      style="width:100%" rows="#{deployer_displayRepositories.pageSize}">
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="Name" />
+        </f:facet>
+        <h:outputText value="#{repository.name}" />
+      </h:column>
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="State" />
+        </f:facet>
+        <h:outputText value="Active" rendered="#{repository.available}"/>
+        <h:outputText value="Inactive" rendered="#{!repository.available}"/>
+      </h:column>
+      <h:column>
+        <f:facet name="header">
+          <h:outputText value="Action" />
+        </f:facet>
+        <h:panelGrid columns="2">
+          <h:commandLink action="#{deployer_displayRepositories.doEditRepository}">
+            <h:outputText value="Edit" />
+          </h:commandLink>
+          <h:commandLink action="#{deployer_displayRepositories.doDeleteRepository}">
+            <h:outputText value="Delete" />
+          </h:commandLink>
+        </h:panelGrid>
+      </h:column>
+    </t:dataTable>
+    <h:panelGrid columns="1" styleClass="portlet-section-footer"
+      style="width:100%">
+      <t:dataScroller for="repositoryTable" fastStep="10" pageCountVar="pageCount"
+        pageIndexVar="pageIndex" paginator="true" paginatorMaxPages="9">
+        <f:facet name="first">
+          <t:outputText value="First" rendered="#{pageIndex>1}"/>
+        </f:facet>
+        <f:facet name="last">
+          <t:outputText value="Last" rendered="#{pageIndex<pageCount}"/>
+        </f:facet>
+        <f:facet name="previous">
+          <t:outputText value="Previous" rendered="#{pageIndex>1}"/>
+        </f:facet>
+        <f:facet name="next">
+          <t:outputText value="Next" rendered="#{pageIndex<pageCount}"/>
+        </f:facet>
+      </t:dataScroller>
+      <t:dataScroller for="repositoryTable" rowsCountVar="rowsCount"
+        displayedRowsCountVar="displayedRowsCountVar"
+        firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex"
+        pageCountVar="pageCount" immediate="true" pageIndexVar="pageIndex">
+        <h:outputFormat value="{0} found ({4} / {5})" rendered="#{rowsCount!=0}">
+          <f:param value="#{rowsCount}" />
+          <f:param value="#{displayedRowsCountVar}" />
+          <f:param value="#{firstRowIndex}" />
+          <f:param value="#{lastRowIndex}" />
+          <f:param value="#{pageIndex}" />
+          <f:param value="#{pageCount}" />
+        </h:outputFormat>
+        <h:outputText value="No portlet."
+          rendered="#{rowsCount==0}" />
+      </t:dataScroller>
+    </h:panelGrid>
+        
+  </h:form>
+</f:view>

Propchange: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/displayRepositories.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/editRepository.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/editRepository.jsp?view=auto&rev=499006
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/editRepository.jsp
(added)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/editRepository.jsp
Tue Jan 23 04:41:36 2007
@@ -0,0 +1,48 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<f:view>
+  <h:form>
+
+    <t:div>
+      <h:commandButton value="Back to Repository List"
+        action="#{deployer_editRepository.jumpDisplayRepositories}"/>
+    </t:div>
+
+    <h:messages styleClass="portlet-msg-success" 
+      errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+      warnClass="portlet-msg-alert" infoClass="portlet-msg-info" />
+
+    <t:div rendered="false">
+      <h:selectOneMenu value="#{deployer_editRepository.repositoryClassName}">
+        <f:selectItems value="#{deployer_editRepository.repositoryClassNames}"/>
+      </h:selectOneMenu>
+    </t:div>
+
+    <t:div>
+      <h:panelGrid columns="2">
+      
+        <h:outputLabel for="name">
+          <h:outputText value="Name:"/>
+        </h:outputLabel>
+        <h:inputText id="name" value="#{deployer_editRepository.name}"/>
+      
+        <h:outputLabel for="path">
+          <h:outputText value="Configuration Path:"/>
+        </h:outputLabel>
+        <h:inputText id="path" value="#{deployer_editRepository.path}"/>
+
+      </h:panelGrid>
+    </t:div>
+
+    <t:div>
+      <h:commandButton action="#{deployer_editRepository.doCreateRepository}" value="Create"
+        rendered="#{deployer_editRepository.newRepository}"/>
+      <h:commandButton action="#{deployer_editRepository.doUpdateRepository}" value="Update"
+        rendered="#{!deployer_editRepository.newRepository}"/>
+    </t:div>
+        
+  </h:form>
+</f:view>

Propchange: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/deployer/editRepository.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: portals/jetspeed-2/trunk/design-docs/src/rpad/RPAD.txt
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/design-docs/src/rpad/RPAD.txt?view=auto&rev=499006
==============================================================================
--- portals/jetspeed-2/trunk/design-docs/src/rpad/RPAD.txt (added)
+++ portals/jetspeed-2/trunk/design-docs/src/rpad/RPAD.txt Tue Jan 23 04:41:36 2007
@@ -0,0 +1,104 @@
+Remote Portlet Application Deployer
+
+Overview
+--------
+
+Remote Portlet Application Deployer(RPAD) deploys a portlet from remote
+portlet repositories into a Portal server, such as Jetspeed2, directly. RPAD
+consists of 2 parts: RPAD API and RPAD Portlet. RPAD API defines the
+programing interface to access to remote portlet repositories. RPAD Portlet
+provides JSR 168 compliant portlet to deploy a target portlet from remote
+repositories.
+
++---------------------------+
+|   Portal Server(J2,...)   |
++---------------------------+
+|       RPAD Portlet        |
++---------------------------+
+|         RPAD API          |
++---------------------------+
+             A Download
+             V Access
++---------------------------+
+| Remote Portlet Repository |
++---------------------------+
+| Portlet | Portlet | ...   |
++---------------------------+
+
+
+Design
+------
+
+        +-----------------------------------+
+        |           RPAD Portlet            |
+        | (RPADPortletFilter + JSF Portlet) |
+        +-----------------------------------+
+                       V Call RPAD API
++---------------------------------------------------+
+|                RepositoryManager                  |
++---------------------------------------------------+
+         V                      V                V
++------------------+ +----------------------+ +-----+
+| SimpleRepository | | WebServiceRepository | | ... |
++------------------+ |        (TBD)         | +-----+
+                     +----------------------+ 
+
+
+Class Description
+-----------------
+
+ RPAD API:
+
+  Class org.apache.jetspeed.portlets.rpad.RepositoryManager
+
+   RepositoryManager manages Repository instances. Portal, such as Jetspeed2,
+   calls methods of this class to access remote portlet repositories.
+
+  Interface org.apache.jetspeed.portlets.rpad.Repository
+
+   RPAD supports a variety of kinds of portlet repositories. A portlet
+   repository needs to implement this interface. Repository manages
+   PortletApplication instances for a remote portlet repository.
+   Portal can access portlet information in a remote portlet repository via
+   this class.
+
+  Class org.apache.jetspeed.portlets.rpad.PortletApplication
+
+   This class has properties of a portlet application, such as a portlet name,
+   url to download war file.
+
+  Class org.apache.jetspeed.portlets.rpad.simple.SimpleRepository
+
+   SimpleRepository is a file-based repository. If a portlet provider puts
+   a repository site descriptor for a remote portlet repository, using
+   SimpleRepository, the provider delivers portlets to a Portal server.
+   The syntax of the repository site descriptor is under discussion with
+   PRP(https://prp.dev.java.net/). We will define it by the first week of 
+   Feb.
+
+ RPAD Portlet:
+
+  The current implementation is JSF-based portlet.
+
+  Class org.apache.jetspeed.portlets.rpad.portlet.RPADPortletFilter
+
+   RPADPortletFilter initializes RepositoryManager instance. 
+
+  Interface org.apache.jetspeed.portlets.rpad.portlet.deployer.PortletDeployer
+
+   RPAD Portlet calls PortletDeployer#deploy(PortletApplication) to deploy
+   the target portlet into your Portal. If you implements PortletDeployer
+   class for your Portal, RPAD works on your Portal.
+
+  Class
+   org.apache.jetspeed.portlets.rpad.portlet.deployer.impl.JetspeedPortletDeployer
+
+    This class is PortletDeployer implementation for Jetspeed2.
+
+TODO
+----
+
+ - Manage a portlet version in J2
+ - Store portlet information to DB, not memory
+ - Move RPAD into under Apache Portals sub-project for other portals to use RPAD
+

Propchange: portals/jetspeed-2/trunk/design-docs/src/rpad/RPAD.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/trunk/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/pom.xml?view=diff&rev=499006&r1=499005&r2=499006
==============================================================================
--- portals/jetspeed-2/trunk/pom.xml (original)
+++ portals/jetspeed-2/trunk/pom.xml Tue Jan 23 04:41:36 2007
@@ -188,6 +188,7 @@
         <org.apache.portals.bridges.perl.version>1.0</org.apache.portals.bridges.perl.version>
         <org.apache.portals.bridges.php.version>1.0</org.apache.portals.bridges.php.version>
         <org.apache.portals.bridges.velocity.version>1.0.1-dev</org.apache.portals.bridges.velocity.version>
+        <org.apache.portals.bridges.portletfilter.version>1.0.1-dev</org.apache.portals.bridges.portletfilter.version>
         <oro.version>2.0.7</oro.version>
         <portlet-api.version>1.0</portlet-api.version>
         <regexp.version>1.2</regexp.version>
@@ -889,6 +890,11 @@
                 <groupId>org.apache.portals.bridges</groupId>
                 <artifactId>portals-bridges-jsf</artifactId>
                 <version>${org.apache.portals.bridges.jsf.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.portals.bridges</groupId>
+                <artifactId>portals-bridges-portletfilter</artifactId>
+                <version>${org.apache.portals.bridges.portletfilter.version}</version>
             </dependency>
 
             <!-- Portals Bridges Applications -->

Modified: portals/jetspeed-2/trunk/project.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/project.properties?view=diff&rev=499006&r1=499005&r2=499006
==============================================================================
--- portals/jetspeed-2/trunk/project.properties (original)
+++ portals/jetspeed-2/trunk/project.properties Tue Jan 23 04:41:36 2007
@@ -29,6 +29,7 @@
 portals.bridges.struts.version=1.2.7-1.0
 portals.bridges.jpetstore.version=1.0
 portals.bridges.velocity.version=1.0.1-dev
+portals.bridges.portletfilter.version=1.0.1-dev
 commons.logging.version=1.0.3
 spring.version=2.0
 spring.modules.version=0.6

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/pages/Administrative/folder.metadata
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/pages/Administrative/folder.metadata?view=diff&rev=499006&r1=499005&r2=499006
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/pages/Administrative/folder.metadata (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/pages/Administrative/folder.metadata Tue Jan
23 04:41:36 2007
@@ -15,6 +15,7 @@
   <document-order>site.psml</document-order>
   <document-order>palm.psml</document-order>
   <document-order>profiler.psml</document-order>
+  <document-order>rpad.psml</document-order>
 
   <menu name="page-navigations">
     <separator>

Added: portals/jetspeed-2/trunk/src/webapp/WEB-INF/pages/Administrative/rpad.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/pages/Administrative/rpad.psml?view=auto&rev=499006
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/pages/Administrative/rpad.psml (added)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/pages/Administrative/rpad.psml Tue Jan 23
04:41:36 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2007 The Apache Software Foundation
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+    http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<page id="rpad">
+  <defaults skin="blue" layout-decorator="tigris" portlet-decorator="tigris"/>
+  <title>RPAD</title>
+  <metadata name="short-title" xml:lang="es">RPAD</metadata>
+
+  <fragment id="rpad-layout" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+    <fragment id="rpad-app" type="portlet" name="j2-admin::RPADPortlet">
+      <property name="row" value="0" layout="OneColumn"/>
+      <property name="column" value="0" layout="OneColumn"/>
+    </fragment>
+  </fragment>
+
+</page>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message