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 maven.xml
Date Tue, 25 May 2004 01:37:12 GMT
taylor      2004/05/24 18:37:12

  Modified:    portal/src/webapp/WEB-INF/assembly jetspeed.groovy
               portal/src/java/org/apache/jetspeed/velocity
                        JetspeedPowerTool.java
               portal/src/java repository_jetspeed.xml
               portal/src/java/org/apache/jetspeed/request
                        RequestContext.java JetspeedRequestContext.java
               portal/src/webapp/WEB-INF/conf/pipelines
                        jetspeed-pipeline.xml portlet-pipeline.xml
               portal   maven.xml
  Added:       portal/src/java/org/apache/jetspeed/capabilities/impl
                        ClientImpl.java CapabilityMapImpl.java
                        JetspeedCapabilities.java MediaTypeImpl.java
                        CapabilityValveImpl.java CapabilityImpl.java
                        MimeTypeImpl.java
               portal/src/test/org/apache/jetspeed/capabilities
                        TestCapability.java
               portal/src/java/org/apache/jetspeed/capabilities
                        CapabilityMap.java Capability.java Client.java
                        Capabilities.java MimeType.java MediaType.java
               portal/src/java/org/apache/jetspeed/capabilities/containers
                        capability-container.groovy
  Removed:     portal/src/java/org/apache/jetspeed/capability/impl
                        MediaTypeImpl.java JetspeedCapabilities.java
                        CapabilityMapImpl.java ClientImpl.java
                        CapabilityImpl.java MimeTypeImpl.java
                        CapabilityValveImpl.java
               portal/src/java/org/apache/jetspeed/capability/containers
                        capability-container.groovy
               portal/src/java/org/apache/jetspeed/capability
                        CapabilityMap.java MediaType.java MimeType.java
                        Capability.java Capabilities.java Client.java
               portal/src/test/org/apache/jetspeed/capability
                        TestCapability.java
  Log:
  move o.a.j.capability to o.a.j.capabilities otherwise we cant fuse j1/j2
  
  PR:
  Obtained from:
  Submitted by:	
  Reviewed by:	
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/impl/ClientImpl.java
  
  Index: ClientImpl.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.jetspeed.capabilities.impl;
  
  import org.apache.jetspeed.capabilities.Client;
  import java.util.Collection;
  
  /**
   * Simple implementation of the ClientRegistry interface.
   *
   * @author <a href="shesmer@raleigh.ibm.com">Stephan Hesmer</a>
   * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: ClientImpl.java,v 1.1 2004/05/25 01:37:11 taylor Exp $
   */
  public class ClientImpl implements Client, java.io.Serializable
  {
      private String userAgentPattern = "";
      private String manufacturer = "";
      private String model = "";
      private String version = "";
      private String name;
      private Collection mimetypes;
      private Collection capabilities;
      private int preferredMimeTypeId;
  
      private int clientId;
  
      public ClientImpl()
      {
      }
  
      /**
       * Implements the equals operation so that 2 elements are equal if
       * all their member values are equal.
       */
      public boolean equals(Object object)
      {
          if (object == null)
          {
              return false;
          }
  
          ClientImpl obj = (ClientImpl) object;
  
          if (userAgentPattern != null)
          {
              if (!userAgentPattern.equals(obj.userAgentPattern))
              {
                  return false;
              }
          } else
          {
              if (obj.userAgentPattern != null)
              {
                  return false;
              }
          }
  
          if (manufacturer != null)
          {
              if (!manufacturer.equals(obj.manufacturer))
              {
                  return false;
              }
          } else
          {
              if (obj.manufacturer != null)
              {
                  return false;
              }
          }
  
          if (model != null)
          {
              if (!model.equals(obj.model))
              {
                  return false;
              }
          } else
          {
              if (obj.model != null)
              {
                  return false;
              }
          }
  
          if (version != null)
          {
              if (!version.equals(obj.version))
              {
                  return false;
              }
          } else
          {
              if (obj.version != null)
              {
                  return false;
              }
          }
  
          if (!mimetypes.contains(obj.mimetypes))
          {
              return false;
          }
  
          if (!capabilities.contains(obj.capabilities))
          {
              return false;
          }
  
          return super.equals(object);
      }
  
      public String getUserAgentPattern()
      {
          return userAgentPattern;
      }
  
      public void setUserAgentPattern(String userAgentPattern)
      {
          this.userAgentPattern = userAgentPattern;
      }
  
      public String getManufacturer()
      {
          return manufacturer;
      }
  
      public void setManufacturer(String name)
      {
          manufacturer = name;
      }
  
      public String getModel()
      {
          return model;
      }
  
      public void setModel(String name)
      {
          model = name;
      }
  
      public String getVersion()
      {
          return version;
      }
  
      public void setVersion(String name)
      {
          version = name;
      }
  
      public Collection getMimetypes()
      {
          return mimetypes;
      }
  
      public void setMimetypes(Collection mimetypes)
      {
          this.mimetypes = mimetypes;
      }
  
      public Collection getCapabilities()
      {
          return capabilities;
      }
  
      public void setCapabilities(Collection capabilities)
      {
          this.capabilities = capabilities;
      }
  
      /**
       * Set Client ID -- Assigns the Client ID
       * @param id
       */
      public void setClientId(int id)
      {
          this.clientId = id;
      }
  
      /**
       * Get Client ID
       * @return Client ID
       */
      public int getClientId()
      {
          return this.clientId;
      }
      /**
       * @return
       */
      public String getName()
      {
          return name;
      }
  
      /**
       * @param string
       */
      public void setName(String string)
      {
          name = string;
      }
  
      /**
       * @return Preferred MimeType ID for Client
       */
      public int getPreferredMimeTypeId()
      {
          return this.preferredMimeTypeId;
      }
  
      /**
       * Set preferred Mimetype ID for Client
       * @param mimeTypeId MimeTypeId
       */
      public void setPreferredMimeTypeId(int mimeTypeId)
      {
          this.preferredMimeTypeId = mimeTypeId;
      }
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/impl/CapabilityMapImpl.java
  
  Index: CapabilityMapImpl.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.jetspeed.capabilities.impl;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.apache.jetspeed.capabilities.CapabilityMap;
  import org.apache.jetspeed.capabilities.Client;
  import org.apache.jetspeed.capabilities.Capability;
  import org.apache.jetspeed.capabilities.MediaType;
  
  import java.util.HashMap;
  import java.util.Iterator;
  import java.util.Map;
  
  import org.apache.jetspeed.capabilities.MimeType;
  
  /**
   * Implementation for capabilityMap interface
   *
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: CapabilityMapImpl.java,v 1.1 2004/05/25 01:37:11 taylor Exp $
   */
  class CapabilityMapImpl implements CapabilityMap
  {
      private static final Log log =
          LogFactory.getLog(JetspeedCapabilities.class);
      
      // Members
      private String useragent; // User agent for request
      private Map mimeTypeMap = new HashMap(); // supported Mimetypes for Agent
      private Map capabilityMap = new HashMap();
      // supported Capabilities for Agent
      private Map mediaTypeMap = new HashMap(); // supported MediaTypes for Agent
      private Client client; // client for Agent
      private MediaType preferredMediaType; // Preferred MediaType for client.
  
      /**
          Sets the client for the CapabilityMap
      */
      public void setClient(Client client)
      {
          this.client = client;
      }
  
      /**
          Returns the Client for the CapabilityMap
      */
      public Client getClient()
      {
          return this.client;
      }
  
      /**
          Add capability to the CapabilityMap
      */
      public void addCapability(Capability capability)
      {
          this.capabilityMap.put(capability.getName(), capability);
      }
  
      /**
          Add Mimetype to the MimetypeMap
      */
      public void addMimetype(MimeType mimetype)
      {
          this.mimeTypeMap.put(mimetype.getName(), mimetype);
      }
  
      /**
          Add MediaType to the MediaTypeMap
      */
      public void addMediaType(MediaType mediatype)
      {
          this.mediaTypeMap.put(mediatype.getName(), mediatype);
      }
  
      /**
      Returns the preferred MIME type for the current user-agent
      */
      public MimeType getPreferredType()
      {
          // Return the value that matches the preferredMimeType defined in the Client
          int prefMimeTypeId = this.client.getPreferredMimeTypeId();
  
          MimeType mt = null;        
          Iterator e = this.mimeTypeMap.values().iterator();
          while (e.hasNext())
          {            
              mt = (MimeType) e.next();
              
              if (mt.getMimetypeId() == prefMimeTypeId)
                  return mt;
          }
          log.error("Could not find preferred Mime Type for " + prefMimeTypeId);        
  
          // Should never reach this point. A preferred value needs to be set
          return null; // TODO: NEVER RETURN NULL
      }
  
      /**
            * Sets the preferred MediaType for this CapabilityMap
            * @param MediaTypeEntry 
          */
      public void setPreferredMediaType(MediaType type)
      {
          this.preferredMediaType = type;
      }
  
      /**
      Returns the preferred media type for the current user-agent
      */
      public MediaType getPreferredMediaType()
      {
          return this.preferredMediaType;
      }
  
      /**
       * Returns an ordered list of supported media-types, from most preferred
       * to least preferred
       */
      public Iterator listMediaTypes()
      {
          return mediaTypeMap.values().iterator();
      }
  
      /**
      Returns the user-agent string
      */
      public String getAgent()
      {
          return this.useragent;
      }
  
      /**
       * set userAgent
       */
      public void setAgent(String userAgent)
      {
          this.useragent = userAgent;
      }
  
      /**
       * Checks to see if the current agent has the specified capability
       */
      public boolean hasCapability(int capability)
      {
          Iterator capabilities = capabilityMap.values().iterator();
          while (capabilities.hasNext())
          {
              if (((Capability) capabilities.next()).getCapabilityId()
                  == capability)
              {
                  return true;
              }
          }
          return false;
      }
  
      /**
       *  Checks to see if the current agent has the specified capability
       */
      public boolean hasCapability(String capability)
      {
          Iterator capabilities = capabilityMap.values().iterator();
          while (capabilities.hasNext())
          {
              if (((Capability) capabilities.next()).getName() == capability)
              {
                  return true;
              }
          }
          return false;
      }
  
      /**
      Get the mime types that this CapabilityMap supports.
      */
      public Iterator getMimeTypes()
      {
          return mimeTypeMap.values().iterator();
      }
  
      /**
      Return true if this CapabilityMap supports the given MimeType
      */
      public boolean supportsMimeType(MimeType mimeType)
      {
          Iterator mimetypes = mimeTypeMap.values().iterator();
          while (mimetypes.hasNext())
          {
              if (((MimeType) mimetypes.next()).getName() == mimeType.getName())
              {
                  return true;
              }
          }
          return false;
      }
  
      /**
       * Return true if this CapabilityMap supports the given media type
       *
       * @param media the name of a media type registered in the
       * MediaType regsitry
       *
       * @return true is the capabilities of this agent at least match those
       * required by the media type
       */
      public boolean supportsMediaType(String media)
      {
          Iterator mediatypes = mediaTypeMap.values().iterator();
          while (mediatypes.hasNext())
          {
              if (((MediaType) mediatypes.next()).getName() == media)
              {
                  return true;
              }
          }
          return false;
      }
  
      /**
       * Create a map -> string representation
       */
      public String toString()
      {
          return "";
      }
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
  
  Index: JetspeedCapabilities.java
  ===================================================================
  /*
   * Copyright 2000-2001,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.jetspeed.capabilities.impl;
  
  import java.util.Collection;
  import java.util.Iterator;
  import java.util.Hashtable;
  import java.util.Properties;
  import java.util.Vector;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  import org.apache.jetspeed.capabilities.Capabilities;
  import org.apache.jetspeed.capabilities.CapabilityMap;
  import org.apache.jetspeed.capabilities.Client;
  import org.apache.jetspeed.capabilities.MediaType;
  import org.picocontainer.Startable;
  
  
  import org.apache.jetspeed.capabilities.Capability;
  import org.apache.jetspeed.capabilities.MimeType;
  import org.apache.jetspeed.components.persistence.store.Filter;
  import org.apache.jetspeed.components.persistence.store.PersistenceStore;
  import org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer;
  import org.apache.jetspeed.components.persistence.store.Transaction;
  
  /**
   * Jetspeed Capabilities
   *
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: JetspeedCapabilities.java,v 1.1 2004/05/25 01:37:11 taylor Exp $
   */
  public class JetspeedCapabilities implements Capabilities, Startable 
  {
      private PersistenceStoreContainer pContainer;
      private String storeName = "jetspeed";
  
      private String originalAlias;
  
      private static final Log log =
          LogFactory.getLog(JetspeedCapabilities.class);
  
      public static final String DEFAULT_AGENT = "Mozilla/4.0";
  
      public static final String AGENT_XML = "agentxml/1.0";
  
      // Cache for the capability maps
      Hashtable capabilityMapCache = new Hashtable();
  
      private Collection clients = null;
  
      private Class clientClass = ClientImpl.class;
      private Class capabilityClass = CapabilityImpl.class;
      private Class mimeTypeClass = MimeTypeImpl.class;
      private Class mediaTypeClass = MediaTypeImpl.class;
  
      public JetspeedCapabilities(PersistenceStoreContainer pContainer)
      {
          this.pContainer = pContainer;        
      }
      
      /**
       * Create a JetspeedProfiler with properties. Expected properties are:
       * 
       * 	   defaultRule   = the default profiling rule
       *     anonymousUser = the name of the anonymous user
       *     storeName = The name of the persistence store component to connect to  
       *     services.profiler.locator.impl = the pluggable Profile Locator impl
       *     services.profiler.principalRule.impl = the pluggable Principal Rule impl
       *     services.profiler.profilingRule.impl = the pluggable Profiling Rule impl
       *      
       * @param pContainer  The persistence store container
       * @param properties  Properties for this component described above
       */
      public JetspeedCapabilities(PersistenceStoreContainer pContainer, Properties properties)
  	{
          this.pContainer = pContainer;
          initModelClasses(properties);
      }
      
      private void initModelClasses(Properties properties)
  	{
          String modelName = "";
          try
          {
  	        if ((modelName = properties.getProperty("client.impl")) != null)
  	        {
  	            clientClass = Class.forName(modelName);
  	        }
  	        if ((modelName = properties.getProperty("capability.impl")) != null)
  	        {
  	            capabilityClass = Class.forName(modelName);
  	        }
  	        if ((modelName = properties.getProperty("mimetype.impl")) != null)
  	        {
  	            mimeTypeClass = Class.forName(modelName);
  	        }
  	        if ((modelName = properties.getProperty("mediatype.impl")) != null)
  	        {
  	            mediaTypeClass = Class.forName(modelName);
  	        }	        	        
  	        
          }
          catch (ClassNotFoundException e)
          {
              log.error("Model class not found: " + modelName);
          }
      }
      
      public void start()
  	{
  	}
      
      public void stop()
  	{
  	}
      
  
      /**
       * @param userAgent Agent from the request
       * @see org.apache.jetspeed.services.capability.CapabilityService#getCapabilityMap(java.lang.String)
       */
      public CapabilityMap getCapabilityMap(String userAgent)
      {        
          CapabilityMap map = null;
          boolean bClientFound = false;
  
          if (userAgent == null)
          {
              userAgent = DEFAULT_AGENT;
          }
  
          // Check the cache if we have already a capability map for
          // the given Agent
          map = (CapabilityMap) capabilityMapCache.get(userAgent);
  
          if (map != null)
          {
              // Entry found
              return map;
          }
  
          while (!bClientFound)
          {
              Client entry = findClient(userAgent);
  
              if (entry == null)
              {
                  if (userAgent.equals(DEFAULT_AGENT))
                  {
                      log.error(
                          "CapabilityMap: Default agent not found in Client Registry !");
  
                      // Stop searching -- event the default userAgent can't be found
                      bClientFound = true;
                  } else
                  {
                      // Retry with the default Agent
                      if (log.isDebugEnabled())
                      {
                          log.debug(
                              "CapabilityMap: useragent "
                                  + userAgent
                                  + "unknown, falling back to default");
                      }
  
                      // Use default Client
                      userAgent = DEFAULT_AGENT;
                  }
              } else
              {
                  // Found Client entry start populating the capability map.
                  map = new CapabilityMapImpl();
  
                  // Add client to CapabilityMap
                  map.setClient(entry);
  
                  // Add capabilities
                  Iterator capabilities = entry.getCapabilities().iterator();
                  while (capabilities.hasNext())
                  {
                      map.addCapability((Capability) capabilities.next());
                  }
  
                  Collection mediatypes =
                      getMediaTypesForMimeTypes(entry.getMimetypes().iterator());
  
                  // Add Mimetypes to map
                  Iterator mimetypes = entry.getMimetypes().iterator();
                  while (mimetypes.hasNext())
                  {
                      map.addMimetype((MimeType) mimetypes.next());
                  }
  
                  Iterator media = mediatypes.iterator();
                  while (media.hasNext())
                  {
                      map.addMediaType((MediaType) media.next());
                  }
  
                  //Set preferred Mimetype
                  MediaType mtEntry =
                      getMediaTypeForMimeType(map.getPreferredType().getName());
  
                  map.setPreferredMediaType(mtEntry);
  
                  // Add map to cache
                  capabilityMapCache.put(userAgent, map);
  
                  return map;
              }
  
          }
  
          return map;
      }
  
      /**
       * Returns the client which matches the given useragent string.
       *
       * @param useragent     the useragent to match
       * @return the found client or null if the user-agent does not match any
       *  defined client
       * @see org.apache.jetspeed.capabilities.CapabilityService#findClient(java.lang.String)
       */
  
      public Client findClient(String userAgent)
      {
          Client clientEntry = null;
          Iterator clients = getClients();
  
          if (log.isDebugEnabled())
          {
              log.debug(
                  "ClientRegistry: Looking for client with useragent :"
                      + userAgent);
          }
  
          while (clients.hasNext())
          {
              Client client = (Client) clients.next();
              if (client.getUserAgentPattern() != null)
              {
                  try
                  {
                      // Java 1.4 has regular expressions build in
                      String exp = client.getUserAgentPattern();
                      //RE r = new RE(client.getUserAgentPattern());
                      //r.setMatchFlags(RE.MATCH_CASEINDEPENDENT);
                      //if (r.match(userAgent))
                      if (userAgent.matches(exp))
                      {
  
                          if (log.isDebugEnabled())
                          {
                              log.debug(
                                  "Client: "
                                      + userAgent
                                      + " matches "
                                      + client.getUserAgentPattern());
                          }
  
                          return client;
                      } else
                      {
                          if (log.isDebugEnabled())
                          {
                              log.debug(
                                  "Client: "
                                      + userAgent
                                      + " does not match "
                                      + client.getUserAgentPattern());
                          }
                      }
                  } catch (java.util.regex.PatternSyntaxException e)
                  {
                      String message =
                          "CapabilityServiceImpl: UserAgentPattern not valid : "
                              + client.getUserAgentPattern()
                              + " : "
                              + e.getMessage();
                      log.error(message, e);
                  }
              }
          }
  
          return clientEntry;
      }
  
      /* 
       * @see org.apache.jetspeed.capabilities.CapabilityService#getClients()
       */
      public Iterator getClients()
      {
          if (null == clients)
          {
              PersistenceStore store = getPersistenceStore();            
              this.clients = store.getExtent(ClientImpl.class);
          }
  
          return this.clients.iterator();
      }
  
      /* 
       * @see org.apache.jetspeed.capabilities.CapabilityService#getMediaTypesForMimeTypes(java.util.Iterator)
       */
      public Collection getMediaTypesForMimeTypes(Iterator mimetypes)
      {
          //Find the MediaType by matching the Mimetype
          PersistenceStore store = getPersistenceStore();
          Filter filter = store.newFilter();        
  
          Vector temp = new Vector();
          // Add Mimetypes to map and create query
          while (mimetypes.hasNext())
          {
              MimeType mt = (MimeType) mimetypes.next();
  
              // Add mimetype to query
              // Note: mimetypes is a member of MediaTypeImpl
              // criteria.addEqualTo("mimetypes.name", mt.getName());
              //stuff.add(new Integer(mt.getMimetypeId()));
              temp.add(mt.getName());
          }
          filter.addIn("mimetypes.name", temp);
  
          
          Object query = store.newQuery(mediaTypeClass, filter);
          
          Collection co = store.getCollectionByQuery(query);
  
          if (co.isEmpty())
          {
              MediaType mt = getMediaType("html");
              Vector v = new Vector();
              v.add(mt);
              return v;
          }
          return co;
      }
  
      /* 
       * @see org.apache.jetspeed.capabilities.CapabilityService#deleteCapabilityMapCache()
       */
      public void deleteCapabilityMapCache()
      {
          capabilityMapCache.clear();
          clients = null;
      }
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.capabilities.CapabilityService#getMediaType(java.lang.String)
       */
      public MediaType getMediaType(String mediaType)
      {
          PersistenceStore store = getPersistenceStore();
          Filter filter = store.newFilter();        
          filter.addEqualTo("name", mediaType);
          Object query = store.newQuery(mediaTypeClass, filter);
          return (MediaType) store.getObjectByQuery(query);
      }
  
      /**
       * getMediaTypeForMimeType
       * @param mimeType to use for lookup
       * @return MediaTypeEntry that matches the lookup in the MEDIATYPE_TO_MIMETYPE table
       */
      public MediaType getMediaTypeForMimeType(String mimeTypeName)
      {               
          //Find the MediaType by matching the Mimetype
          PersistenceStore store = getPersistenceStore();
          
          Filter filter = store.newFilter();        
          filter.addEqualTo("mimetypes.name", mimeTypeName);
          Object query = store.newQuery(mediaTypeClass, filter);        
          Collection mediaTypeCollection = store.getCollectionByQuery(query);                
          Iterator mtIterator = mediaTypeCollection.iterator();
          if (mtIterator.hasNext())
          {
              return (MediaType) mtIterator.next();
          } else
          {
              return null;
          }
      }
      
      protected PersistenceStore getPersistenceStore()
      {
          PersistenceStore store = pContainer.getStoreForThread(storeName);
          Transaction tx = store.getTransaction();
          if (!tx.isOpen())
          {
              tx.begin();
          }
          return store;
      }
      
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/impl/MediaTypeImpl.java
  
  Index: MediaTypeImpl.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.jetspeed.capabilities.impl;
  
  import org.apache.jetspeed.capabilities.MediaType;
  import java.util.Vector;
  import java.util.Collection;
  
  /**
   * Default bean like implementation of MediaTypeEntry interface
   * suitable for serializing with Castor
   *
   * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
   * @version $Id: MediaTypeImpl.java,v 1.1 2004/05/25 01:37:11 taylor Exp $
   */
  public class MediaTypeImpl 
      implements MediaType
  {
      protected String characterSet;
      private Vector capabilities;
      private Collection mimetypes;
      private int mediatypeId;
      private String title;
      private String description;
      
      private String name;    // MediaTypeEntry name
  
      public MediaTypeImpl()
      {}
  
      public MediaTypeImpl(long id,
                                String name,
                                int _hidden,
                                String mimeType,
                                String title,
                                String description,
                                String image,
                                 String role)
      {
           this.mimetypes.add(mimeType);
      }
  
      /**
       * Implements the equals operation so that 2 elements are equal if
       * all their member values are equal.
       */
      public boolean equals(Object object)
      {
          if (object==null)
          {
              return false;
          }
  
          MediaTypeImpl obj = (MediaTypeImpl)object;
  
          if (mimetypes.isEmpty()!= true)
          {
              if ( !mimetypes.contains(obj.getMimetypes().iterator().next()) )
              {
                  return false;
              }
          }
          else
          {
              if (obj.getMimetypes().isEmpty() == false)
              {
                  return false;
              }
          }
  
          if (characterSet!=null)
          {
              if (!characterSet.equals(obj.characterSet))
              {
                  return false;
              }
          }
          else
          {
              if (obj.characterSet!=null)
              {
                  return false;
              }
          }
  
          if (!capabilities.equals(obj.capabilities))
          {
              return false;
          }
  
          return super.equals(object);
      }
      
   
      /** @return the character set associated with this MediaType */
      public String getCharacterSet()
      {
          return this.characterSet;
      }
  
      /** Sets the character set associated with this MediaType */
      public void setCharacterSet( String charSet)
      {
          this.characterSet = charSet;
      }
  
      
      public Vector getCapabilities()
      {
          return this.capabilities;
      }
  
      public void setCapabilities(Vector capabilities)
      {
          this.capabilities = capabilities;
      }
      
      public Collection getMimetypes()
      {
          return this.mimetypes;
      }
      
      public void setMimetypes(Collection mimetypes)
      {
          this.mimetypes = mimetypes;
      }
      
      public void addMimetype(String name)
      {
          if (!mimetypes.contains(name))
          {
              mimetypes.add(name);
          }
      }
  
      public void removeMimetype(String name)
      {
          mimetypes.remove(name);
      }
      
      /**
       * Set MediaType ID -- Assigns ID
       * @param id
       */
      public void setMediatypeId(int id)
      {
          this.mediatypeId = id;
      }
  
      /**
       * Get MediaType ID -- Return ID
       * @return MediaTypeID
       */
      public int getMediatypeId()
      {
          return this.mediatypeId;
      }
      
      /**
        * Set name ob MediaTypeEntry
        */
       public void setName(String name)
       {
           this.name = name;
       }
    
       /**
        * Get name ob MediaTypeEntry
        */
   
       public String getName()
       {
           return this.name;
       }
       
       public String getTitle()
       {
           return this.title;
       }
  
       public void setTitle(String title)
       {
           this.title = title;
       }
       
       public String getDescription()
       {
           return this.description;
       }
  
  
      public void setDescription(String desc)
      {
          this.description = desc;
      }
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/impl/CapabilityValveImpl.java
  
  Index: CapabilityValveImpl.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.jetspeed.capabilities.impl;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.apache.jetspeed.Jetspeed;
  import org.apache.jetspeed.pipeline.PipelineException;
  import org.apache.jetspeed.pipeline.valve.CapabilityValve;
  import org.apache.jetspeed.pipeline.valve.ValveContext;
  import org.apache.jetspeed.profiler.rules.ProfilingRule;
  import org.apache.jetspeed.request.RequestContext;
  import org.apache.jetspeed.capabilities.Capabilities;
  import org.apache.jetspeed.capabilities.CapabilityMap;
  import org.apache.jetspeed.capabilities.MediaType;
  import org.apache.jetspeed.capabilities.MimeType;
  
  /**
   * Invokes the capability mapper in the request pipeline
   *
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: CapabilityValveImpl.java,v 1.1 2004/05/25 01:37:11 taylor Exp $
   */
  public class CapabilityValveImpl implements CapabilityValve
  {
      private static final Log log = LogFactory.getLog(CapabilityValveImpl.class);
      String resourceDefault;        // the default name for a resource
      
      /**
        * Initialize the valve before using in a pipeline.
        */
      public void initialize() throws PipelineException
      {
  
      }
      
      protected Capabilities getComponent()
      {
          return (Capabilities)Jetspeed.getComponentManager().getComponent(Capabilities.class);        
      }
  
      public void invoke(RequestContext request, ValveContext context)
          throws PipelineException
      {
          try
          {
              String requestMediaType = request.getRequestParameter(ProfilingRule.STANDARD_MEDIATYPE);
              String agent = request.getRequest().getHeader("User-Agent"); 
              
              // Connect to CapabilityService
              Capabilities component = getComponent();  
              
              // Get capability map
              CapabilityMap cm = component.getCapabilityMap(agent);
              
              if ( cm == null)
              {
                  log.debug("Couldn't create capability map for agent: " + agent);
              }
              else
              {
                  log.debug("Created Capability map for agent: " + agent);
              }
              
              MediaType mediaType = cm.getPreferredMediaType();                          
              MimeType mimeType = cm.getPreferredType();  
              
              String encoding = request.getRequest().getCharacterEncoding();
              
              
              if (encoding == null)
              {
                  if (mediaType != null && mediaType.getCharacterSet() != null)
                  {
                      encoding = mediaType.getCharacterSet();
                  }
              }
              
              if (log.isDebugEnabled())
              {
                  log.debug("MediaType: " + mediaType.getName());
                  log.debug("Encoding: "  + encoding);
                  log.debug("Mimetype: "  + mimeType.getName());
              }
                                                                              
              // Put the encoding in the request
              request.setCharacterEncoding(encoding);
      
              // Put the CapabilityMap into the request
              request.setCapabilityMap(cm);
              
              // Put the Media Type into the request
              request.setMediaType(mediaType.getName());
              
              // Put the Mime Type into the request
              request.setMimeType(mimeType.getName());
              request.getResponse().setContentType(mimeType.getName());
  
          } 
          catch (Exception e)
          {
              e.printStackTrace();
              throw new PipelineException(e);
          }
          // Pass control to the next Valve in the Pipeline
          context.invokeNext(request);
      }
  
      public String toString()
      {
          return "CapabilityValveImpl";
      }
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/impl/CapabilityImpl.java
  
  Index: CapabilityImpl.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.jetspeed.capabilities.impl;
  
  import org.apache.jetspeed.capabilities.Capability;
  
  /**
   * Capability implementation class.
   *
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: CapabilityImpl.java,v 1.1 2004/05/25 01:37:11 taylor Exp $
   */
  
  public class CapabilityImpl implements Capability
  {
      private int capabilityId;
      private String name;
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.om.registry.Capability#setCapabilityId(int)
       */
      public void setCapabilityId(int id)
      {
          this.capabilityId = id;
      }
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.om.registry.Capability#getCapabilityId()
       */
      public int getCapabilityId()
      {
          return this.capabilityId;
      }
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.om.registry.Capability#setName(java.lang.String)
       */
      public void setName(String name)
      {
          this.name = name;
      }
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.om.registry.Capability#getName()
       */
      public String getName()
      {
          return this.name;
      }
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/impl/MimeTypeImpl.java
  
  Index: MimeTypeImpl.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.jetspeed.capabilities.impl;
  
  import org.apache.jetspeed.capabilities.MimeType;
  
  /**
   * Mimetype implementation class.
   *
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: MimeTypeImpl.java,v 1.1 2004/05/25 01:37:11 taylor Exp $
   */
  
  public class MimeTypeImpl implements MimeType
  {
      private int mimeTypeId;
      private String name;
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.om.registry.MimeType#setMimetypeId(int)
       */
      public void setMimetypeId(int id)
      {
          this.mimeTypeId = id;
      }
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.om.registry.MimeType#getMimetypeId()
       */
      public int getMimetypeId()
      {
          return this.mimeTypeId;
      }
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.om.registry.MimeType#setName(java.lang.String)
       */
      public void setName(String name)
      {
          this.name = name;
      }
  
      /* (non-Javadoc)
       * @see org.apache.jetspeed.om.registry.MimeType#getName()
       */
      public String getName()
      {
          return this.name;
      }
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/capabilities/TestCapability.java
  
  Index: TestCapability.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.jetspeed.capabilities;
  
  import java.util.Iterator;
  
  import junit.framework.Test;
  
  import org.apache.jetspeed.components.AbstractComponentAwareTestCase;
  import org.apache.jetspeed.components.ComponentAwareTestSuite;
  import org.picocontainer.MutablePicoContainer;
  
  /**
   * Test Capability Service
   *
   * @author <a href="roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: TestCapability.java,v 1.1 2004/05/25 01:37:12 taylor Exp $
   */
  public class TestCapability extends AbstractComponentAwareTestCase
  {
      private Capabilities capabilities = null;
      private MutablePicoContainer container;
  
      /**
       * @see org.apache.jetspeed.test.JetspeedTest#overrideProperties(org.apache.commons.configuration.Configuration)
       */
  //    public void overrideProperties(Configuration properties)
  //    {
  //        super.overrideProperties(properties);
  //    }
  
      /**
       * Defines the testcase name for JUnit.
       *
       * @param name the testcase's name.
       */
      public TestCapability(String name)
      {
          super(name);
      }
  
      
      /**
       * Start the tests.
       *
       * @param args the arguments. Not used
       */
      public static void main(String args[])
      {
          junit.awtui.TestRunner.main(
              new String[] { TestCapability.class.getName()});
      }
  
      protected void setUp() throws Exception
      {
          super.setUp();               
          container = (MutablePicoContainer) getContainer();
          capabilities = (Capabilities) container.getComponentInstance(Capabilities.class);        
      }
      
      /**
       * Creates the test suite.
       *
       * @return a test suite (<code>TestSuite</code>) that includes all methods
       *         starting with "test"
       */
      public static Test suite()
      {
          ComponentAwareTestSuite suite = new ComponentAwareTestSuite(TestCapability.class);
          suite.setScript("org/apache/jetspeed/capabilities/containers/capability-container.groovy");
          return suite;
      }
  
      /**
       * Tests categories
       * @throws Exception
       */
      public void testCapability() throws Exception
      {
          assertNotNull("capabilities component is null", capabilities);
  
          // Find specific client -- testing pattern matching
          String userAgent;
          System.out.println("Testing all supported Clients...");
  
          userAgent = "Opera/7.0";
          System.out.println("Find pattern: " + userAgent);
          CapabilityMap cm = capabilities.getCapabilityMap(userAgent);
          assertNotNull("getCapabilityMap is null", cm);
          capabilityMapReport(cm);
  
          userAgent = "Mozilla/4.0";
          System.out.println("Find pattern: " + userAgent);
          cm = capabilities.getCapabilityMap(userAgent);
          assertNotNull("getCapabilityMap is null", cm);
          capabilityMapReport(cm);
  
          userAgent = "MSIE 5.0";
          System.out.println("Find pattern: " + userAgent);
          cm = capabilities.getCapabilityMap(userAgent);
          assertNotNull("getCapabilityMap is null", cm);
          capabilityMapReport(cm);
  
          userAgent = "Mozilla/5.0";
          System.out.println("Find pattern: " + userAgent);
          cm = capabilities.getCapabilityMap(userAgent);
          assertNotNull("getCapabilityMap is null", cm);
          capabilityMapReport(cm);
  
          userAgent = "Lynx";
          System.out.println("Find pattern: " + userAgent);
          cm = capabilities.getCapabilityMap(userAgent);
          assertNotNull("getCapabilityMap is null", cm);
          capabilityMapReport(cm);
  
          userAgent = "Nokia";
          System.out.println("Find pattern: " + userAgent);
          cm = capabilities.getCapabilityMap(userAgent);
          assertNotNull("getCapabilityMap is null", cm);
          capabilityMapReport(cm);
  
      }
  
      private void capabilityMapReport(CapabilityMap cm)
      {
          MediaType mediaType = cm.getPreferredMediaType();
          assertNotNull("Preferred MediaType is null", mediaType);
  
          MimeType mimeTypeObj = cm.getPreferredType();
          assertNotNull("Preferred MimeType is null", mimeTypeObj);
          String mimeType = mimeTypeObj.getName();
  
          String encoding = mediaType.getCharacterSet();
  
          System.out.println("Preferred MediaType = " + mediaType.getName());
          System.out.println("Preferred Mimetype = " + mimeType);
          System.out.println("Encoding = " + encoding);
          System.out.println("Supported MediaTypes");
          Iterator cmIterator = cm.listMediaTypes();
  
          while (cmIterator.hasNext())
          {
              System.out.println(((MediaType) cmIterator.next()).getName());
          }
  
          System.out.println("Supported MimeTypes");
          Iterator mtIterator = cm.getMimeTypes();
  
          while (mtIterator.hasNext())
          {
              System.out.println(((MimeType) mtIterator.next()).getName());
          }
      }
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/CapabilityMap.java
  
  Index: CapabilityMap.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.jetspeed.capabilities;
  
  import java.util.Iterator;
  
  /**
   * This interface provides lookup features on the capabilities supported
   * by a client user agent.
   *
   * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
   * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
   * @version $Id: CapabilityMap.java,v 1.1 2004/05/25 01:37:12 taylor Exp $
   */
  public interface CapabilityMap
  {
  
      /**
       * Sets the client for the CapabilityMap
       *
       * @param client The client associated with this map
       */
      public void setClient(Client client);
  
      /**
       *  Returns the Client for the CapabilityMap
       *
       * @return The client associated with this map
       */
      public Client getClient();
  
      /**
       * Add capability to the CapabilityMap
       *
       * @param capability
       */
      public void addCapability(Capability capability);
  
      /**
       * Add Mimetype to the MimetypeMap
       *
       * @param mimetype
       */
      public void addMimetype(MimeType mimetype);
  
      /**
       * Add MediaType to the MediaTypeMap
       *
       * @param Mediatype to add
       */
      public void addMediaType(MediaType mediatype);
  
      /**
       * @return Returns the preferred MIME type for the current user-agent
       */
      public MimeType getPreferredType();
  
      /**
       * @return Returns the preferred media type for the current user-agent
       */
      public MediaType getPreferredMediaType();
  
      /**
       * Sets the preferred MediaType for this CapabilityMap
       * @param MediaTypeEntry
       */
      public void setPreferredMediaType(MediaType type);
  
      /**
       * Returns an ordered list of supported media-types, from most preferred
       * to least preferred
       */
      public Iterator listMediaTypes();
  
      /**
       * @return Returns the user-agent string
       */
      public String getAgent();
  
      /**
       * @parm userAgent Agent from the request
       *
       * Set the userAgent in the capabilityMap
       */
      public void setAgent(String userAgent);
  
      /**
       * @param CApabilityID
       * @return Returns true if the current agent has the specified capabilityID
       */
      public boolean hasCapability(int cap);
  
      /**
       * @param Capability
       * @return returns true if the current agent has the specified capability
       */
      public boolean hasCapability(String capability);
  
      /**
       * Get the mime types that this CapabilityMap supports.
       * @return Returns an Iterator over the MimeType map
       */
      public Iterator getMimeTypes();
  
      /**
       * @param  MimeType
       * @return Return true if this CapabilityMap supports the given MimeType
       */
      public boolean supportsMimeType(MimeType mimeType);
  
      /**
       * Return true if this CapabilityMap supports the given media type
       *
       * @param media the name of a media type registered in the
       * MediaType regsitry
       *
       * @return true is the capabilities of this agent at least match those
       * required by the media type
       */
      public boolean supportsMediaType(String media);
  
      /**
       * @return Create a map -> string representation
       */
      public String toString();
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/Capability.java
  
  Index: Capability.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.jetspeed.capabilities;
  
  /**
   * Capability class.
   *
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: Capability.java,v 1.1 2004/05/25 01:37:12 taylor Exp $
   */
  public interface Capability
  {
      /**
       * Set CapabilityId
       * 
       * @param id
       */
      public void setCapabilityId(int id);
  
      /**
       * Get CapabilityId
       * 
       * @return capabilityId
       */
      public int getCapabilityId();
  
      /**
       * Set Capability name
       * 
       * @param name
       */
      public void setName(String name);
  
      /**
       * Get CapabilityId
       * 
       * @return capability string
       */
      public String getName();
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/Client.java
  
  Index: Client.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.jetspeed.capabilities;
  
  import java.util.Collection;
  
  /**
   * <P>
   * The <CODE>ClientEntry</CODE> interface represents one client inside
   * of the client registry. It is accessed by the portlet container
   * to get information about the clients.
   * </P>
   *
   * @author <a href="shesmer@raleigh.ibm.com">Stephan Hesmer</a>
   * @author <a href="raphael@apache.org">RaphaŽl Luta</a>
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   */
  public interface Client
  {
      /**
       * Set Client ID -- Assigns the Client ID
       * @param id
       */
      public void setClientId(int id);
  
      /**
       * Get Client ID
       * @return Client ID
       */
      public int getClientId();
  
      /**
       * Returns the pattern parameter of this client. The pattern is used
       * to match a client to the user agent used to access the portal. If
       * the pattern matches the user agent string, this client is recognized
       * as the one the user is currently working with.
       *
       * @return the pattern of this client
       */
      public String getUserAgentPattern();
  
      /**
       * Sets the pattern used to match the user agent.
       *
       * @param useragentpattern
       *               the new pattern
       */
      public void setUserAgentPattern(String useragentpattern);
  
      /**
       * Returns the manufacturer of this client
       *
       * @return the manufacturer of this client
       */
      public String getManufacturer();
  
      /**
       * Sets the new manufacturer of this client
       *
       * @param name   the new manufacturer
       */
      public void setManufacturer(String name);
  
      /**
       * Returns the model of this client
       *
       * @return the model of this client
       */
      public String getModel();
  
      /**
       * Sets the new model of this client
       *
       * @param name   the new model
       */
      public void setModel(String name);
  
      /**
       * Returns the version of this client
       *
       * @return the version of this client
       */
      public String getVersion();
  
      /**
       * Sets the new version of this client
       *
       * @param name   the new version
       */
      public void setVersion(String name);
  
      /**
       * Returns all supported mimetypes as <CODE>MimeTypeMap</CODE>.
       * The <CODE>MimeTypeMap</CODE> contains all mimetypes in decreasing
       * order of importance.
       *
       * @return the MimeTypeMap
       * @see MimeTypeMap
       */
      public Collection getMimetypes();
  
      /**
       * Set MimeTypes
       * @param mimetypes
       */
      public void setMimetypes(Collection mimetypes);
  
      String getName();
      void setName(String name);
  
      /**
       * Returns all supported capablities as <CODE>CapabilityMap</CODE>.
       * The <CODE>CapabilityMap</CODE> contains all capabilities in arbitrary
       * order.
       *
       * @return the CapabilityMap
       * @see CapabilityMap
       */
      public Collection getCapabilities();
  
      /**
       * Assigns a list of capabilities
       * @param capabilities
       */
      public void setCapabilities(Collection capabilities);
  
      /**
       * getPreferredMimeTypeId
       * @return mimeTypeId
       */
      public int getPreferredMimeTypeId();
  
      /**
       * setPreferredMimeTypeId
       * @param mimeTypeId to be set as preferred mimeType
       */
      public void setPreferredMimeTypeId(int mimeTypeId);
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/Capabilities.java
  
  Index: Capabilities.java
  ===================================================================
  /*
   * Copyright 2000-2001,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.jetspeed.capabilities;
  
  import java.util.Collection;
  import java.util.Iterator;
  
  /**
   * Capabilities Component Interface
   *
   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
   * @version $Id: Capabilities.java,v 1.1 2004/05/25 01:37:12 taylor Exp $
   */
  public interface Capabilities 
  {
  
      /**
       * Creates a Capability Map with Capabilities, Mimetypes and mediaTypes for the given UserAgentPattern
       * @param userAgent Agent from the request
       * @return CapabilityMap populated with Capabilities, Mimetypes and Mediatype
       * that match the userAgent
       */
      CapabilityMap getCapabilityMap(String userAgent);
  
      /**
       * Obtain an iterator of all existing clients.
       * @return Returns an iterator for all existing Clients
       */
      Iterator getClients();
  
      /**
       * Finds a client for a given userAgentPattern
       * @param userAgent
       * @return Client that matches agent or null if no match is found
       *
       */
      Client findClient(String userAgent);
  
      /**
       * Returns a collection of MediaTypes that matches the MimeTypes defined in the mimetype parameter
       * @param Mimetype
       *
       * @return Collection of Mediatypes that matches the mimetypes
       */
      Collection getMediaTypesForMimeTypes(Iterator mimetypes);
  
      /**
       * Clears CapabilityMap cache
       * TODO: Roger, why is this on the public interface. It seems to be impl specific 
       */
      void deleteCapabilityMapCache();
  
      /**
       * Given a media type string, look up the corresponding media type object.
       * 
       * @param mediaType The string representation of a media type.
       * @return The found media type object or if not found, null.
       */
      MediaType getMediaType(String mediaType);
  
      /**
       * Given a Mimetype string lookup the corresponding media type object
       * @param mimeTypeName to use for lookup
       * @return MediaTypeEntry that matches the lookup in the MEDIATYPE_TO_MIMETYPE table
       */
      public MediaType getMediaTypeForMimeType(String mimeTypeName);
  
      
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/MimeType.java
  
  Index: MimeType.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.jetspeed.capabilities;
  
  /**
   * MimeType
   *
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @version $Id: MimeType.java,v 1.1 2004/05/25 01:37:12 taylor Exp $
   */
  public interface MimeType
  {
      /**
       * Set MimetypeId
       * 
       * @param id
       */
      public void setMimetypeId(int id);
      
      /**
       * Get CapabilityId
       * 
       * @return capabilityId
       */
      public int getMimetypeId();
      
      /**
       * Set Capability name
       * 
       * @param name
       */
      public void setName(String name);
      
      /**
       * Get CapabilityId
       * 
       * @return capability string
       */
      public String getName();    
  }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/MediaType.java
  
  Index: MediaType.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.jetspeed.capabilities;
  
  import java.util.Vector;
  import java.util.Collection;
  
  /**
   * This entry describes all the properties that should be present in
   * a RegistryEntry describing a MediaType
   *
   * FIXME: we should add some additionnal attrbutes for separating 2 versions
   * of the same mime type
   *
   * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
   * @version $Id: MediaType.java,v 1.1 2004/05/25 01:37:12 taylor Exp $
   */
  public interface MediaType
  {
      /**
       * Set MediaType ID -- Assigns ID
       * @param id
       */
      public void setMediatypeId(int id);
  
      /**
       * Get MediaType ID -- Return ID
       * @return MediaTypeID
       */
      public int getMediatypeId();
  
      /** @return the character set associated with this MediaType */
      public String getCharacterSet();
  
      /** Sets the character set associated with this MediaType */
      public void setCharacterSet(String charSet);
  
      /**
       * Returns all supported capablities as <CODE>CapabilityMap</CODE>.
       * The <CODE>CapabilityMap</CODE> contains all capabilities in arbitrary
       * order.
       *
       * @return a vector of capabilities
       */
      public Vector getCapabilities();
  
      /**
       * Set the capabilities
       * @param vector of capabilities
       */
      public void setCapabilities(Vector capabilities);
  
      /**
      * Returns all supported mimetypes as <CODE>MimeTypeMap</CODE>.
      * The <CODE>MimeTypeMap</CODE> contains all mimetypes in decreasing
      * order of importance.
      *
      * @return the MimeTypeMap
      * @see MimeTypeMap
      */
      public Collection getMimetypes();
  
      /**
       * Set mime types
       * @param mimetypes
       */
      public void setMimetypes(Collection mimetypes);
  
      /**
       * Removes the MimeType to the MimeType map 
       * @param name of MimeType to remove
       */
  
      public void removeMimetype(String name);
  
      /**
       * Add MimeType to the MimeType map 
       * @param name
       */
      public void addMimetype(String name);
  
      /**
       * Set Name of MediaType
       * @param name Name of MediaType
       */
      public void setName(String name);
  
      /**
       * Get Name of MediaType
       * @return Name of MediaType
       */
      public String getName();
  
      /**
       * Get Title of MediaType
       * @return Title of MediaType
       */
      public String getTitle();
  
      /**
       * Set MediaType title
       * @param title
       */
      public void setTitle(String title);
  
      /**
       * Get MediaType description
       * @return Returns description of MediaType
       */
      public String getDescription();
  
      /**
       * Set description of MediaType
       * @param desc Description string
       */
      public void setDescription(String desc);
  }
  
  
  
  1.34      +2 -2      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/assembly/jetspeed.groovy
  
  Index: jetspeed.groovy
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/assembly/jetspeed.groovy,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- jetspeed.groovy	19 May 2004 02:17:49 -0000	1.33
  +++ jetspeed.groovy	25 May 2004 01:37:12 -0000	1.34
  @@ -35,8 +35,8 @@
   import org.apache.jetspeed.cache.file.FileCache
   import org.apache.jetspeed.profiler.Profiler
   import org.apache.jetspeed.profiler.impl.JetspeedProfiler
  -import org.apache.jetspeed.capability.Capabilities
  -import org.apache.jetspeed.capability.impl.JetspeedCapabilities
  +import org.apache.jetspeed.capabilities.Capabilities
  +import org.apache.jetspeed.capabilities.impl.JetspeedCapabilities
   
   import org.apache.jetspeed.aggregator.PageAggregator
   import org.apache.jetspeed.aggregator.impl.PageAggregatorImpl
  
  
  
  1.15      +2 -2      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerTool.java
  
  Index: JetspeedPowerTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerTool.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JetspeedPowerTool.java	11 May 2004 03:54:18 -0000	1.14
  +++ JetspeedPowerTool.java	25 May 2004 01:37:12 -0000	1.15
  @@ -39,7 +39,7 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.Jetspeed;
   import org.apache.jetspeed.aggregator.ContentDispatcher;
  -import org.apache.jetspeed.capability.CapabilityMap;
  +import org.apache.jetspeed.capabilities.CapabilityMap;
   import org.apache.jetspeed.components.ComponentManager;
   import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
   import org.apache.jetspeed.container.session.NavigationalState;
  
  
  
  1.3       +8 -8      jakarta-jetspeed-2/portal/src/java/repository_jetspeed.xml
  
  Index: repository_jetspeed.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/repository_jetspeed.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- repository_jetspeed.xml	18 Mar 2004 19:59:12 -0000	1.2
  +++ repository_jetspeed.xml	25 May 2004 01:37:12 -0000	1.3
  @@ -22,7 +22,7 @@
      - M E D I A T Y P E
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.capability.impl.MediaTypeImpl"
  +   	  class="org.apache.jetspeed.capabilities.impl.MediaTypeImpl"
      	  table="MEDIA_TYPE"
      >
         
  @@ -60,7 +60,7 @@
         
         <collection-descriptor
             name="capabilities"
  -          element-class-ref="org.apache.jetspeed.capability.impl.CapabilityImpl"
  +          element-class-ref="org.apache.jetspeed.capabilities.impl.CapabilityImpl"
    
             indirection-table="CLIENT_TO_CAPABILITY"
          >
  @@ -70,7 +70,7 @@
          
          <collection-descriptor
             name="mimetypes"
  -          element-class-ref="org.apache.jetspeed.capability.impl.MimeTypeImpl"
  +          element-class-ref="org.apache.jetspeed.capabilities.impl.MimeTypeImpl"
    
             indirection-table="MEDIATYPE_TO_MIMETYPE"
          >
  @@ -84,7 +84,7 @@
      - C L I E N T
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.capability.impl.ClientImpl"
  +   	  class="org.apache.jetspeed.capabilities.impl.ClientImpl"
      	  table="CLIENT"
      >
           <field-descriptor
  @@ -133,7 +133,7 @@
         
         <collection-descriptor
             name="capabilities"
  -          element-class-ref="org.apache.jetspeed.capability.impl.CapabilityImpl"
  +          element-class-ref="org.apache.jetspeed.capabilities.impl.CapabilityImpl"
    
             indirection-table="CLIENT_TO_CAPABILITY"
          >
  @@ -143,7 +143,7 @@
          
          <collection-descriptor
             name="mimetypes"
  -          element-class-ref="org.apache.jetspeed.capability.impl.MimeTypeImpl"
  +          element-class-ref="org.apache.jetspeed.capabilities.impl.MimeTypeImpl"
    
             indirection-table="CLIENT_TO_MIMETYPE"
          >
  @@ -157,7 +157,7 @@
      - M I M E T Y P E 
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.capability.impl.MimeTypeImpl"
  +   	  class="org.apache.jetspeed.capabilities.impl.MimeTypeImpl"
      	  table="MIMETYPE"
      >
           <field-descriptor
  @@ -180,7 +180,7 @@
      - C A P A B I L I T Y
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.capability.impl.CapabilityImpl"
  +   	  class="org.apache.jetspeed.capabilities.impl.CapabilityImpl"
      	  table="CAPABILITY"
      >
           <field-descriptor
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/capabilities/containers/capability-container.groovy
  
  Index: capability-container.groovy
  ===================================================================
  /*
   * 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.
   */
  
  import org.picocontainer.defaults.DefaultPicoContainer
  import org.picocontainer.ComponentAdapter
  import org.picocontainer.defaults.ConstructorComponentAdapter
  import org.picocontainer.Parameter
  import org.picocontainer.defaults.ConstantParameter
  import org.picocontainer.defaults.ComponentParameter
  import org.hsqldb.jdbcDriver
  import org.apache.jetspeed.components.jndi.JNDIComponent
  import org.apache.jetspeed.components.jndi.TyrexJNDIComponent
  import org.apache.jetspeed.components.datasource.BoundDBCPDatasourceComponent
  import org.apache.jetspeed.components.datasource.DatasourceComponent
  import org.apache.commons.pool.impl.GenericObjectPool
  import org.apache.jetspeed.components.persistence.store.ojb.OJBTypeIntializer
  // import org.apache.jetspeed.components.persistence.store.ojb.otm.OTMStoreImpl
  import org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore
  import org.apache.jetspeed.components.persistence.store.impl.DefaultPersistenceStoreContainer
  import org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer
  
  import org.apache.jetspeed.capabilities.Capabilities
  import org.apache.jetspeed.capabilities.impl.JetspeedCapabilities
  
  import java.io.File
  import java.util.Properties
  
  // create the root container
  container = new DefaultPicoContainer()
  
  // This JNDI component helps us publish the datasource
  Class jndiClass = JNDIComponent
  JNDIComponent jndiImpl = new TyrexJNDIComponent()
  container.registerComponentInstance(jndiClass, jndiImpl)
  
  Class dsClass = DatasourceComponent
  String url = System.getProperty("org.apache.jetspeed.database.url")
  String driver = System.getProperty("org.apache.jetspeed.database.driver")
  String user = System.getProperty("org.apache.jetspeed.database.user")
  String password = System.getProperty("org.apache.jetspeed.database.password")
  
  if(url != null)
  {
      container.registerComponentInstance(dsClass, new BoundDBCPDatasourceComponent(user, password, driver, url, 20, 5000, GenericObjectPool.WHEN_EXHAUSTED_GROW, true, "jetspeed", jndiImpl))
  }
  
  //
  // Persistence
  PersistenceContainer pContainer = new DefaultPersistenceStoreContainer(300000, 10000)
  Class pContainerClass = Class.forName("org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer")
  
  // Parameter[] storeParams = new Parameter[] {new ConstantParameter("jetspeed")}
  
  
  
  // ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", OTMStoreClass, new Parameter[] {new ConstantParameter("jetspeed")})
  ComponentAdapter ca = new ConstructorComponentAdapter("jetspeed", PBStore, new Parameter[] {new ConstantParameter("jetspeed")})
  
  pContainer.registerComponent(ca)
  
  container.registerComponentInstance(pContainerClass, pContainer);
  
  //
  // Capabilities
  //
  container.registerComponentInstance(Capabilities, new JetspeedCapabilities(pContainer))
  
  return container
  
  
  1.14      +2 -2      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/RequestContext.java
  
  Index: RequestContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/RequestContext.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- RequestContext.java	19 May 2004 02:16:04 -0000	1.13
  +++ RequestContext.java	25 May 2004 01:37:12 -0000	1.14
  @@ -24,7 +24,7 @@
   import javax.servlet.http.HttpServletResponse;
   
   import org.apache.jetspeed.aggregator.ContentDispatcher;
  -import org.apache.jetspeed.capability.CapabilityMap;
  +import org.apache.jetspeed.capabilities.CapabilityMap;
   import org.apache.jetspeed.container.session.NavigationalState;
   import org.apache.jetspeed.container.url.PortalURL;
   import org.apache.jetspeed.profiler.ProfileLocator;
  
  
  
  1.19      +2 -2      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java
  
  Index: JetspeedRequestContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- JetspeedRequestContext.java	19 May 2004 02:15:36 -0000	1.18
  +++ JetspeedRequestContext.java	25 May 2004 01:37:12 -0000	1.19
  @@ -28,7 +28,7 @@
   import org.apache.jetspeed.aggregator.ContentDispatcher;
   import org.apache.jetspeed.om.page.Page;
   import org.apache.jetspeed.services.factory.FactoryManager;
  -import org.apache.jetspeed.capability.CapabilityMap;
  +import org.apache.jetspeed.capabilities.CapabilityMap;
   import org.apache.jetspeed.container.session.NavigationalState;
   import org.apache.jetspeed.container.session.NavigationalStateComponent;
   import org.apache.jetspeed.container.url.PortalURL;
  
  
  
  1.6       +1 -1      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/pipelines/jetspeed-pipeline.xml
  
  Index: jetspeed-pipeline.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/pipelines/jetspeed-pipeline.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jetspeed-pipeline.xml	8 May 2004 01:20:31 -0000	1.5
  +++ jetspeed-pipeline.xml	25 May 2004 01:37:12 -0000	1.6
  @@ -20,7 +20,7 @@
         <className>org.apache.jetspeed.localization.impl.LocalizationValveImpl</className>
       </valveDescriptor>
       <valveDescriptor>
  -      <className>org.apache.jetspeed.capability.impl.CapabilityValveImpl</className>
  +      <className>org.apache.jetspeed.capabilities.impl.CapabilityValveImpl</className>
       </valveDescriptor>
       <valveDescriptor>
         <className>org.apache.jetspeed.security.impl.SecurityValveImpl</className>
  
  
  
  1.3       +1 -1      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/pipelines/portlet-pipeline.xml
  
  Index: portlet-pipeline.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/pipelines/portlet-pipeline.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- portlet-pipeline.xml	18 Mar 2004 19:36:14 -0000	1.2
  +++ portlet-pipeline.xml	25 May 2004 01:37:12 -0000	1.3
  @@ -20,7 +20,7 @@
         <className>org.apache.jetspeed.localization.impl.LocalizationValveImpl</className>
       </valveDescriptor>
       <valveDescriptor>
  -      <className>org.apache.jetspeed.capability.impl.CapabilityValveImpl</className>
  +      <className>org.apache.jetspeed.capabilities.impl.CapabilityValveImpl</className>
       </valveDescriptor>
       <valveDescriptor>
         <className>org.apache.jetspeed.security.impl.SecurityValveImpl</className>
  
  
  
  1.79      +1 -1      jakarta-jetspeed-2/portal/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/maven.xml,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- maven.xml	24 May 2004 17:53:18 -0000	1.78
  +++ maven.xml	25 May 2004 01:37:12 -0000	1.79
  @@ -20,7 +20,7 @@
            xmlns:maven="jelly:maven">
   
     <!-- Target of maven test:single test -->
  -<property name='testcase' value='org.apache.jetspeed.deployment.TestSimpleDeployment'/>
  +<property name='testcase' value='org.apache.jetspeed.capabilities.TestCapability'/>
   
   <preGoal name="java:prepare-filesystem">
    	<echo message="====================================" />
  
  
  

---------------------------------------------------------------------
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