001 // Copyright 2004, 2005 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
015 package org.apache.tapestry.spec;
016
017 import org.apache.hivemind.Locatable;
018 import org.apache.hivemind.LocationHolder;
019
020 /**
021 * Stores a binding specification, which identifies the static value or OGNL expression for the
022 * binding. The name of the binding (which matches a bindable property of the contined component) is
023 * implicitly known.
024 *
025 * @author glongman@intelligentworks.com
026 */
027 public interface IBindingSpecification extends LocationHolder, Locatable
028 {
029 /**
030 * Returns the type of binding specification; this is generally
031 * {@link org.apache.tapestry.spec.BindingType#PREFIXED}.
032 */
033
034 public BindingType getType();
035
036 /**
037 * For a prefixed binding specification (the typical type), the value is a binding reference; a
038 * string used to contruct the actual binding, and consists of a prefix (such as "ognl:" or
039 * "message:") and a locator. The prefix selects a
040 * {@link org.apache.tapestry.binding.BindingFactory}, and the locator is passed to the
041 * factory, which uses it to construct the {@link org.apache.tapestry.IBinding}instance.
042 */
043
044 public String getValue();
045
046 public void setType(BindingType type);
047
048 public void setValue(String value);
049 }