001 /* 002 * Copyright 2005 Stephen McConnell 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 013 * implied. 014 * 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019 package net.dpml.transit.model; 020 021 import java.rmi.Remote; 022 import java.rmi.RemoteException; 023 024 import net.dpml.lang.UnknownKeyException; 025 026 /** 027 * A LayoutRegistryModel maintains a collection of layout models. 028 * 029 * @author <a href="http://www.dpml.net">Digital Product Meta Library</a> 030 * @version 1.1.0 031 */ 032 public interface LayoutRegistryModel extends Remote 033 { 034 /** 035 * Return the set of location resolver models. 036 * @return the model array. 037 * @exception RemoteException if a remote exception occurs 038 */ 039 LayoutModel[] getLayoutModels() throws RemoteException; 040 041 /** 042 * Return a layout resolver model matching the supplied id. If the id is unknown 043 * an implementation shall return a null value. 044 * @param id the layout id 045 * @return the layout model 046 * @exception UnknownKeyException if the key is unknown 047 * @exception RemoteException if a remote exception occurs 048 */ 049 LayoutModel getLayoutModel( String id ) throws UnknownKeyException, RemoteException; 050 051 /** 052 * Add a change listener. 053 * @param listener the registry change listener to add 054 * @exception RemoteException if a remote exception occurs 055 */ 056 void addLayoutRegistryListener( LayoutRegistryListener listener ) throws RemoteException; 057 058 /** 059 * Remove a change listener. 060 * @param listener the registry change listener to remove 061 * @exception RemoteException if a remote exception occurs 062 */ 063 void removeLayoutRegistryListener( LayoutRegistryListener listener ) throws RemoteException; 064 065 } 066