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.
014package org.apache.tapestry5.ioc;
015
016import org.apache.tapestry5.commons.OrderedConfiguration;
017
018/**
019 * Constructs order constraints for {@link OrderedConfiguration}.
020 * 
021 * @since 5.2.0.0
022 */
023public final class OrderConstraintBuilder
024{
025    /**
026     * Adds an <i>after:id</i> constraint.
027     */
028    public static OrderConstraint after(String id)
029    {
030        return new OrderConstraint().after(id);
031    }
032    
033    /**
034     * Adds an <i>after:*</i> constraint.
035     */
036    public static OrderConstraint afterAll()
037    {
038        return new OrderConstraint().afterAll();
039    }
040    
041    /**
042     * Adds a <i>before:id</i> constraint.
043     */
044    public static OrderConstraint before(String id)
045    {
046        return new OrderConstraint().before(id);
047    }
048    
049    /**
050     * Adds a <i>before:*</i> constraint.
051     */
052    public static OrderConstraint beforeAll()
053    {
054        return new OrderConstraint().beforeAll();
055    }
056}