TILESSB-38
Fixed tiles-request-portlet code style.
git-svn-id: https://svn.apache.org/repos/asf/tiles/sandbox/trunk/tiles-request@1066849 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/ActionPortletRequest.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/ActionPortletRequest.java
index 2062255..e927788 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/ActionPortletRequest.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/ActionPortletRequest.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
import javax.portlet.ActionRequest;
@@ -8,8 +28,21 @@
import org.apache.tiles.request.portlet.delegate.StateAwareRequestDelegate;
import org.apache.tiles.request.portlet.delegate.StateAwareResponseDelegate;
+/**
+ * Portlet request for an {@link ActionRequest}.
+ *
+ * @version $Rev$ $Date$
+ */
public class ActionPortletRequest extends PortletRequest {
+ /**
+ * Constructor.
+ *
+ * @param applicationContext The application context.
+ * @param context The portlet context.
+ * @param request The portlet request.
+ * @param response The portlet response.
+ */
public ActionPortletRequest(ApplicationContext applicationContext,
PortletContext context, ActionRequest request, ActionResponse response) {
super(applicationContext, context, request, response,
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/EventPortletRequest.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/EventPortletRequest.java
index 81f68c6..0855375 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/EventPortletRequest.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/EventPortletRequest.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
import javax.portlet.EventRequest;
@@ -8,8 +28,21 @@
import org.apache.tiles.request.portlet.delegate.StateAwareRequestDelegate;
import org.apache.tiles.request.portlet.delegate.StateAwareResponseDelegate;
+/**
+ * Portlet request for an {@link EventRequest}.
+ *
+ * @version $Rev$ $Date$
+ */
public class EventPortletRequest extends PortletRequest {
+ /**
+ * Constructor.
+ *
+ * @param applicationContext The application context.
+ * @param context The portlet context.
+ * @param request The portlet request.
+ * @param response The portlet response.
+ */
public EventPortletRequest(ApplicationContext applicationContext,
PortletContext context, EventRequest request,
EventResponse response) {
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/PortletRequest.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/PortletRequest.java
index 1f276af..1d02b31 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/PortletRequest.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/PortletRequest.java
@@ -51,6 +51,9 @@
*/
public class PortletRequest extends AbstractClientRequest {
+ /**
+ * The native available scopes.
+ */
private static final String[] SCOPES = {"request", "portletSession", "session", "application"};
/**
@@ -76,6 +79,9 @@
*/
protected javax.portlet.PortletRequest request = null;
+ /**
+ * The delegate to get information about parameters.
+ */
protected RequestDelegate requestDelegate;
@@ -91,6 +97,9 @@
*/
protected PortletResponse response = null;
+ /**
+ * The delegate to get information from a response (output stream, writer, etc.).
+ */
protected ResponseDelegate responseDelegate;
@@ -154,6 +163,11 @@
return (this.response);
}
+ /**
+ * Returns the portlet context.
+ *
+ * @return The portlet context.
+ */
public PortletContext getPortletContext() {
return context;
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/RenderPortletRequest.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/RenderPortletRequest.java
index f1dad18..0eb5117 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/RenderPortletRequest.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/RenderPortletRequest.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
import javax.portlet.PortletContext;
@@ -8,8 +28,21 @@
import org.apache.tiles.request.portlet.delegate.MimeResponseDelegate;
import org.apache.tiles.request.portlet.delegate.PortletRequestDelegate;
+/**
+ * Portlet request for a {@link RenderRequest}.
+ *
+ * @version $Rev$ $Date$
+ */
public class RenderPortletRequest extends PortletRequest {
+ /**
+ * Constructor.
+ *
+ * @param applicationContext The application context.
+ * @param context The portlet context.
+ * @param request The portlet request.
+ * @param response The portlet response.
+ */
public RenderPortletRequest(ApplicationContext applicationContext,
PortletContext context, RenderRequest request,
RenderResponse response) {
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/ResourcePortletRequest.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/ResourcePortletRequest.java
index c745c34..7870287 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/ResourcePortletRequest.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/ResourcePortletRequest.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
import javax.portlet.PortletContext;
@@ -8,8 +28,21 @@
import org.apache.tiles.request.portlet.delegate.MimeResponseDelegate;
import org.apache.tiles.request.portlet.delegate.PortletRequestDelegate;
+/**
+ * Portlet request for a {@link ResourceRequest}.
+ *
+ * @version $Rev$ $Date$
+ */
public class ResourcePortletRequest extends PortletRequest {
+ /**
+ * Constructor.
+ *
+ * @param applicationContext The application context.
+ * @param context The portlet context.
+ * @param request The portlet request.
+ * @param response The portlet response.
+ */
public ResourcePortletRequest(ApplicationContext applicationContext,
PortletContext context, ResourceRequest request,
ResourceResponse response) {
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/MimeResponseDelegate.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/MimeResponseDelegate.java
index 2d0f973..f9b6ac4 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/MimeResponseDelegate.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/MimeResponseDelegate.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
import java.io.IOException;
@@ -7,10 +27,23 @@
import javax.portlet.MimeResponse;
+/**
+ * Response delegate in case of {@link MimeResponse}.
+ *
+ * @version $Rev$ $Date$
+ */
public class MimeResponseDelegate implements ResponseDelegate {
+ /**
+ * The response.
+ */
private MimeResponse response;
+ /**
+ * Constructor.
+ *
+ * @param response The response.
+ */
public MimeResponseDelegate(MimeResponse response) {
this.response = response;
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/PortletRequestDelegate.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/PortletRequestDelegate.java
index 25c6192..cb7ff69 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/PortletRequestDelegate.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/PortletRequestDelegate.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
import java.util.Map;
@@ -7,8 +27,16 @@
import org.apache.tiles.request.collection.ReadOnlyEnumerationMap;
import org.apache.tiles.request.portlet.extractor.ParameterExtractor;
+/**
+ * Request delegate in case of simple Portlet request.
+ *
+ * @version $Rev$ $Date$
+ */
public class PortletRequestDelegate implements RequestDelegate {
+ /**
+ * The request.
+ */
private PortletRequest request;
/**
@@ -23,6 +51,11 @@
*/
private Map<String, String[]> paramValues = null;
+ /**
+ * Constructor.
+ *
+ * @param request The request.
+ */
public PortletRequestDelegate(PortletRequest request) {
this.request = request;
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/RequestDelegate.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/RequestDelegate.java
index ccba49b..e7b9e97 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/RequestDelegate.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/RequestDelegate.java
@@ -1,10 +1,45 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
import java.util.Map;
+/**
+ * Exposes the parameters of a portlet request, if available.
+ *
+ * @version $Rev$ $Date$
+ */
public interface RequestDelegate {
+ /**
+ * The parameters, as single values.
+ *
+ * @return The parameters.
+ */
Map<String, String> getParam();
+ /**
+ * The parameters, with values as array of strings.
+ *
+ * @return The parameters.
+ */
Map<String, String[]> getParamValues();
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/ResponseDelegate.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/ResponseDelegate.java
index 88d2fb7..b7afb5a 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/ResponseDelegate.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/ResponseDelegate.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
import java.io.IOException;
@@ -5,15 +25,48 @@
import java.io.PrintWriter;
import java.io.Writer;
+/**
+ * Exposes features of a response, if they are available.
+ *
+ * @version $Rev$ $Date$
+ */
public interface ResponseDelegate {
+ /**
+ * Returns the output stream.
+ *
+ * @return The output stream.
+ * @throws IOException If the underlying response causes a problem.
+ */
OutputStream getOutputStream() throws IOException;
+ /**
+ * Returns the print writer.
+ *
+ * @return The print writer.
+ * @throws IOException If the underlying response causes a problem.
+ */
PrintWriter getPrintWriter() throws IOException;
+ /**
+ * Returns the writer.
+ *
+ * @return The writer.
+ * @throws IOException If the underlying response causes a problem.
+ */
Writer getWriter() throws IOException;
+ /**
+ * Sets the content type of the response.
+ *
+ * @param contentType The content type.
+ */
void setContentType(String contentType);
+ /**
+ * Checks if the response is committed.
+ *
+ * @return <code>true</code> if the response is committed.
+ */
boolean isResponseCommitted();
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareParameterMap.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareParameterMap.java
index 050a4cd..1930815 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareParameterMap.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareParameterMap.java
@@ -1,15 +1,52 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
+/**
+ * Parameter map to be used when the response is a {@link javax.portlet.StateAwareResponse}.
+ *
+ * @version $Rev$ $Date$
+ */
public class StateAwareParameterMap implements Map<String, String[]> {
+ /**
+ * The request parameter map.
+ */
private Map<String, String[]> requestMap;
+ /**
+ * The response parameter map.
+ */
private Map<String, String[]> responseMap;
+ /**
+ * Constructor.
+ *
+ * @param requestMap The request parameter map.
+ * @param responseMap The response parameter map.
+ */
public StateAwareParameterMap(Map<String, String[]> requestMap,
Map<String, String[]> responseMap) {
this.requestMap = requestMap;
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareRequestDelegate.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareRequestDelegate.java
index 1b1cee3..854c0cc 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareRequestDelegate.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareRequestDelegate.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
import java.util.Map;
@@ -8,12 +28,30 @@
import org.apache.tiles.request.collection.AddableParameterMap;
import org.apache.tiles.request.portlet.extractor.StateAwareParameterExtractor;
+/**
+ * Exposes parameters getting them from a portlet reques and allowing to be put
+ * into a {@link StateAwareResponse}.
+ *
+ * @version $Rev$ $Date$
+ */
public class StateAwareRequestDelegate implements RequestDelegate {
+ /**
+ * The request.
+ */
private PortletRequest request;
+ /**
+ * The response.
+ */
private StateAwareResponse response;
+ /**
+ * Constructor.
+ *
+ * @param request The request.
+ * @param response The response.
+ */
public StateAwareRequestDelegate(PortletRequest request,
StateAwareResponse response) {
this.request = request;
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareResponseDelegate.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareResponseDelegate.java
index fac535c..0130b01 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareResponseDelegate.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/StateAwareResponseDelegate.java
@@ -1,9 +1,35 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
+/**
+ * A state aware response does not allow to access to the output stream and similar,
+ * so it is, essentially, a feature blocker.
+ *
+ * @version $Rev$ $Date$
+ */
public class StateAwareResponseDelegate implements ResponseDelegate {
@Override
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/package-info.java
similarity index 78%
copy from tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html
copy to tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/package-info.java
index bf7f655..5080dc3 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/delegate/package-info.java
@@ -1,6 +1,5 @@
-<!--
/*
- * $Id$
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -19,13 +18,7 @@
* specific language governing permissions and limitations
* under the License.
*/
--->
-<html>
-<head>
- <title>Tiles portlet-specific context package</title>
-</head>
-<body>
-Classes and interfaces that allow to access the various contexts from a portlet
-application.
-</body>
-</html>
\ No newline at end of file
+/**
+ * Delegations to map all the different types of request and responses.
+ */
+package org.apache.tiles.request.portlet.delegate;
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/ApplicationScopeExtractor.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/ApplicationScopeExtractor.java
index f191217..b167908 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/ApplicationScopeExtractor.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/ApplicationScopeExtractor.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
import java.util.Enumeration;
@@ -6,10 +26,23 @@
import org.apache.tiles.request.attribute.AttributeExtractor;
+/**
+ * Extracts attributes from portlet application scope.
+ *
+ * @version $Rev$ $Date$
+ */
public class ApplicationScopeExtractor implements AttributeExtractor {
+ /**
+ * The portlet context.
+ */
private PortletContext context;
+ /**
+ * Constructor.
+ *
+ * @param context The portlet context.
+ */
public ApplicationScopeExtractor(PortletContext context) {
this.context = context;
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/HeaderExtractor.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/HeaderExtractor.java
index 05ee2db..52485d2 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/HeaderExtractor.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/HeaderExtractor.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
import java.util.Enumeration;
@@ -7,12 +27,29 @@
import org.apache.tiles.request.attribute.EnumeratedValuesExtractor;
+/**
+ * Extracts and puts headers in portlet requests and responses.
+ *
+ * @version $Rev$ $Date$
+ */
public class HeaderExtractor implements EnumeratedValuesExtractor {
+ /**
+ * The request.
+ */
private PortletRequest request;
+ /**
+ * The response.
+ */
private PortletResponse response;
+ /**
+ * Constructor.
+ *
+ * @param request The request.
+ * @param response The response.
+ */
public HeaderExtractor(PortletRequest request,
PortletResponse response) {
this.request = request;
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/InitParameterExtractor.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/InitParameterExtractor.java
index 41b6e55..dca552b 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/InitParameterExtractor.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/InitParameterExtractor.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
import java.util.Enumeration;
@@ -6,10 +26,23 @@
import org.apache.tiles.request.attribute.HasKeys;
+/**
+ * Extracts init parameters from a portlet context.
+ *
+ * @version $Rev$ $Date$
+ */
public class InitParameterExtractor implements HasKeys<String> {
+ /**
+ * The portlet context.
+ */
private PortletContext context;
+ /**
+ * Constructor.
+ *
+ * @param context The portlet context.
+ */
public InitParameterExtractor(PortletContext context) {
this.context = context;
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/ParameterExtractor.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/ParameterExtractor.java
index 196677a..3a95931 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/ParameterExtractor.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/ParameterExtractor.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
import java.util.Enumeration;
@@ -6,10 +26,23 @@
import org.apache.tiles.request.attribute.HasKeys;
+/**
+ * Extracts parameters from a portlet request.
+ *
+ * @version $Rev$ $Date$
+ */
public class ParameterExtractor implements HasKeys<String> {
+ /**
+ * The portlet request.
+ */
private PortletRequest request;
+ /**
+ * Constructor.
+ *
+ * @param request The portlet request.
+ */
public ParameterExtractor(PortletRequest request) {
this.request = request;
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/RequestScopeExtractor.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/RequestScopeExtractor.java
index 5bd0581..7b74cfa 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/RequestScopeExtractor.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/RequestScopeExtractor.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
import java.util.Enumeration;
@@ -6,10 +26,23 @@
import org.apache.tiles.request.attribute.AttributeExtractor;
+/**
+ * Extracts attributes from request scope of a portlet request.
+ *
+ * @version $Rev$ $Date$
+ */
public class RequestScopeExtractor implements AttributeExtractor {
+ /**
+ * The portlet request.
+ */
private PortletRequest request;
+ /**
+ * Constructor.
+ *
+ * @param request The portlet request.
+ */
public RequestScopeExtractor(PortletRequest request) {
this.request = request;
}
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/SessionScopeExtractor.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/SessionScopeExtractor.java
index f910420..5f32ef5 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/SessionScopeExtractor.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/SessionScopeExtractor.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
import java.util.Enumeration;
@@ -7,12 +27,29 @@
import org.apache.tiles.request.attribute.AttributeExtractor;
+/**
+ * Extracts attributes from the session scope of a portlet request.
+ *
+ * @version $Rev$ $Date$
+ */
public class SessionScopeExtractor implements AttributeExtractor {
+ /**
+ * The portlet request.
+ */
private PortletRequest request;
+ /**
+ * The subscope (application or portlet).
+ */
private int scope;
+ /**
+ * Constructor.
+ *
+ * @param request The request.
+ * @param scope The subscope (application or portlet).
+ */
public SessionScopeExtractor(PortletRequest request, int scope) {
this.request = request;
if (scope != PortletSession.APPLICATION_SCOPE
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/StateAwareParameterExtractor.java b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/StateAwareParameterExtractor.java
index e753549..d1606c4 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/StateAwareParameterExtractor.java
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/StateAwareParameterExtractor.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
import javax.portlet.PortletRequest;
@@ -5,10 +25,24 @@
import org.apache.tiles.request.attribute.HasAddableKeys;
+/**
+ * Extracts parameters from a request and allows putting render parameters in a state aware response.
+ *
+ * @version $Rev$ $Date$
+ */
public class StateAwareParameterExtractor extends ParameterExtractor implements HasAddableKeys<String> {
+ /**
+ * The portlet response.
+ */
private StateAwareResponse response;
+ /**
+ * Constructor.
+ *
+ * @param request The portlet request.
+ * @param response The portlet response.
+ */
public StateAwareParameterExtractor(PortletRequest request, StateAwareResponse response) {
super(request);
this.response = response;
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/package-info.java
similarity index 78%
rename from tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html
rename to tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/package-info.java
index bf7f655..a37ccbb 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/extractor/package-info.java
@@ -1,6 +1,5 @@
-<!--
/*
- * $Id$
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -19,13 +18,7 @@
* specific language governing permissions and limitations
* under the License.
*/
--->
-<html>
-<head>
- <title>Tiles portlet-specific context package</title>
-</head>
-<body>
-Classes and interfaces that allow to access the various contexts from a portlet
-application.
-</body>
-</html>
\ No newline at end of file
+/**
+ * Extractors to get scopes from Portlet requests.
+ */
+package org.apache.tiles.request.portlet.extractor;
diff --git a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package-info.java
similarity index 78%
copy from tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html
copy to tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package-info.java
index bf7f655..b9eb0d1 100644
--- a/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package.html
+++ b/tiles-request-portlet/src/main/java/org/apache/tiles/request/portlet/package-info.java
@@ -1,6 +1,5 @@
-<!--
/*
- * $Id$
+ * $Id: package-info.java 1049711 2010-12-15 21:12:00Z apetrelli $
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -19,13 +18,7 @@
* specific language governing permissions and limitations
* under the License.
*/
--->
-<html>
-<head>
- <title>Tiles portlet-specific context package</title>
-</head>
-<body>
-Classes and interfaces that allow to access the various contexts from a portlet
-application.
-</body>
-</html>
\ No newline at end of file
+/**
+ * Support of Tiles requests to portlets.
+ */
+package org.apache.tiles.request.portlet;
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/ActionPortletRequestTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/ActionPortletRequestTest.java
index e87f93b..629f45f 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/ActionPortletRequestTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/ActionPortletRequestTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
@@ -25,14 +42,17 @@
public class ActionPortletRequestTest {
/**
- * Test method for {@link org.apache.tiles.request.portlet.ActionPortletRequest#ActionPortletRequest(org.apache.tiles.request.ApplicationContext, javax.portlet.PortletContext, javax.portlet.ActionRequest, javax.portlet.ActionResponse)}.
+ * Test method for
+ * {@link ActionPortletRequest#ActionPortletRequest(ApplicationContext,
+ * PortletContext, ActionRequest, ActionResponse)}.
* @throws NoSuchFieldException If something goes wrong.
* @throws SecurityException If something goes wrong.
* @throws IllegalAccessException If something goes wrong.
* @throws IllegalArgumentException If something goes wrong.
*/
@Test
- public void testActionPortletRequest() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+ public void testActionPortletRequest() throws NoSuchFieldException,
+ IllegalAccessException {
ApplicationContext applicationContext = createMock(ApplicationContext.class);
PortletContext portletContext = createMock(PortletContext.class);
ActionRequest request = createMock(ActionRequest.class);
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/EventPortletRequestTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/EventPortletRequestTest.java
index 1729e1f..998cb02 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/EventPortletRequestTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/EventPortletRequestTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
@@ -25,14 +42,15 @@
public class EventPortletRequestTest {
/**
- * Test method for {@link org.apache.tiles.request.portlet.EventPortletRequest#EventPortletRequest(org.apache.tiles.request.ApplicationContext, javax.portlet.PortletContext, javax.portlet.EventRequest, javax.portlet.EventResponse)}.
+ * Test method for
+ * {@link EventPortletRequest#EventPortletRequest(ApplicationContext, PortletContext, EventRequest, EventResponse)}.
* @throws NoSuchFieldException If something goes wrong.
* @throws SecurityException If something goes wrong.
* @throws IllegalAccessException If something goes wrong.
* @throws IllegalArgumentException If something goes wrong.
*/
@Test
- public void testEventPortletRequest() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+ public void testEventPortletRequest() throws NoSuchFieldException, IllegalAccessException {
ApplicationContext applicationContext = createMock(ApplicationContext.class);
PortletContext portletContext = createMock(PortletContext.class);
EventRequest request = createMock(EventRequest.class);
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/PortletApplicationContextTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/PortletApplicationContextTest.java
index 1715a00..269091b 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/PortletApplicationContextTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/PortletApplicationContextTest.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
import static org.easymock.EasyMock.*;
@@ -22,8 +42,14 @@
*/
public class PortletApplicationContextTest {
+ /**
+ * The portlet context.
+ */
private PortletContext portletContext;
+ /**
+ * The application context.
+ */
private PortletApplicationContext context;
/**
@@ -68,7 +94,6 @@
/**
* Test method for {@link org.apache.tiles.request.portlet.PortletApplicationContext#getInitParams()}.
*/
- @SuppressWarnings("unchecked")
@Test
public void testGetInitParams() {
replay(portletContext);
@@ -91,7 +116,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.PortletApplicationContext#getResources(java.lang.String)}.
+ * Test method for {@link PortletApplicationContext#getResources(String)}.
* @throws IOException If something goes wrong.
*/
@Test
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/PortletRequestTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/PortletRequestTest.java
index f67e937..8456370 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/PortletRequestTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/PortletRequestTest.java
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
import static org.easymock.EasyMock.*;
@@ -31,18 +51,39 @@
*/
public class PortletRequestTest {
+ /**
+ * The application context.
+ */
private ApplicationContext applicationContext;
+ /**
+ * The portlet context.
+ */
private PortletContext portletContext;
+ /**
+ * The request.
+ */
private javax.portlet.PortletRequest request;
+ /**
+ * The response.
+ */
private PortletResponse response;
+ /**
+ * The request to test.
+ */
private PortletRequest req;
+ /**
+ * The request delegate.
+ */
private RequestDelegate requestDelegate;
+ /**
+ * The response delegate.
+ */
private ResponseDelegate responseDelegate;
/**
@@ -81,9 +122,8 @@
/**
* Test method for {@link org.apache.tiles.request.portlet.PortletRequest#doForward(java.lang.String)}.
* @throws IOException If something goes wrong.
- * @throws PortletException If something goes wrong.
*/
- @Test(expected=IOException.class)
+ @Test(expected = IOException.class)
public void testDoForwardNoDispatcher() throws IOException {
expect(responseDelegate.isResponseCommitted()).andReturn(false);
expect(portletContext.getRequestDispatcher("/my/path")).andReturn(null);
@@ -101,7 +141,7 @@
* @throws IOException If something goes wrong.
* @throws PortletException If something goes wrong.
*/
- @Test(expected=IOException.class)
+ @Test(expected = IOException.class)
public void testDoForwardPortletException() throws PortletException, IOException {
PortletRequestDispatcher rd = createMock(PortletRequestDispatcher.class);
@@ -157,7 +197,7 @@
* Test method for {@link org.apache.tiles.request.portlet.PortletRequest#doInclude(java.lang.String)}.
* @throws IOException If something goes wrong.
*/
- @Test(expected=IOException.class)
+ @Test(expected = IOException.class)
public void testDoIncludeNoDispatcher() throws IOException {
expect(portletContext.getRequestDispatcher("/my/path")).andReturn(null);
@@ -174,7 +214,7 @@
* @throws IOException If something goes wrong.
* @throws PortletException If something goes wrong.
*/
- @Test(expected=IOException.class)
+ @Test(expected = IOException.class)
public void testDoIncludePortletException() throws IOException, PortletException {
PortletRequestDispatcher rd = createMock(PortletRequestDispatcher.class);
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/RenderPortletRequestTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/RenderPortletRequestTest.java
index 79ae303..b88983f 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/RenderPortletRequestTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/RenderPortletRequestTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
@@ -25,14 +42,16 @@
public class RenderPortletRequestTest {
/**
- * Test method for {@link org.apache.tiles.request.portlet.RenderPortletRequest#RenderPortletRequest(org.apache.tiles.request.ApplicationContext, javax.portlet.PortletContext, javax.portlet.RenderRequest, javax.portlet.RenderResponse)}.
+ * Test method for
+ * {@link RenderPortletRequest#RenderPortletRequest(ApplicationContext, PortletContext,
+ * RenderRequest, RenderResponse)}.
* @throws NoSuchFieldException If something goes wrong.
* @throws SecurityException If something goes wrong.
* @throws IllegalAccessException If something goes wrong.
* @throws IllegalArgumentException If something goes wrong.
*/
@Test
- public void testRenderPortletRequest() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+ public void testRenderPortletRequest() throws NoSuchFieldException, IllegalAccessException {
ApplicationContext applicationContext = createMock(ApplicationContext.class);
PortletContext portletContext = createMock(PortletContext.class);
RenderRequest request = createMock(RenderRequest.class);
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/ResourcePortletRequestTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/ResourcePortletRequestTest.java
index 4ee2270..130cb5d 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/ResourcePortletRequestTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/ResourcePortletRequestTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet;
@@ -25,14 +42,16 @@
public class ResourcePortletRequestTest {
/**
- * Test method for {@link org.apache.tiles.request.portlet.ResourcePortletRequest#ResourcePortletRequest(org.apache.tiles.request.ApplicationContext, javax.portlet.PortletContext, javax.portlet.ResourceRequest, javax.portlet.ResourceResponse)}.
+ * Test method for
+ * {@link ResourcePortletRequest#ResourcePortletRequest(ApplicationContext, PortletContext,
+ * ResourceRequest, ResourceResponse)}.
* @throws NoSuchFieldException If something goes wrong.
* @throws SecurityException If something goes wrong.
* @throws IllegalAccessException If something goes wrong.
* @throws IllegalArgumentException If something goes wrong.
*/
@Test
- public void testResourcePortletRequest() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+ public void testResourcePortletRequest() throws NoSuchFieldException, IllegalAccessException {
ApplicationContext applicationContext = createMock(ApplicationContext.class);
PortletContext portletContext = createMock(PortletContext.class);
ResourceRequest request = createMock(ResourceRequest.class);
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/MimeResponseDelegateTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/MimeResponseDelegateTest.java
index ca33fb1..f16525f 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/MimeResponseDelegateTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/MimeResponseDelegateTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
@@ -22,8 +39,14 @@
*/
public class MimeResponseDelegateTest {
+ /**
+ * The response.
+ */
private MimeResponse response;
+ /**
+ * The delegate to test.
+ */
private MimeResponseDelegate delegate;
/**
@@ -93,7 +116,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.delegate.MimeResponseDelegate#setContentType(java.lang.String)}.
+ * Test method for {@link MimeResponseDelegate#setContentType(String)}.
*/
@Test
public void testSetContentType() {
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/PortletRequestDelegateTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/PortletRequestDelegateTest.java
index 762c44b..14da05c 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/PortletRequestDelegateTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/PortletRequestDelegateTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
@@ -21,8 +38,14 @@
*/
public class PortletRequestDelegateTest {
+ /**
+ * The request.
+ */
private PortletRequest request;
+ /**
+ * The delegate to test.
+ */
private PortletRequestDelegate delegate;
/**
@@ -37,7 +60,6 @@
/**
* Test method for {@link org.apache.tiles.request.portlet.delegate.PortletRequestDelegate#getParam()}.
*/
- @SuppressWarnings("unchecked")
@Test
public void testGetParam() {
replay(request);
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareParameterMapTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareParameterMapTest.java
index 5d210d0..2439b44 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareParameterMapTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareParameterMapTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
@@ -21,10 +38,19 @@
*/
public class StateAwareParameterMapTest {
+ /**
+ * The request map.
+ */
private Map<String, String[]> requestMap;
+ /**
+ * The response map.
+ */
private Map<String, String[]> responseMap;
+ /**
+ * The map to test.
+ */
private StateAwareParameterMap map;
/**
@@ -52,7 +78,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareParameterMap#containsKey(java.lang.Object)}.
+ * Test method for {@link StateAwareParameterMap#containsKey(Object)}.
*/
@Test
public void testContainsKey() {
@@ -64,7 +90,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareParameterMap#containsValue(java.lang.Object)}.
+ * Test method for {@link StateAwareParameterMap#containsValue(Object)}.
*/
@Test
public void testContainsValue() {
@@ -132,7 +158,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareParameterMap#put(java.lang.String, java.lang.String[])}.
+ * Test method for {@link StateAwareParameterMap#put(String, String[])}.
*/
@Test
public void testPut() {
@@ -159,7 +185,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareParameterMap#remove(java.lang.Object)}.
+ * Test method for {@link StateAwareParameterMap#remove(Object)}.
*/
@Test
public void testRemove() {
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareRequestDelegateTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareRequestDelegateTest.java
index b0b5f90..a9ba958 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareRequestDelegateTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareRequestDelegateTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
@@ -23,10 +40,19 @@
*/
public class StateAwareRequestDelegateTest {
+ /**
+ * The request.
+ */
private PortletRequest request;
+ /**
+ * The response.
+ */
private StateAwareResponse response;
+ /**
+ * The delegate to test.
+ */
private StateAwareRequestDelegate delegate;
/**
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareResponseDelegateTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareResponseDelegateTest.java
index 9398c79..d8a6b0d 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareResponseDelegateTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/delegate/StateAwareResponseDelegateTest.java
@@ -1,12 +1,27 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.delegate;
import static org.junit.Assert.*;
-import java.io.IOException;
-
import org.junit.Before;
import org.junit.Test;
@@ -17,6 +32,9 @@
*/
public class StateAwareResponseDelegateTest {
+ /**
+ * The delegate to test.
+ */
private StateAwareResponseDelegate delegate;
/**
@@ -29,33 +47,30 @@
/**
* Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareResponseDelegate#getOutputStream()}.
- * @throws IOException If something goes wrong.
*/
- @Test(expected=UnsupportedOperationException.class)
+ @Test(expected = UnsupportedOperationException.class)
public void testGetOutputStream() {
delegate.getOutputStream();
}
/**
* Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareResponseDelegate#getPrintWriter()}.
- * @throws IOException If something goes wrong.
*/
- @Test(expected=UnsupportedOperationException.class)
+ @Test(expected = UnsupportedOperationException.class)
public void testGetPrintWriter() {
delegate.getPrintWriter();
}
/**
* Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareResponseDelegate#getWriter()}.
- * @throws IOException If something goes wrong.
*/
- @Test(expected=UnsupportedOperationException.class)
+ @Test(expected = UnsupportedOperationException.class)
public void testGetWriter() {
delegate.getWriter();
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareResponseDelegate#isResponseCommitted()}.
+ * Test method for {@link StateAwareResponseDelegate#isResponseCommitted()}.
*/
@Test
public void testIsResponseCommitted() {
@@ -63,9 +78,9 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.delegate.StateAwareResponseDelegate#setContentType(java.lang.String)}.
+ * Test method for {@link StateAwareResponseDelegate#setContentType(java.lang.String)}.
*/
- @Test(expected=UnsupportedOperationException.class)
+ @Test(expected = UnsupportedOperationException.class)
public void testSetContentType() {
delegate.setContentType("text/html");
}
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/ApplicationScopeExtractorTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/ApplicationScopeExtractorTest.java
index 6fcaa93..2378b45 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/ApplicationScopeExtractorTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/ApplicationScopeExtractorTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
@@ -21,8 +38,14 @@
*/
public class ApplicationScopeExtractorTest {
+ /**
+ * The portlet context.
+ */
private PortletContext context;
+ /**
+ * The extractot to test.
+ */
private ApplicationScopeExtractor extractor;
/**
@@ -35,7 +58,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.ApplicationScopeExtractor#setValue(java.lang.String, java.lang.Object)}.
+ * Test method for {@link ApplicationScopeExtractor#setValue(java.lang.String, java.lang.Object)}.
*/
@Test
public void testSetValue() {
@@ -47,7 +70,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.ApplicationScopeExtractor#removeValue(java.lang.String)}.
+ * Test method for {@link ApplicationScopeExtractor#removeValue(java.lang.String)}.
*/
@Test
public void testRemoveValue() {
@@ -59,7 +82,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.ApplicationScopeExtractor#getKeys()}.
+ * Test method for {@link ApplicationScopeExtractor#getKeys()}.
*/
@SuppressWarnings("unchecked")
@Test
@@ -73,7 +96,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.ApplicationScopeExtractor#getValue(java.lang.String)}.
+ * Test method for {@link ApplicationScopeExtractor#getValue(java.lang.String)}.
*/
@Test
public void testGetValue() {
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/HeaderExtractorTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/HeaderExtractorTest.java
index f0f35ce..3d81ce5 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/HeaderExtractorTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/HeaderExtractorTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
@@ -22,10 +39,19 @@
*/
public class HeaderExtractorTest {
+ /**
+ * The request.
+ */
private PortletRequest request;
+ /**
+ * The response.
+ */
private PortletResponse response;
+ /**
+ * The extractor to test.
+ */
private HeaderExtractor extractor;
/**
@@ -81,7 +107,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.HeaderExtractor#setValue(java.lang.String, java.lang.String)}.
+ * Test method for {@link HeaderExtractor#setValue(String, String)}.
*/
@Test
public void testSetValue() {
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/InitParameterExtractorTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/InitParameterExtractorTest.java
index a84816a..4480080 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/InitParameterExtractorTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/InitParameterExtractorTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
@@ -21,8 +38,14 @@
*/
public class InitParameterExtractorTest {
+ /**
+ * The portlet context.
+ */
private PortletContext context;
+ /**
+ * The extractor to test.
+ */
private InitParameterExtractor extractor;
/**
@@ -50,7 +73,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.InitParameterExtractor#getValue(java.lang.String)}.
+ * Test method for {@link InitParameterExtractor#getValue(String)}.
*/
@Test
public void testGetValue() {
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/ParameterExtractorTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/ParameterExtractorTest.java
index 81c7fc0..dcb9bac 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/ParameterExtractorTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/ParameterExtractorTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
@@ -21,8 +38,14 @@
*/
public class ParameterExtractorTest {
+ /**
+ * The request.
+ */
private PortletRequest request;
+ /**
+ * The extractor to test.
+ */
private ParameterExtractor extractor;
/**
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/RequestScopeExtractorTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/RequestScopeExtractorTest.java
index 81158dd..d922acd 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/RequestScopeExtractorTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/RequestScopeExtractorTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
@@ -21,8 +38,14 @@
*/
public class RequestScopeExtractorTest {
+ /**
+ * The request to test.
+ */
private PortletRequest request;
+ /**
+ * The extractor to test.
+ */
private RequestScopeExtractor extractor;
/**
@@ -35,7 +58,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.RequestScopeExtractor#setValue(java.lang.String, java.lang.Object)}.
+ * Test method for {@link RequestScopeExtractor#setValue(String, Object)}.
*/
@Test
public void testSetValue() {
@@ -47,7 +70,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.RequestScopeExtractor#removeValue(java.lang.String)}.
+ * Test method for {@link RequestScopeExtractor#removeValue(String)}.
*/
@Test
public void testRemoveValue() {
@@ -74,7 +97,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.RequestScopeExtractor#getValue(java.lang.String)}.
+ * Test method for {@link RequestScopeExtractor#getValue(String)}.
*/
@Test
public void testGetValue() {
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/SessionScopeExtractorTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/SessionScopeExtractorTest.java
index 6927df0..85c6eb6 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/SessionScopeExtractorTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/SessionScopeExtractorTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
@@ -22,10 +39,19 @@
*/
public class SessionScopeExtractorTest {
+ /**
+ * The request.
+ */
private PortletRequest request;
+ /**
+ * The session.
+ */
private PortletSession session;
+ /**
+ * The scope to test.
+ */
private SessionScopeExtractor extractor;
/**
@@ -42,7 +68,7 @@
/**
* Tests {@link SessionScopeExtractor#SessionScopeExtractor(PortletRequest, int)}.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testIllegalScope() {
replay(request, session);
new SessionScopeExtractor(request, 0);
@@ -50,7 +76,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.SessionScopeExtractor#setValue(java.lang.String, java.lang.Object)}.
+ * Test method for {@link SessionScopeExtractor#setValue(java.lang.String, java.lang.Object)}.
*/
@Test
public void testSetValue() {
@@ -63,7 +89,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.SessionScopeExtractor#removeValue(java.lang.String)}.
+ * Test method for {@link SessionScopeExtractor#removeValue(java.lang.String)}.
*/
@Test
public void testRemoveValue() {
@@ -76,7 +102,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.SessionScopeExtractor#getKeys()}.
+ * Test method for {@link SessionScopeExtractor#getKeys()}.
*/
@SuppressWarnings("unchecked")
@Test
@@ -92,7 +118,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.SessionScopeExtractor#getKeys()}.
+ * Test method for {@link SessionScopeExtractor#getKeys()}.
*/
@Test
public void testGetKeysNoSession() {
@@ -104,7 +130,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.SessionScopeExtractor#getValue(java.lang.String)}.
+ * Test method for {@link SessionScopeExtractor#getValue(java.lang.String)}.
*/
@Test
public void testGetValue() {
@@ -117,7 +143,7 @@
}
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.SessionScopeExtractor#getValue(java.lang.String)}.
+ * Test method for {@link SessionScopeExtractor#getValue(java.lang.String)}.
*/
@Test
public void testGetValueNoSession() {
diff --git a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/StateAwareParameterExtractorTest.java b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/StateAwareParameterExtractorTest.java
index 52909b0..331040e 100644
--- a/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/StateAwareParameterExtractorTest.java
+++ b/tiles-request-portlet/src/test/java/org/apache/tiles/request/portlet/extractor/StateAwareParameterExtractorTest.java
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.tiles.request.portlet.extractor;
@@ -18,7 +35,7 @@
public class StateAwareParameterExtractorTest {
/**
- * Test method for {@link org.apache.tiles.request.portlet.extractor.StateAwareParameterExtractor#setValue(java.lang.String, java.lang.String)}.
+ * Test method for {@link StateAwareParameterExtractor#setValue(String, String)}.
*/
@Test
public void testSetValue() {