001 // Copyright 2009 The Apache Software Foundation 002 // 003 // Licensed under the Apache License, Version 2.0 (the "License"); 004 // you may not use this file except in compliance with the License. 005 // You may obtain a copy of the License at 006 // 007 // http://www.apache.org/licenses/LICENSE-2.0 008 // 009 // Unless required by applicable law or agreed to in writing, software 010 // distributed under the License is distributed on an "AS IS" BASIS, 011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 012 // See the License for the specific language governing permissions and 013 // limitations under the License. 014 package org.apache.tapestry5.ioc; 015 016 /** 017 * Constructs order constraints for {@link OrderedConfiguration}. 018 * 019 * @since 5.2.0.0 020 */ 021 public final class OrderConstraintBuilder 022 { 023 /** 024 * Adds an <i>after:id</i> constraint. 025 */ 026 public static OrderConstraint after(String id) 027 { 028 return new OrderConstraint().after(id); 029 } 030 031 /** 032 * Adds an <i>after:*</i> constraint. 033 */ 034 public static OrderConstraint afterAll() 035 { 036 return new OrderConstraint().afterAll(); 037 } 038 039 /** 040 * Adds a <i>before:id</i> constraint. 041 */ 042 public static OrderConstraint before(String id) 043 { 044 return new OrderConstraint().before(id); 045 } 046 047 /** 048 * Adds a <i>before:*</i> constraint. 049 */ 050 public static OrderConstraint beforeAll() 051 { 052 return new OrderConstraint().beforeAll(); 053 } 054 }