001/* 
002    Licensed to the Apache Software Foundation (ASF) under one
003    or more contributor license agreements.  See the NOTICE file
004    distributed with this work for additional information
005    regarding copyright ownership.  The ASF licenses this file
006    to you under the Apache License, Version 2.0 (the
007    "License"); you may not use this file except in compliance
008    with the License.  You may obtain a copy of the License at
009
010       http://www.apache.org/licenses/LICENSE-2.0
011
012    Unless required by applicable law or agreed to in writing,
013    software distributed under the License is distributed on an
014    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015    KIND, either express or implied.  See the License for the
016    specific language governing permissions and limitations
017    under the License.  
018 */
019
020package org.apache.wiki.api.engine;
021
022import java.util.List;
023
024import org.apache.wiki.event.WikiEvent;
025import org.apache.wiki.ui.admin.AdminBean;
026
027public interface AdminBeanManager {
028
029    void initialize();
030
031    /**
032     *  Lists all administration beans which are currently known
033     *  and instantiated.
034     *
035     *  @return all AdminBeans known to the manager
036     */
037    List<AdminBean> getAllBeans();
038
039    /**
040     *  Locates a bean based on the AdminBean.getId() out of all
041     *  the registered beans.
042     *
043     *  @param id ID
044     *  @return An AdminBean, or null, if no such bean is found.
045     */
046    AdminBean findBean(String id);
047
048    /**
049     *  Unregisters AdminBeans upon SHUTDOWN event.
050     *
051     *  @param event the WikiEvent
052     */
053    void actionPerformed(WikiEvent event);
054    
055    /**
056     *  Returns the type identifier for a string type.
057     *
058     *  @param type A type string.
059     *  @return A type value.
060     */
061    int getTypeFromString( String type );
062
063}