    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.internal.model;
    016
    017import org.apache.tapestry5.model.ComponentModel;
    018import org.apache.tapestry5.model.ParameterModel;
    019
    020public class ParameterModelImpl implements ParameterModel
    021{
    022    private final ComponentModel componentModel;
    023
    024    private final String name;
    025
    026    private final boolean required;
    027
    028    private final boolean allowNull;
    029
    030    private final String defaultBindingPrefix;
    031
    032    private final boolean cached;
    033
    034    public ParameterModelImpl(ComponentModel componentModel, String name, boolean required, boolean allowNull, String defaultBindingPrefix, boolean cached)
    035    {
    036        this.componentModel = componentModel;
    037        this.name = name;
    038        this.required = required;
    039        this.allowNull = allowNull;
    040        this.defaultBindingPrefix = defaultBindingPrefix;
    041        this.cached = cached;
    042    }
    043
    044    public String getName()
    045    {
    046        return name;
    047    }
    048
    049    public boolean isRequired()
    050    {
    051        return required;
    052    }
    053
    054    public String getDefaultBindingPrefix()
    055    {
    056        return defaultBindingPrefix;
    057    }
    058
    059    public boolean isAllowNull()
    060    {
    061        return allowNull;
    062    }
    063
    064    public boolean isCached()
    065    {
    066        return cached;
    067    }
    068
    069    public ComponentModel getComponentModel()
    070    {
    071        return componentModel;
    072    }
    073}