1/*2 * $Id: AttributeResolver.java 765774 2009-04-16 21:43:00Z apetrelli $3 *4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License.20 */2122package org.apache.tiles.template;
2324import org.apache.tiles.Attribute;
25import org.apache.tiles.TilesContainer;
2627/***28 * Resolves an attribute, depending on the given parameters.29 *30 * @version $Rev: 765774 $ $Date: 2009-04-16 23:43:00 +0200 (gio, 16 apr 2009) $31 * @since 2.2.032 */33publicinterfaceAttributeResolver {
3435/***36 * Computes the attribute.37 *38 * @param container The Tiles container to use.39 * @param attribute The attribute to return immediately, if not null.40 * @param name The name of the attribute.41 * @param role A comma-separated list of roles. If present, the attribute42 * will be rendered only if the current user belongs to one of the roles.43 * @param ignore If <code>true</code> if the computed attribute is null, this problem will be ignored.44 * @param defaultValue The default value of the attribute. To use only if the attribute was not computed.45 * @param defaultValueRole The default comma-separated list of roles. To use only if the attribute was not computed.46 * @param defaultValueType The default type of the attribute. To use only if the attribute was not computed.47 * @param requestItems The request objects.48 * @return The computed attribute.49 * @since 2.2.050 */51 Attribute computeAttribute(TilesContainer container, Attribute attribute,
52 String name, String role, boolean ignore,
53 Object defaultValue, String defaultValueRole, String defaultValueType, Object... requestItems);
54 }