-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Licence headers and JavaDocs for all classes in modules above (but no…
…t including) PrettyFaces 3.x Config
- Loading branch information
1 parent
79343c2
commit 6f8000f
Showing
34 changed files
with
391 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
/* | ||
* Copyright 2013 <a href="mailto:[email protected]">Lincoln Baxter, III</a> | ||
* | ||
* 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.ocpsoft.rewrite.servlet; | ||
|
||
import java.util.Map; | ||
|
@@ -6,24 +21,46 @@ | |
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletRequestWrapper; | ||
|
||
import org.ocpsoft.rewrite.event.Rewrite; | ||
import org.ocpsoft.rewrite.servlet.spi.RequestParameterProvider; | ||
|
||
/** | ||
* An {@link HttpServletRequestWrapper} for the {@link Rewrite} framework | ||
* | ||
* @author <a href="mailto:[email protected]">Lincoln Baxter, III</a> | ||
*/ | ||
public abstract class RewriteWrappedRequest extends HttpServletRequestWrapper | ||
{ | ||
/** | ||
* Get the current {@link RewriteWrappedRequest} | ||
*/ | ||
public static RewriteWrappedRequest getCurrentInstance(ServletRequest request) | ||
{ | ||
RewriteWrappedRequest wrapper = (RewriteWrappedRequest) request.getAttribute(RewriteWrappedRequest.class | ||
.getName()); | ||
return wrapper; | ||
} | ||
|
||
/** | ||
* Set the current {@link RewriteWrappedRequest} | ||
*/ | ||
protected static void setCurrentInstance(final RewriteWrappedRequest instance) | ||
{ | ||
instance.setAttribute(RewriteWrappedRequest.class.getName(), instance); | ||
} | ||
|
||
/** | ||
* Create a new {@link RewriteWrappedRequest} | ||
*/ | ||
public RewriteWrappedRequest(HttpServletRequest request) | ||
{ | ||
super(request); | ||
} | ||
|
||
/** | ||
* Get the current {@link Map} of modifiable {@link HttpServletRequest} parameters. | ||
* | ||
* @see {@link RequestParameterProvider} | ||
*/ | ||
abstract public Map<String, String[]> getModifiableParameters(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,19 @@ | |
package org.ocpsoft.rewrite.servlet; | ||
|
||
import javax.servlet.ServletRequest; | ||
import javax.servlet.ServletResponse; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
import javax.servlet.http.HttpServletResponseWrapper; | ||
|
||
import org.ocpsoft.rewrite.event.Rewrite; | ||
import org.ocpsoft.rewrite.servlet.config.response.ResponseContentInterceptor; | ||
import org.ocpsoft.rewrite.servlet.config.response.ResponseStreamWrapper; | ||
|
||
/** | ||
* A {@link HttpServletResponseWrapper} for the {@link Rewrite} framework. | ||
* | ||
* @author <a href="mailto:[email protected]">Lincoln Baxter, III</a> | ||
*/ | ||
public abstract class RewriteWrappedResponse extends HttpServletResponseWrapper | ||
{ | ||
protected final static String INSTANCE_KEY = RewriteWrappedResponse.class.getName() + "_instance"; | ||
|
@@ -38,41 +43,58 @@ public static RewriteWrappedResponse getCurrentInstance(ServletRequest request) | |
|
||
private HttpServletRequest request; | ||
|
||
/** | ||
* Set the current {@link RewriteWrappedResponse} instance. | ||
*/ | ||
protected void setCurrentInstance(RewriteWrappedResponse instance) | ||
{ | ||
request.setAttribute(RewriteWrappedResponse.INSTANCE_KEY, instance); | ||
} | ||
|
||
/** | ||
* Create a new {@link RewriteWrappedResponse} instance. | ||
*/ | ||
public RewriteWrappedResponse(HttpServletRequest request, HttpServletResponse response) | ||
{ | ||
super(response); | ||
this.request = request; | ||
} | ||
|
||
/** | ||
* Get the {@link HttpServletRequest} to which this {@link RewriteWrappedResponse} is associated. | ||
*/ | ||
public HttpServletRequest getRequest() | ||
{ | ||
return request; | ||
} | ||
|
||
@Override | ||
public ServletResponse getResponse() | ||
{ | ||
return super.getResponse(); | ||
} | ||
|
||
@Override | ||
public void setResponse(ServletResponse response) | ||
{ | ||
super.setResponse(response); | ||
} | ||
|
||
/** | ||
* Return <code>true</code> if any {@link ResponseContentInterceptor} instances have been registered on the current | ||
* {@link HttpServletResponse}. | ||
*/ | ||
abstract public boolean isResponseContentIntercepted(); | ||
|
||
/** | ||
* Return <code>true</code> if any {@link ResponseStreamWrapper} instances have been registered on the current | ||
* {@link HttpServletResponse}. | ||
*/ | ||
abstract public boolean isResponseStreamWrapped(); | ||
|
||
/** | ||
* Register a new {@link ResponseContentInterceptor} for the current {@link HttpServletResponse}. This method must be | ||
* called before the {@link HttpServletRequest} has been passed to the underlying application.. | ||
*/ | ||
abstract public void addContentInterceptor(ResponseContentInterceptor stage); | ||
|
||
/** | ||
* Register a new {@link ResponseStreamWrapper} for the current {@link HttpServletResponse}. This method must be | ||
* called before the {@link HttpServletRequest} has been passed to the underlying application.. | ||
*/ | ||
abstract public void addStreamWrapper(ResponseStreamWrapper wrapper); | ||
|
||
/** | ||
* Flush any content that may be buffered in registered {@link ResponseContentInterceptor} instances. This operation | ||
* has no effect if no {@link ResponseContentInterceptor} instances are registered. | ||
*/ | ||
abstract public void flushBufferedContent(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 18 additions & 2 deletions
20
...vlet/src/main/java/org/ocpsoft/rewrite/servlet/config/HttpConfigurationCacheProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
/* | ||
* Copyright 2011 <a href="mailto:[email protected]">Lincoln Baxter, III</a> | ||
* | ||
* 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.ocpsoft.rewrite.servlet.config; | ||
|
||
import javax.servlet.ServletContext; | ||
|
||
import org.ocpsoft.rewrite.config.ConfigurationProvider; | ||
import org.ocpsoft.rewrite.spi.ConfigurationCacheProvider; | ||
|
||
/** | ||
* Configuration cache provider for HTTP/Servlet environments. | ||
* {@link ConfigurationCacheProvider} for HTTP/Servlet environments. | ||
* | ||
* @see org.ocpsoft.rewrite.config.ConfigurationProvider | ||
* @see ConfigurationProvider | ||
* @author <a href="mailto:[email protected]">Lincoln Baxter, III</a> | ||
* | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,8 @@ | |
import org.ocpsoft.rewrite.config.ConfigurationProvider; | ||
|
||
/** | ||
* Configuration provider for HTTP/Servlet environments. | ||
* {@link ConfigurationProvider} for HTTP/Servlet environments. | ||
* | ||
* @see org.ocpsoft.rewrite.config.ConfigurationProvider | ||
* @author <a href="mailto:[email protected]">Lincoln Baxter, III</a> | ||
* | ||
*/ | ||
|
15 changes: 15 additions & 0 deletions
15
api-servlet/src/main/java/org/ocpsoft/rewrite/servlet/event/SubflowTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
/* | ||
* Copyright 2011 <a href="mailto:[email protected]">Lincoln Baxter, III</a> | ||
* | ||
* 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.ocpsoft.rewrite.servlet.event; | ||
|
||
import org.ocpsoft.rewrite.context.EvaluationContext; | ||
|
15 changes: 15 additions & 0 deletions
15
api-servlet/src/main/java/org/ocpsoft/rewrite/servlet/http/HttpRewriteLifecycleContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
/* | ||
* Copyright 2011 <a href="mailto:[email protected]">Lincoln Baxter, III</a> | ||
* | ||
* 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.ocpsoft.rewrite.servlet.http; | ||
|
||
import javax.servlet.Servlet; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
api/src/main/java/org/ocpsoft/rewrite/config/ConfigurationRuleParameterPerform.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
It seems that the issues #223 and #281 were caused by removing this condition in 6f8000f