    001// Copyright 2006, 2008, 2009, 2011 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
    015package org.apache.tapestry5.model;
    016
    017import org.apache.tapestry5.annotations.Component;
    018import org.apache.tapestry5.commons.Locatable;
    019
    020import java.util.List;
    021
    022/**
    023 * The model for a component embedded within another component, as defined by the {@link
    024 * org.apache.tapestry5.annotations.Component} annotation.
    025 */
    026public interface EmbeddedComponentModel extends Locatable
    027{
    028    /**
    029     * A unique id for the embedded component.
    030     */
    031    String getId();
    032
    033    /**
    034     * The type of the component, which may be blank.
    035     */
    036    String getComponentType();
    037
    038    /**
    039     * The class name of the component, as derived from the field to which the {@link Component} annotation is applied.
    040     * This value is only used when the componentType property is blank.
    041     */
    042    String getComponentClassName();
    043
    044    /**
    045     * A sorted list of the names of all bound parameters.
    046     */
    047    List<String> getParameterNames();
    048
    049    /**
    050     * The value for each parameter, which will be interpreted as a binding expression.
    051     */
    052    String getParameterValue(String parameterName);
    053
    054    /**
    055     * Returns the fully qualified class names of all mixins added to this component, sorted alphabetically.
    056     */
    057    List<String> getMixinClassNames();
    058
    059    /**
    060     * If true, then the component should inherit informal parameters from its container.
    061     */
    062    boolean getInheritInformalParameters();
    063
    064    /**
    065     * Returns the list of published parameters of this component (usually an empty list).
    066     *
    067     * @return list of parameter names to publish
    068     * @see org.apache.tapestry5.annotations.Component#publishParameters()
    069     * @since 5.1.0.0
    070     */
    071    List<String> getPublishedParameters();
    072
    073    /**
    074     * @param mixinClassName
    075     * @return the ordering constraints for the specified mixin, or null.
    076     * @since 5.2.0.0
    077     */
    078    String[] getConstraintsForMixin(String mixinClassName);
    079}