01: // Copyright 2006, 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry.services;
16:
17: import java.util.Map;
18:
19: /**
20: * A thin wrapper around a set of {@link org.apache.tapestry.services.AliasContribution}s.
21: */
22: public interface AliasManager {
23: /**
24: * Filters down the contributions based on the mode. Each {@link AliasContribution contribution}
25: * will identify a contribution type and a non-null object that implements the type and may
26: * identify a mode. Only contributions where the mode is blank or the mode matches the provided
27: * mode are returned. Mode specific contributions quietly override non-specific contributions
28: * (where the mode is blank).
29: *
30: * @param mode
31: * @return map from contribution type to contribution object
32: */
33: Map<Class, Object> getAliasesForMode(String mode);
34: }
|