Skip to content

Commit c4f34ac

Browse files
committed
Added JavaDocs and Headers. Also renamed Subset.when() to Subset.evaluate() since it is an operation.
1 parent 0ad8d73 commit c4f34ac

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

‎api-tests/src/test/java/org/ocpsoft/rewrite/config/ConfigurationBuilderTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public void testSubsetAPI() throws Exception
176176

177177
.addRule()
178178
.when(new False())
179-
.otherwise(Subset.when(ConfigurationBuilder.begin()
179+
.otherwise(Subset.evaluate(ConfigurationBuilder.begin()
180180
.addRule()
181181
.when(new True())
182182
.perform(operation)));

‎config-servlet/src/main/java/org/ocpsoft/rewrite/servlet/config/lifecycle/JoinRewriteLifecycleListener.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.ocpsoft.rewrite.servlet.config.lifecycle;
217

318
import org.ocpsoft.rewrite.event.Rewrite;

‎config-servlet/src/main/java/org/ocpsoft/rewrite/servlet/config/lifecycle/Subset.java‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.ocpsoft.rewrite.servlet.config.lifecycle;
217

318
import java.util.ArrayList;
@@ -24,6 +39,11 @@
2439
import org.ocpsoft.rewrite.servlet.event.BaseRewrite.Flow;
2540
import org.ocpsoft.rewrite.servlet.http.event.HttpServletRewrite;
2641

42+
/**
43+
* Allows for conditional evaluation of {@link Rule} sets.
44+
*
45+
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
46+
*/
2747
public class Subset extends DefaultOperationBuilder implements CompositeOperation
2848
{
2949
private static Logger log = Logger.getLogger(Subset.class);
@@ -35,7 +55,7 @@ private Subset(Configuration config)
3555
this.config = config;
3656
}
3757

38-
public static Subset when(Configuration config)
58+
public static Subset evaluate(Configuration config)
3959
{
4060
return new Subset(config);
4161
}

0 commit comments

Comments
 (0)