portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css styles.css
Date Mon, 03 Jan 2005 08:14:33 GMT
taylor      2005/01/03 00:14:33

  Modified:    applications/gems/src/java/org/apache/portals/gems/browser
                        DatabaseBrowserPortlet.java
               portal/src/webapp/WEB-INF/decorations/layout/html/minty-blue/css
                        styles.css
               portal/src/webapp/WEB-INF/assembly jetspeed-spring.xml
               applications/security/src/webapp/WEB-INF
                        jetspeed-portlet.xml portlet.xml web.xml
               portal/src/webapp/WEB-INF/decorations/layout/html/tigris/css
                        styles.css
               applications/security/src/java/org/apache/jetspeed/portlets/security/sso
                        SSOBrowser.java
               applications/demo/src/webapp/WEB-INF portlet.xml
               portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css
                        styles.css
  Added:       applications/gems/src/java/org/apache/portals/gems/browser
                        BrowserPortlet.java
               portal/src/webapp/WEB-INF/pages/Administrative
                        sso-admin.psml
               applications/security/src/java/org/apache/jetspeed/portlets/security/resources
                        SSOResources.properties
               applications/security/src/java/org/apache/jetspeed/portlets/security/sso
                        SSODetails.java
               applications/security/src/webapp/WEB-INF/security/sso
                        edit-prefs.vm sites-view.vm sites-details.vm
               portal/src/webapp/WEB-INF/pages/Public db-browser.psml
  Removed:     applications/gems/src/java/org/apache/portals/gems/browser
                        AbstractBrowserPortlet.java
  Log:
  http://issues.apache.org/jira/browse/JS2-178
  
  Revision  Changes    Path
  1.3       +18 -2     jakarta-jetspeed-2/applications/gems/src/java/org/apache/portals/gems/browser/DatabaseBrowserPortlet.java
  
  Index: DatabaseBrowserPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/gems/src/java/org/apache/portals/gems/browser/DatabaseBrowserPortlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DatabaseBrowserPortlet.java	1 Jan 2005 00:00:45 -0000	1.2
  +++ DatabaseBrowserPortlet.java	3 Jan 2005 08:14:29 -0000	1.3
  @@ -26,8 +26,13 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
  +
  +import javax.naming.Context;
  +import javax.naming.InitialContext;
  +import javax.naming.NamingException;
   import javax.portlet.PortletSession;
   import javax.portlet.RenderRequest;
  +import javax.sql.DataSource;
   
   /**
    * DatabaseBrowserPortlet
  @@ -36,7 +41,7 @@
    * @version $Id$
    */
   public class DatabaseBrowserPortlet 
  -    extends AbstractBrowserPortlet
  +    extends BrowserPortlet
       implements Browser
   {    
       /**
  @@ -209,6 +214,7 @@
       
       public Connection getConnection()
       {
  +        
           Connection con = null;
           try 
           {
  @@ -223,6 +229,16 @@
               //con = DriverManager.getConnection("jdbc:mysql://192.168.2.55/GWLogDB", "david", "david");
               //con = DriverManager.getConnection("jdbc:hsqldb:hsql://127.0.0.1:9001", "sa", "");
               con = DriverManager.getConnection("jdbc:mysql://j2-server/j2", "j2", "digital");
  +            
  +            Context ctx = new InitialContext();
  +            DataSource ds = (DataSource)ctx.lookup("java:/jdbc/jetspeed");            
  +            System.out.println("Got DataSource: " + ds);
  +            
  +        }
  +        catch (NamingException ne)
  +        {
  +            System.err.println("error getting datas source " + ne);
  +            log.error("Cant get jetspeed data source", ne);                                   
           }
           catch (ClassNotFoundException cnfe) 
           {
  
  
  
  1.1                  jakarta-jetspeed-2/applications/gems/src/java/org/apache/portals/gems/browser/BrowserPortlet.java
  
  Index: BrowserPortlet.java
  ===================================================================
  /*
   * Copyright 2000-2004 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.portals.gems.browser;
  
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.Vector;
  
  import javax.portlet.ActionRequest;
  import javax.portlet.ActionResponse;
  import javax.portlet.PortletException;
  import javax.portlet.PortletMode;
  import javax.portlet.PortletConfig;
  import javax.portlet.PortletPreferences;
  import javax.portlet.PortletRequest;
  import javax.portlet.PortletSession;
  import javax.portlet.RenderRequest;
  import javax.portlet.RenderResponse;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
  import org.apache.velocity.context.Context;
  
  /**
   * AbstractBrowserPortlet
   * 
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
   * @version $Id: AbstractBrowserPortlet.java,v 1.2 2005/01/01 00:01:29 taylor
   *          Exp $
   */
  public class BrowserPortlet extends GenericVelocityPortlet implements Browser
  {
  
      protected static final String SQL = "sql";
  
      protected static final String POOLNAME = "poolname";
  
      protected static final String START = "start";
  
      protected static final String CUSTOMIZE_TEMPLATE = "customizeTemplate";
  
      protected static final String WINDOW_SIZE = "windowSize";
  
      protected static final String USER_OBJECT_NAMES = "user-object-names";
  
      protected static final String USER_OBJECT_TYPES = "user-object-types";
  
      protected static final String USER_OBJECTS = "user-objects";
  
      protected static final String SQL_PARAM_PREFIX = "sqlparam";
  
      protected static final String LINKS_READ = "linksRead";
  
      protected static final String ROW_LINK = "rowLinks";
  
      protected static final String TABLE_LINK = "tableLinks";
  
      protected static final String ROW_LINK_IDS = "row-link-ids";
  
      protected static final String ROW_LINK_TYPES = "row-link-types";
  
      protected static final String ROW_LINK_TARGETS = "row-link-targets";
  
      protected static final String TABLE_LINK_IDS = "table-link-ids";
  
      protected static final String TABLE_LINK_TYPES = "table-link-types";
  
      protected static final String TABLE_LINK_TARGETS = "table-link-targets";
  
      protected static final String BROWSER_TABLE_SIZE = "tableSize";
  
      protected static final String BROWSER_ACTION_KEY = "browser_action_key";
  
      protected static final String BROWSER_ITERATOR = "table";
  
      protected static final String BROWSER_TITLE_ITERATOR = "title";
  
      protected static final String NEXT = "next";
  
      protected static final String PREVIOUS = "prev";
  
      protected static final String VELOCITY_NULL_ENTRY = "-";
  
      // portlet entry Id
      protected static final String PEID = "js_peid";
  
      protected static final String SORT_COLUMN_NAME = "js_dbcolumn";
  
      protected List sqlParameters = new Vector();
  
      /**
       * Static initialization of the logger for this class
       */
      protected Log log = LogFactory.getLog(BrowserPortlet.class);
  
      public void init(PortletConfig config) throws PortletException
      {
          super.init(config);
      }
  
      public void getRows(RenderRequest request, String sql, int windowSize)
              throws Exception
      {
      }
  
      public void doView(RenderRequest request, RenderResponse response)
              throws PortletException, IOException
      {
          int resultSetSize, next, prev, windowSize;
  
          response.setContentType("text/html");
  
          BrowserIterator iterator = getBrowserIterator(request);
          Context context = this.getContext(request);
  
          String sortColName = request.getParameter(SORT_COLUMN_NAME);
          int start = getStartVariable(request, START, sortColName, iterator);
          PortletPreferences prefs = request.getPreferences();
  
          windowSize = Integer.parseInt(prefs.getValue(WINDOW_SIZE, "10"));
          next = start + windowSize;
          prev = start - windowSize;
  
          try
          {
              if (iterator == null)
              {
                  String sql = getQueryString(request, context);
                  // System.out.println("buildNormalContext SQL: "+sql);
                  readUserParameters(request, context);
                  getRows(request, sql, windowSize);
                  iterator = getBrowserIterator(request);
              } 
              else
              {
                  if (sortColName != null)
                  {
                      iterator.sort(sortColName);
                  }
                  iterator.setTop(start);
              }
  
              readLinkParameters(request, context);
  
              if (iterator != null)
              {
                  resultSetSize = iterator.getResultSetSize();
  
                  if (next < resultSetSize)
                  {
                      context.put(NEXT, String.valueOf(next));
                  }
                  if (prev <= resultSetSize && prev >= 0)
                  {
                      context.put(PREVIOUS, String.valueOf(prev));
                  }
  
                  context.put(BROWSER_ITERATOR, iterator);
                  context.put(BROWSER_TITLE_ITERATOR, iterator
                          .getResultSetTitleList());
                  context.put(BROWSER_TABLE_SIZE, new Integer(resultSetSize));
  
                  /*
                   * System.out.println("buildNormalContext Sort column name=
                   * "+sortColName); System.out.println("buildNormalContext
                   * Iterator: "+iterator); System.out.println("buildNormalContext
                   * Titles= "+iterator.getResultSetTitleList());
                   * System.out.println("buildNormalContext
                   * windowSize="+windowSize+" prev="+prev+ " next="+next+"
                   * start="+start+" resultSetSize="+resultSetSize);
                   */
              }
  
          } catch (Exception e)
          {
              // log the error msg
              log.error("Exception", e);
  
              /*
               * TODO: error logging
               * 
               * rundata.setMessage("Error in Portals Gems Browser: " +
               * e.toString()); rundata.setStackTrace(StringUtils.stackTrace(e),
               * e);
               * rundata.setScreenTemplate(JetspeedResources.getString("template.error","Error"));
               */
          }
  
          super.doView(request, response);
      }
  
      public void doEdit(RenderRequest request, RenderResponse response)
              throws PortletException, IOException
      {
          response.setContentType("text/html");
          doPreferencesEdit(request, response);
      }
  
      public void processAction(ActionRequest request, ActionResponse response)
              throws PortletException, IOException
      {
          if (request.getPortletMode() == PortletMode.EDIT)
          {
              processPreferencesAction(request, response);
          } else
          {
              String browserAction = request.getParameter("db.browser.action");
              if (browserAction != null)
              {
                  if (browserAction.equals("refresh"))
                  {
                      clearBrowserIterator(request);
                  }
                  String start = request.getParameter("start");
                  if (start != null)
                  {
                      response.setRenderParameter("start", start);
                  }
              }
          }
      }
  
      /**
       * Centralizes the calls to session - to retrieve the BrowserIterator.
       * 
       * @param data
       *            The turbine rundata context for this request.
       * 
       */
      protected BrowserIterator getBrowserIterator(PortletRequest request)
      {
          BrowserIterator iterator = (BrowserIterator) request
                  .getPortletSession().getAttribute(BROWSER_ACTION_KEY,
                          PortletSession.PORTLET_SCOPE);
          return iterator;
      }
  
      /**
       * Centralizes the calls to session - to set the BrowserIterator.
       * 
       * @param data
       *            The turbine rundata context for this request.
       * @param iterator.
       * 
       */
      protected void setBrowserIterator(RenderRequest request,
              BrowserIterator iterator)
      {
          request.getPortletSession().setAttribute(BROWSER_ACTION_KEY, iterator);
      }
  
      /**
       * Centralizes the calls to session - to clear the BrowserIterator from the
       * temp storage.
       * 
       * @param data
       *            The turbine rundata context for this request.
       * 
       */
      protected void clearBrowserIterator(PortletRequest request)
      {
          request.getPortletSession().removeAttribute(BROWSER_ACTION_KEY);
      }
  
      protected int getStartVariable(RenderRequest request, String attrName,
              String sortColName, BrowserIterator iterator)
      {
          int start = -1;
          // if users want to overwrite how the sorting affects the cursor for
          // the window
          if (sortColName != null) start = getStartIndex();
  
          if (start < 0)
          {
              // fallback routine for start
              String startStr = request.getParameter(attrName);
              if (startStr != null && startStr.length() > 0)
              {
                  start = Integer.parseInt(startStr);
              } else if (start == -1 && iterator != null)
              {
                  start = iterator.getTop();
              }
  
              if (start < 0) start = 0;
          }
          return start;
      }
  
      /**
       * to be used if sorting behavior to be overwritten
       */
      protected int getStartIndex()
      {
          return 0;
      }
  
      /**
       * This method returns the sql from the getQuery method which can be
       * overwritten according to the needs of the application. If the getQuery()
       * returns null, then it gets the value from the psml file. If the psml
       * value is null then it returns the value from the xreg file.
       * 
       */
      protected String getQueryString(RenderRequest request, Context context)
      {
          String sql = getQueryString(request);
          if (null == sql)
          {
              sql = getPreference(request, SQL, null);
          }
          return sql;
      }
  
      public String getQueryString(RenderRequest request)
      {
          return null;
      }
  
      protected String getPreference(RenderRequest request, String attrName,
              String attrDefValue)
      {
          return request.getPreferences().getValue(attrName, attrDefValue);
      }
  
      protected void readUserParameters(RenderRequest request, Context context)
      {
          List userObjectList;
          Object userObjRead = request.getPortletSession().getAttribute(
                  USER_OBJECTS, PortletSession.PORTLET_SCOPE);
          if (userObjRead != null)
          {
              context.put(USER_OBJECTS, (List) userObjRead);
              // System.out.println("userObjectListSize: "+
              // ((List)userObjRead).size());
          } else
          {
              /*
               * TODO: implement user parameters
               * 
               * String userObjTypes=
               * getParameterFromRegistry(portlet,USER_OBJECT_TYPES,null); String
               * userObjNames=
               * getParameterFromRegistry(portlet,USER_OBJECT_NAMES,null); if(
               * userObjTypes != null && userObjTypes.length() > 0 ) {
               * userObjectList = new ArrayList(); int userObjectIndex = 0;
               * StringTokenizer tokenizer1 = new StringTokenizer(userObjNames,
               * ","); StringTokenizer tokenizer3 = new
               * StringTokenizer(userObjTypes, ",");
               * while(tokenizer1.hasMoreTokens() && tokenizer3.hasMoreTokens()) {
               * userObjectList.add(userObjectIndex, new
               * ActionParameter(tokenizer1.nextToken(), null,
               * tokenizer3.nextToken())); userObjectIndex++; }
               * context.put(USER_OBJECTS, userObjectList);
               * setParameterToTemp(portlet, rundata, USER_OBJECTS,
               * userObjectList); //System.out.println("readLink:
               * userObjectTypesListSize: "+userObjectList.size()); }
               */
          }
      }
  
      protected void readSqlParameters(RenderRequest request)
      {
          List sqlParamList = null;
  
          int i = 1;
          while (true)
          {
              String param = getPreference(request, SQL_PARAM_PREFIX + i, null);
              if (param == null)
              {
                  break;
              } else
              {
                  if (sqlParamList == null)
                  {
                      sqlParamList = new ArrayList();
                  }
                  sqlParamList.add(param);
              }
              i++;
          }
  
          if (sqlParamList != null)
          {
              setSQLParameters(sqlParamList);
          }
      }
  
      public void setSQLParameters(List parameters)
      {
          this.sqlParameters = parameters;
      }
  
      protected void readLinkParameters(RenderRequest request, Context context)
      {
          // TODO: implement me
      }
  
      /**
       * This method should be overwritten every time the user object needs to be
       * populated with some user specific constraints. As an example if the user
       * wanted to track the parent of an object based on some calculation per
       * row, it could be done here.
       * 
       */
      public void populate(int rowIndex, int columnIndex, List row)
      {
      }
  
      /*
       * (non-Javadoc)
       * 
       * @see org.apache.jetspeed.modules.actions.portlets.browser.BrowserQuery#filter(java.util.List,
       *      RunData)
       */
      public boolean filter(List row, RenderRequest request)
      {
          return false;
      }
  
  }
  
  
  1.4       +9 -4      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/minty-blue/css/styles.css
  
  Index: styles.css
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/minty-blue/css/styles.css,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- styles.css	24 Dec 2004 00:40:29 -0000	1.3
  +++ styles.css	3 Jan 2005 08:14:29 -0000	1.4
  @@ -58,15 +58,20 @@
   
   .jetdbOdd
   {
  -  background-color:#66FFFF;
  -  layer-background-color:#66FFFF;
  +  background-color:#CCCCCC;
     FONT-SIZE:7pt;
     FONT-WEIGHT:normal;
   }
   .jetdbEven
   {
  -  background-color:#99FF33;
  -  layer-background-color:#99FF33;
  +  background-color:#999999;
  +  FONT-SIZE:7pt;
  +  FONT-WEIGHT:normal;
  +}
  +
  +.jetdbLight
  +{
  +  background-color:#cc99ff;
     FONT-SIZE:7pt;
     FONT-WEIGHT:normal;
   }
  
  
  
  1.36      +5 -0      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/assembly/jetspeed-spring.xml
  
  Index: jetspeed-spring.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/assembly/jetspeed-spring.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- jetspeed-spring.xml	3 Dec 2004 09:37:59 -0000	1.35
  +++ jetspeed-spring.xml	3 Jan 2005 08:14:29 -0000	1.36
  @@ -293,6 +293,11 @@
   		<property name="target"> 
   			<ref bean="PersistenceBrokerSSOProvider"/>
   		</property>
  +		<property name="transactionAttributes">
  +			<props>
  +				<prop key="*">PROPAGATION_SUPPORTS</prop>
  +			</props>
  +		</property>
   		
     </bean> 
    
  
  
  
  1.5       +2 -1      jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/jetspeed-portlet.xml
  
  Index: jetspeed-portlet.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/jetspeed-portlet.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jetspeed-portlet.xml	22 Dec 2004 19:07:27 -0000	1.4
  +++ jetspeed-portlet.xml	3 Jan 2005 08:14:32 -0000	1.5
  @@ -33,7 +33,8 @@
       <js:service name='UserManager'/>
       <js:service name='RoleManager'/>
       <js:service name='GroupManager'/>    
  -    <js:service name="Profiler" />     
  +    <js:service name="Profiler" /> 
  +    <js:service name="SSO" />         
     </js:services>
   
   </portlet-app>
  
  
  
  1.9       +53 -1     jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/portlet.xml
  
  Index: portlet.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/portlet.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- portlet.xml	22 Dec 2004 17:50:10 -0000	1.8
  +++ portlet.xml	3 Jan 2005 08:14:32 -0000	1.9
  @@ -162,7 +162,59 @@
         <short-title>User</short-title>
         <keywords>admin,security,users</keywords>
       </portlet-info>
  -  </portlet>
  +</portlet>
  +
  +<portlet id="SSOBrowserPortlet">
  +    <init-param>
  +    	<description>This parameter sets the template used in view mode.</description>
  +		<name>ViewPage</name>
  +			<value>/WEB-INF/security/sso/sites-view.vm</value>
  +     </init-param>   
  +    <portlet-name>SSOBrowserPortlet</portlet-name>
  +    <display-name>SSO Sites Browser</display-name>
  +    <description>SSO Sites Browser Portlet</description>
  +    <portlet-class>org.apache.jetspeed.portlets.security.sso.SSOBrowser</portlet-class>
  +    <expiration-cache>-1</expiration-cache>
  +    <supports>
  +      <mime-type>text/html</mime-type>
  +      <portlet-mode>EDIT</portlet-mode>
  +      <portlet-mode>VIEW</portlet-mode>
  +      <portlet-mode>HELP</portlet-mode>
  +    </supports>
  +    <supported-locale>en</supported-locale>
  +    <resource-bundle>org.apache.jetspeed.portlets.security.resources.SSOResources</resource-bundle>            
  +    <portlet-info>
  +      <title>SSO Sites</title>
  +      <short-title>Sites</short-title>
  +      <keywords>admin,security,site,SSO</keywords>
  +    </portlet-info>
  +</portlet>
  +
  +<portlet id="SSODetailsPortlet">
  +    <init-param>
  +    	<description>This parameter sets the template used in view mode.</description>
  +		<name>ViewPage</name>
  +			<value>/WEB-INF/security/sso/sites-details.vm</value>
  +     </init-param>   
  +    <portlet-name>SSODetailsPortlet</portlet-name>
  +    <display-name>SSO Details</display-name>
  +    <description>SSO Site Details Portlet</description>
  +    <portlet-class>org.apache.jetspeed.portlets.security.sso.SSODetails</portlet-class>
  +    <expiration-cache>-1</expiration-cache>
  +    <supports>
  +      <mime-type>text/html</mime-type>
  +      <portlet-mode>EDIT</portlet-mode>
  +      <portlet-mode>VIEW</portlet-mode>
  +      <portlet-mode>HELP</portlet-mode>
  +    </supports>
  +    <supported-locale>en</supported-locale>
  +    <resource-bundle>org.apache.jetspeed.portlets.security.resources.SSOResources</resource-bundle>            
  +    <portlet-info>
  +      <title>SSO Details</title>
  +      <short-title>SSO Details</short-title>
  +      <keywords>admin,security,site,SSO</keywords>
  +    </portlet-info>
  +</portlet>
   
   </portlet-app>
   
  
  
  
  1.9       +21 -0     jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/web.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- web.xml	29 Nov 2004 21:12:30 -0000	1.8
  +++ web.xml	3 Jan 2005 08:14:32 -0000	1.9
  @@ -90,6 +90,21 @@
   		</init-param>
   		<load-on-startup>1</load-on-startup>
   	</servlet>
  +
  +  	<!-- Define Velocity Servlet -->
  +	<servlet>
  +		<servlet-name>velocity</servlet-name>
  +		<servlet-class>org.apache.portals.bridges.velocity.BridgesVelocityViewServlet</servlet-class>
  +		<init-param>
  +			<param-name>org.apache.velocity.toolbox</param-name>
  +			<param-value>/WEB-INF/velocity/toolbox.xml</param-value>
  +		</init-param>
  +		<init-param>
  +			<param-name>org.apache.velocity.properties</param-name>
  +			<param-value>/WEB-INF/velocity/velocity.properties</param-value>
  +		</init-param>
  +		<load-on-startup>10</load-on-startup>
  +	</servlet>
     	
     	<!-- extension mapping -->
     	<!-- Faces mapping -->
  @@ -103,6 +118,12 @@
   		<servlet-name>action</servlet-name>
   		<url-pattern>*.do</url-pattern>
   	</servlet-mapping>
  +
  +    <!-- Map *.vm files to Velocity  -->
  +	<servlet-mapping>
  +		<servlet-name>velocity</servlet-name>
  +		<url-pattern>*.vm</url-pattern>
  +	</servlet-mapping>	
   
   	<!-- Tag libraries -->
   	<taglib>
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/Administrative/sso-admin.psml
  
  Index: sso-admin.psml
  ===================================================================
  <!--
  Copyright 2004 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="sso-admin">
    <defaults
       layout-decorator="tigris"
       portlet-decorator="tigris"
    />
    <title>SSO Management</title>
    <fragment id="ssoa-2" type="layout" name="jetspeed::VelocityTwoColumns">
      <fragment id="ssoa-200" type="portlet" name="security::SSOBrowserPortlet">
        <property layout="TwoColumns" name="row" value="0" />
        <property layout="TwoColumns" name="column" value="0" />
      </fragment>
      <fragment id="ssoa-201" type="portlet" name="security::SSODetailsPortlet">
        <property layout="TwoColumns" name="row" value="0" />
        <property layout="TwoColumns" name="column" value="1" />
      </fragment>    
    </fragment>
  </page>
  
  
  
  1.4       +10 -5     jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/css/styles.css
  
  Index: styles.css
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/css/styles.css,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- styles.css	24 Dec 2004 00:40:29 -0000	1.3
  +++ styles.css	3 Jan 2005 08:14:32 -0000	1.4
  @@ -296,18 +296,23 @@
     COLOR: white;
     ; font-family: Verdana, Arial, Helvetica, sans-serif
   }
  -
  +  
   .jetdbOdd
   {
  -  background-color:#66FFFF;
  -  layer-background-color:#66FFFF;
  +  background-color:#CCCCCC;
     FONT-SIZE:7pt;
     FONT-WEIGHT:normal;
   }
   .jetdbEven
   {
  -  background-color:#99FF33;
  -  layer-background-color:#99FF33;
  +  background-color:#999999;
  +  FONT-SIZE:7pt;
  +  FONT-WEIGHT:normal;
  +}
  +
  +.jetdbLight
  +{
  +  background-color:#ccccff;
     FONT-SIZE:7pt;
     FONT-WEIGHT:normal;
   }
  
  
  
  1.1                  jakarta-jetspeed-2/applications/security/src/java/org/apache/jetspeed/portlets/security/resources/SSOResources.properties
  
  Index: SSOResources.properties
  ===================================================================
  refresh = Refresh
  new = New
  save = Save
  delete = Delete
  deleteQuestion = OK to delete?
  
  
  
  1.2       +111 -24   jakarta-jetspeed-2/applications/security/src/java/org/apache/jetspeed/portlets/security/sso/SSOBrowser.java
  
  Index: SSOBrowser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/security/src/java/org/apache/jetspeed/portlets/security/sso/SSOBrowser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SSOBrowser.java	31 Dec 2004 23:59:10 -0000	1.1
  +++ SSOBrowser.java	3 Jan 2005 08:14:32 -0000	1.2
  @@ -14,21 +14,29 @@
   */
   package org.apache.jetspeed.portlets.security.sso;
   
  +import java.io.IOException;
   import java.sql.Types;
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
   
  +import javax.portlet.ActionRequest;
  +import javax.portlet.ActionResponse;
   import javax.portlet.PortletConfig;
   import javax.portlet.PortletException;
  +import javax.portlet.PortletMode;
   import javax.portlet.RenderRequest;
  +import javax.portlet.RenderResponse;
   
   import org.apache.jetspeed.portlets.security.SecurityResources;
  -import org.apache.jetspeed.security.UserManager;
  +import org.apache.jetspeed.sso.SSOException;
   import org.apache.jetspeed.sso.SSOProvider;
  +import org.apache.jetspeed.sso.SSOSite;
   import org.apache.portals.gems.browser.BrowserIterator;
   import org.apache.portals.gems.browser.DatabaseBrowserIterator;
  -import org.apache.portals.gems.browser.AbstractBrowserPortlet;
  +import org.apache.portals.gems.browser.BrowserPortlet;
  +import org.apache.portals.messaging.PortletMessaging;
  +import org.apache.velocity.context.Context;
   
   /**
    * SSOBrowser
  @@ -36,7 +44,7 @@
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @version $Id$
    */
  -public class SSOBrowser extends AbstractBrowserPortlet
  +public class SSOBrowser extends BrowserPortlet
   {
       private SSOProvider sso;
       
  @@ -50,6 +58,7 @@
               throw new PortletException("Failed to find the SSO Provider on portlet initialization");
           }
       }
  +       
       
       public void getRows(RenderRequest request, String sql, int windowSize)
       throws Exception
  @@ -58,25 +67,10 @@
           List resultSetTypeList = new ArrayList();
           try
           {
  -            //
  -            // get query parameters from registry
  -            //
  -//            Iterator it = sqlParameters.iterator();
  -//            int ix = 0;
  -//            while (it.hasNext())
  -//            {
  -//                ix++;
  -//                Object object = it.next();
  -//            }
  -
  -            //
  -            // submit the query
  -            //
               Iterator sites = sso.getSites("");
               
               // List userObjectList = (List)getParameterFromTemp(portlet, rundata, USER_OBJECTS);
   
  -
               //
               // Add MetaData headers, types
               //
  @@ -84,17 +78,15 @@
               resultSetTypeList.add(String.valueOf(Types.VARCHAR));
               resultSetTitleList.add("Site");
   
  -            //
  -            // add user objects
  -            //
               //subPopulate(rundata, qResult, repo, folder, null);
   
               // TODO: need to try to normalize List/Collection/Iterators
               List list = new ArrayList();
               while (sites.hasNext())
               {
  -                list.add(sites.next());
  -            }
  +                SSOSite site = (SSOSite)sites.next();
  +                list.add(site.getName());
  +            }            
               BrowserIterator iterator = new DatabaseBrowserIterator(
                       list, resultSetTitleList, resultSetTypeList,
                       windowSize);
  @@ -106,6 +98,101 @@
               e.printStackTrace();
               throw e;
           }        
  +    }
  +   
  +    public void doView(RenderRequest request, RenderResponse response)
  +    throws PortletException, IOException
  +    {
  +        String selectedSite = (String)PortletMessaging.receive(request, "site", "selected");
  +        if (selectedSite != null)
  +        {        
  +            Context context = this.getContext(request);
  +            context.put("currentSite", selectedSite);
  +            String selectedUrl = (String)PortletMessaging.receive(request, "site", "selectedUrl");
  +            context.put("currentUrl", selectedUrl);            
  +        }
  +        super.doView(request, response);
  +    }
  +    
  +    public void processAction(ActionRequest request, ActionResponse response)
  +    throws PortletException, IOException
  +    {
  +        if (request.getPortletMode() == PortletMode.VIEW)
  +        {
  +            String selectedSite = request.getParameter("ssoSite");
  +            if (selectedSite != null)
  +            {
  +                SSOSite site = sso.getSite(selectedSite);
  +                if (site != null)
  +                {
  +                    PortletMessaging.publish(request, "site", "selected", selectedSite);
  +                    PortletMessaging.publish(request, "site", "selectedUrl", site.getSiteURL());
  +                }
  +            }
  +            String refresh = request.getParameter("sso.refresh");
  +            String save = request.getParameter("sso.save");
  +            String neue = request.getParameter("sso.new");
  +            if (refresh != null)
  +            {
  +                this.clearBrowserIterator(request);
  +            }
  +            else if (neue != null)
  +            {
  +                PortletMessaging.cancel(request, "site", "selected");
  +                PortletMessaging.cancel(request, "site", "selectedUrl");                                
  +            }
  +            else if (save != null)
  +            {
  +                String siteName = request.getParameter("site.name");                
  +                String siteUrl = request.getParameter("site.url");
  +                if (!(isEmpty(siteName) || isEmpty(siteUrl)))
  +                {
  +                    try
  +                    {
  +                        SSOSite site = null;
  +                        String oldName = (String)PortletMessaging.receive(request, "site", "selected");
  +                        if (oldName != null)
  +                        {
  +                            site = sso.getSite(oldName);
  +                        }
  +                        else
  +                        {
  +                            site = sso.getSite(siteName);
  +                        }                        
  +                        if (site != null)
  +                        {
  +                            site.setName(siteName);
  +                            site.setSiteURL(siteUrl);
  +                            sso.updateSite(site);
  +                            this.clearBrowserIterator(request);
  +                            PortletMessaging.publish(request, "site", "selected", siteName);
  +                            PortletMessaging.publish(request, "site", "selectedUrl", siteUrl);                            
  +                        }
  +                        else
  +                        {
  +                            sso.addSite(siteName, siteUrl);
  +                            this.clearBrowserIterator(request);
  +                        }
  +                    }
  +                    catch (SSOException e)
  +                    {
  +                        // TODO: exception handling
  +                        System.err.println("Exception storing site: " + e);
  +                    }
  +                }
  +            }            
  +        }
  +        super.processAction(request, response);
  +            
  +    }
  +
  +    private boolean isEmpty(String s)
  +    {
  +        if (s == null) return true;
  +        
  +        if (s.trim().equals("")) return true;
  +        
  +        return false;
       }
       
   }
  
  
  
  1.1                  jakarta-jetspeed-2/applications/security/src/java/org/apache/jetspeed/portlets/security/sso/SSODetails.java
  
  Index: SSODetails.java
  ===================================================================
  /* Copyright 2004 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.security.sso;
  
  import java.io.IOException;
  import java.security.Principal;
  import java.sql.Types;
  import java.util.ArrayList;
  import java.util.Iterator;
  import java.util.List;
  
  import javax.portlet.ActionRequest;
  import javax.portlet.ActionResponse;
  import javax.portlet.PortletConfig;
  import javax.portlet.PortletException;
  import javax.portlet.PortletMode;
  import javax.portlet.RenderRequest;
  import javax.portlet.RenderResponse;
  
  import org.apache.jetspeed.portlets.security.SecurityResources;
  import org.apache.jetspeed.sso.SSOException;
  import org.apache.jetspeed.sso.SSOProvider;
  import org.apache.jetspeed.sso.SSOSite;
  import org.apache.portals.gems.browser.BrowserIterator;
  import org.apache.portals.gems.browser.DatabaseBrowserIterator;
  import org.apache.portals.gems.browser.BrowserPortlet;
  import org.apache.portals.messaging.PortletMessaging;
  import org.apache.velocity.context.Context;
  
  /**
   * SSODetails
   * 
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @version $Id: SSODetails.java,v 1.1 2005/01/03 08:14:32 taylor Exp $
   */
  public class SSODetails extends BrowserPortlet
  {
      private SSOProvider sso;
      
      public void init(PortletConfig config)
      throws PortletException 
      {
          super.init(config);
          sso = (SSOProvider)getPortletContext().getAttribute(SecurityResources.CPS_SSO_COMPONENT);
          if (null == sso)
          {
              throw new PortletException("Failed to find the SSO Provider on portlet initialization");
          }
      }
         
      
      public void getRows(RenderRequest request, String sql, int windowSize)
      throws Exception
      {
          List resultSetTitleList = new ArrayList();
          List resultSetTypeList = new ArrayList();
          try
          {
              SSOSite site = null;
              Iterator principals = null;
              List list = new ArrayList();
              resultSetTypeList.add(String.valueOf(Types.VARCHAR));
              resultSetTitleList.add("Principal");
              resultSetTypeList.add(String.valueOf(Types.VARCHAR));
              resultSetTitleList.add("Remote");
              
              String selectedSite = (String)PortletMessaging.receive(request, "site", "selected");
              if (selectedSite != null)
              {
                  site = sso.getSite(selectedSite);
                  principals = site.getPrincipals().iterator();
                          
                  // TODO: need to try to normalize List/Collection/Iterators
                  while (principals.hasNext())
                  {
                      Principal p = (Principal)principals.next();
                      list.add(p.getName());
                  }
              }
              BrowserIterator iterator = new DatabaseBrowserIterator(
                      list, resultSetTitleList, resultSetTypeList,
                      windowSize);
              setBrowserIterator(request, iterator);
          }
          catch (Exception e)
          {
              //log.error("Exception in CMSBrowserAction.getRows: ", e);
              e.printStackTrace();
              throw e;
          }        
      }
     
      public void doView(RenderRequest request, RenderResponse response)
      throws PortletException, IOException
      {
          String selectedSite = (String)PortletMessaging.receive(request, "site", "selected");
          if (selectedSite != null)
          {        
              Context context = this.getContext(request);
              context.put("currentSite", selectedSite);
              String selectedUrl = (String)PortletMessaging.receive(request, "site", "selectedUrl");
              context.put("currentUrl", selectedUrl);            
          }
          super.doView(request, response);
      }
      
      public void processAction(ActionRequest request, ActionResponse response)
      throws PortletException, IOException
      {
          if (request.getPortletMode() == PortletMode.VIEW)
          {
              String selectedSite = request.getParameter("ssoSite");
              if (selectedSite != null)
              {
                  SSOSite site = sso.getSite(selectedSite);
                  if (site != null)
                  {
                      PortletMessaging.publish(request, "site", "selected", selectedSite);
                      PortletMessaging.publish(request, "site", "selectedUrl", site.getSiteURL());
                  }
              }
              String refresh = request.getParameter("sso.refresh");
              String save = request.getParameter("sso.save");
              String neue = request.getParameter("sso.new");
              if (refresh != null)
              {
                  this.clearBrowserIterator(request);
              }
              else if (neue != null)
              {
                  PortletMessaging.cancel(request, "site", "selected");
                  PortletMessaging.cancel(request, "site", "selectedUrl");                                
              }
              else if (save != null)
              {
                  String siteName = request.getParameter("site.name");                
                  String siteUrl = request.getParameter("site.url");
                  if (!(isEmpty(siteName) || isEmpty(siteUrl)))
                  {
                      try
                      {
                          SSOSite site = null;
                          String oldName = (String)PortletMessaging.receive(request, "site", "selected");
                          if (oldName != null)
                          {
                              site = sso.getSite(oldName);
                          }
                          else
                          {
                              site = sso.getSite(siteName);
                          }                        
                          if (site != null)
                          {
                              site.setName(siteName);
                              site.setSiteURL(siteUrl);
                              sso.updateSite(site);
                              this.clearBrowserIterator(request);
                              PortletMessaging.publish(request, "site", "selected", siteName);
                              PortletMessaging.publish(request, "site", "selectedUrl", siteUrl);                            
                          }
                          else
                          {
                              sso.addSite(siteName, siteUrl);
                              this.clearBrowserIterator(request);
                          }
                      }
                      catch (SSOException e)
                      {
                          // TODO: exception handling
                          System.err.println("Exception storing site: " + e);
                      }
                  }
              }            
          }
          super.processAction(request, response);
              
      }
  
      private boolean isEmpty(String s)
      {
          if (s == null) return true;
          
          if (s.trim().equals("")) return true;
          
          return false;
      }
      
  }
  
  
  
  1.1                  jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/security/sso/edit-prefs.vm
  
  Index: edit-prefs.vm
  ===================================================================
  
  <h2 class="portlet-section-header">Edit Preferences</h2>
  
  <form action="$renderResponse.createActionURL()" method="post">
  <table>
  #foreach ($pref in $prefs)
  #prefField($pref.Key $pref.Value "40")
  #end
  </table>
  <input type="submit" name="Save" value="Save" />
  </form>
  
  
  
  
  
  1.1                  jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/security/sso/sites-view.vm
  
  Index: sites-view.vm
  ===================================================================
  #*
  Copyright 2004 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.
  *#
  
  #**
  
  @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  @version $Id: sites-view.vm,v 1.1 2005/01/03 08:14:33 taylor Exp $
  
  *#
  
  #set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
  
  <table cellpadding=0 cellspacing=1 border=0 width='100%' >
    <tr>
      <td width='12' class="jetdbHeadNoLink"></td>      
      #foreach ($column in $title)
  	  #set ($columnLink = $renderResponse.createRenderURL())
  	  $columnLink.setParameter("js_dbcolumn",$column)
  ##      <td align='center' class="jetdbHeadNoLink" width="40%" nowrap onClick="window.location.href='$columnLink'">
        <td align='center' class="jetdbHeadNoLink" width="40%" nowrap>
          $column
        </td>
      #end
      <td width='24' class="jetdbHeadNoLink">&nbsp;</td>    
      <td class=""></td>        
    </tr>
    #foreach ( $ssoName in $table )
    <tr>
       #if ($currentSite == $ssoName)
         #set ($rowstyle = "jetdbLight")
         <td class="$rowstyle" nowrap width='12'>
           <img src="/security/images/selected.gif" width="7" height="12" border="0" vspace="2"/>
         </td>
  	 #else
        #set ($rowstyle = "jetdbOdd")
         <td class="$rowstyle" nowrap width='12'>
           &nbsp;
         </td>      
  	 #end   	 
        <td class="$rowstyle" nowrap width="40%">
          #set ($action = $renderResponse.createActionURL())
          $action.setParameter('ssoSite', $ssoName)
          <div align="center"><a href='$action'>$ssoName</a></div>
        </td>
         <td class="$rowstyle" nowrap width='24' align='center'>
           <img src="/security/images/waste_bin.gif" width="20" height="15" border="0"/>
         </td>      
      <td class="">&nbsp;</td>               
     </tr>
    #end
    <tr>
      <td width='12' class="jetdbHeadNoLink"></td>      
      #foreach ($column in $title)
  	  #set ($columnLink = $renderResponse.createRenderURL())
  	  $columnLink.setParameter("js_dbcolumn",$column)
        <td align='center' class="jetdbHeadNoLink" width="75%" nowrap>
        </td>
      #end
      <td width='24' class="jetdbHeadNoLink">&nbsp;</td>    
      <td class=""></td>        
    </tr>
  </table>
  <br/>
  <form action="$renderResponse.createActionURL()" method="post">
  <table>
    <tr colspan="2" align="right">
      <td nowrap class="portlet-section-alternate" align="right">Site Name:&nbsp;</td>
      <td class="portlet-section-body" align="left">
        <input type="text" name="site.name" size="40" value="$!currentSite" class="portlet-form-label-field">
      </td>
    </tr>
    <tr colspan="2" align="right">
      <td nowrap class="portlet-section-alternate" align="right">Site URL:&nbsp;</td>
      <td class="portlet-section-body" align="left">
        <input type="text" name="site.url" size="40" value="$!currentUrl" class="portlet-form-label-field">
      </td>
    </tr>
  </table>
  <br/>
  <input name='sso.save' type="submit" value="$MESSAGES.getString('save')" class="portlet-form-button"/>
  <input name='sso.refresh' class="portlet-form-button" type="submit" value="$MESSAGES.getString('refresh')" />
  <input name='sso.new' class="portlet-form-button" type="submit" value="$MESSAGES.getString('new')" />
  </form>	      
  
  
  
  
  1.1                  jakarta-jetspeed-2/applications/security/src/webapp/WEB-INF/security/sso/sites-details.vm
  
  Index: sites-details.vm
  ===================================================================
  #*
  Copyright 2004 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.
  *#
  
  #**
  
  @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  @version $Id: sites-details.vm,v 1.1 2005/01/03 08:14:33 taylor Exp $
  
  *#
  
  #set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
  
  <table cellpadding=0 cellspacing=1 border=0 width='100%' >
    <tr>
      <td width='12' class="jetdbHeadNoLink"></td>      
      #foreach ($column in $title)
  	  #set ($columnLink = $renderResponse.createRenderURL())
  	  $columnLink.setParameter("js_dbcolumn",$column)
  ##      <td align='center' class="jetdbHeadNoLink" width="40%" nowrap onClick="window.location.href='$columnLink'">
        <td align='center' class="jetdbHeadNoLink" width="40%" nowrap>
          $column
        </td>
      #end
      <td width='24' class="jetdbHeadNoLink">&nbsp;</td>    
      <td class=""></td>        
    </tr>
    #foreach ( $principal in $table )
    <tr>
       #if ($currentP == $principal)
         #set ($rowstyle = "jetdbLight")
         <td class="$rowstyle" nowrap width='12'>
           <img src="/security/images/selected.gif" width="7" height="12" border="0" vspace="2"/>
         </td>
  	 #else
        #set ($rowstyle = "jetdbOdd")
         <td class="$rowstyle" nowrap width='12'>
           &nbsp;
         </td>      
  	 #end   	 
        <td class="$rowstyle" nowrap width="25%">
          #set ($action = $renderResponse.createActionURL())
          $action.setParameter('ssoPrincipal', $principal)
          <div align="center"><a href='$action'>$principal</a></div>
        </td>
        <td class="$rowstyle" nowrap width="25%">
          <div align="center"><a href='$action'>REMOTE</a></div>
        </td>      
         <td class="$rowstyle" nowrap width='24' align='center'>
           <img src="/security/images/waste_bin.gif" width="20" height="15" border="0"/>
         </td>      
      <td class="">&nbsp;</td>               
     </tr>
    #end
    <tr>
      <td width='12' class="jetdbHeadNoLink"></td>      
      #foreach ($column in $title)
  	  #set ($columnLink = $renderResponse.createRenderURL())
  	  $columnLink.setParameter("js_dbcolumn",$column)
        <td align='center' class="jetdbHeadNoLink" width="40%" nowrap>
        </td>
      #end
      <td width='24' class="jetdbHeadNoLink">&nbsp;</td>    
      <td class=""></td>        
    </tr>
  </table>
  <br/>
  <form action="$renderResponse.createActionURL()" method="post">
  <table>
    <tr colspan="2" align="right">
      <td nowrap class="portlet-section-alternate" align="right">Portal Principal:&nbsp;</td>
      <td class="portlet-section-body" align="left">
        <input type="text" name="site.name" size="40" value="$!currentP" class="portlet-form-label-field">
      </td>
    </tr>
    <tr colspan="2" align="right">
      <td nowrap class="portlet-section-alternate" align="right">Remote Principal:&nbsp;</td>
      <td class="portlet-section-body" align="left">
        <input type="text" name="site.url" size="40" value="$!currentR" class="portlet-form-label-field">
      </td>
    </tr>
  </table>
  <br/>
  <input name='sso.save' type="submit" value="$MESSAGES.getString('save')" class="portlet-form-button"/>
  <input name='sso.refresh' class="portlet-form-button" type="submit" value="$MESSAGES.getString('refresh')" />
  <input name='sso.new' class="portlet-form-button" type="submit" value="$MESSAGES.getString('new')" />
  </form>	      
  
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/Public/db-browser.psml
  
  Index: db-browser.psml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--
  Copyright 2004 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="db-browser">
      <defaults
       layout-decorator="tigris"
       portlet-decorator="tigris"
    />
    
     <title>DB Browser Demo</title>
    <fragment id="dbb-1" type="layout" name="jetspeed::VelocityTwoColumns">
       <fragment id="dbb-101" type="portlet" name="demo::DbBrowserExample">
        <property layout="TwoColumns" name="row" value="0" />
        <property layout="TwoColumns" name="column" value="0" />
       </fragment>
    </fragment>
  </page>
  
  
  
  1.32      +3 -3      jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/portlet.xml
  
  Index: portlet.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/demo/src/webapp/WEB-INF/portlet.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- portlet.xml	31 Dec 2004 23:59:10 -0000	1.31
  +++ portlet.xml	3 Jan 2005 08:14:33 -0000	1.32
  @@ -595,9 +595,9 @@
       </portlet>
   
     <portlet>
  -    <description>Database Portlet</description>
  -    <portlet-name>DatabasePortlet</portlet-name>
  -    <display-name>Database Portlet</display-name>
  +    <description>Database Browser Example Portlet</description>
  +    <portlet-name>DbBrowserExample</portlet-name>
  +    <display-name>DB Browser</display-name>
       <portlet-class>org.apache.portals.gems.browser.DatabaseBrowserPortlet</portlet-class>
       <init-param>
   		<name>ViewPage</name>
  
  
  
  1.19      +9 -4      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css/styles.css
  
  Index: styles.css
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css/styles.css,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- styles.css	24 Dec 2004 00:40:29 -0000	1.18
  +++ styles.css	3 Jan 2005 08:14:33 -0000	1.19
  @@ -212,15 +212,20 @@
   
   .jetdbOdd
   {
  -  background-color:#66FFFF;
  -  layer-background-color:#66FFFF;
  +  background-color:#CCCCCC;
     FONT-SIZE:7pt;
     FONT-WEIGHT:normal;
   }
   .jetdbEven
   {
  -  background-color:#99FF33;
  -  layer-background-color:#99FF33;
  +  background-color:#999999;
  +  FONT-SIZE:7pt;
  +  FONT-WEIGHT:normal;
  +}
  +
  +.jetdbLight
  +{
  +  background-color:##ccccff;
     FONT-SIZE:7pt;
     FONT-WEIGHT:normal;
   }
  
  
  

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


Mime
View raw message