weaver 2005/01/04 07:55:09
Modified: jetspeed-api/src/java/org/apache/jetspeed/capabilities
Capabilities.java
Added: jetspeed-api/src/java/org/apache/jetspeed/capabilities
UnableToBuildCapabilityMapException.java
Log:
Throw exception if capabilitied could not be nuilt instead of returning null.
Revision Changes Path
1.2 +4 -3
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/capabilities/Capabilities.java
Index: Capabilities.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/capabilities/Capabilities.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Capabilities.java 28 May 2004 18:51:55 -0000 1.1
+++ Capabilities.java 4 Jan 2005 15:55:08 -0000 1.2
@@ -31,9 +31,10 @@
* 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
+ * that match the userAgent. Never returns <code>null</code>
+ * @throws UnableToBuildCapabilityMapException If a capability could
not be created
*/
- CapabilityMap getCapabilityMap(String userAgent);
+ CapabilityMap getCapabilityMap(String userAgent) throws
UnableToBuildCapabilityMapException;
/**
* Obtain an iterator of all existing clients.
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/capabilities/UnableToBuildCapabilityMapException.java
Index: UnableToBuildCapabilityMapException.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 org.apache.jetspeed.exception.JetspeedException;
/**
* <p>
* UnableToBuildCapabilityMapException
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: UnableToBuildCapabilityMapException.java,v 1.1 2005/01/04
15:55:08 weaver Exp $
*
*/
public class UnableToBuildCapabilityMapException extends JetspeedException
{
/**
*
*/
public UnableToBuildCapabilityMapException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public UnableToBuildCapabilityMapException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public UnableToBuildCapabilityMapException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public UnableToBuildCapabilityMapException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]