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 015package org.apache.tapestry.services; 016 017import org.apache.tapestry.engine.IEngineService; 018 019/** 020 * Service interface for <code>tapestry.services.ServiceMap</code>, provides access to engine 021 * services defined in the HiveMind module deployment descriptors. 022 * <p> 023 * Note: In Tapestry 3.0 and earlier, a <service> element in the application and library 024 * specifications was used to define services. This is no longer supported. 025 * 026 * @author Howard Lewis Ship 027 * @since 4.0 028 */ 029public interface ServiceMap 030{ 031 /** 032 * Returns the named service. 033 * 034 * @param name 035 * the unique name for the service, as defined by each service instance's 036 * {@link IEngineService#getName()} method. 037 * @returns the named service 038 * @throws org.apache.hivemind.ApplicationRuntimeException 039 * if the named service does not exist 040 */ 041 public IEngineService getService(String name); 042 043 /** 044 * Returns true if the name is a known service, or false otherwise. 045 */ 046 047 public boolean isValid(String name); 048}