    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 */
    019package org.apache.wiki;
    020
    021import org.apache.wiki.api.core.Engine;
    022import org.apache.wiki.api.exceptions.NoRequiredPropertyException;
    023
    024import java.io.IOException;
    025import java.util.Properties;
    026
    027
    028/**
    029 * Hooks all WikiProviders not using the public API into it.
    030 *
    031 * @deprecated - implement directly {@link org.apache.wiki.api.providers.WikiProvider}.
    032 * @see org.apache.wiki.api.providers.WikiProvider
    033 */
    034@Deprecated
    035public interface WikiProvider extends org.apache.wiki.api.providers.WikiProvider {
    036
    037    /**
    038     *  Initializes the page provider.
    039     *
    040     *  @param engine Engine to own this provider
    041     *  @param properties A set of properties used to initialize this provider
    042     *  @throws NoRequiredPropertyException If the provider needs a property which is not found in the property set
    043     *  @throws IOException If there is an IO problem
    044     */
    045    @Override
    046    default void initialize( final Engine engine, final Properties properties ) throws NoRequiredPropertyException, IOException {
    047        initialize( engine.adapt( WikiEngine.class ), properties );
    048    }
    049
    050    /**
    051     *  Initializes the page provider.
    052     *
    053     *  @param engine Engine to own this provider
    054     *  @param properties A set of properties used to initialize this provider
    055     *  @throws NoRequiredPropertyException If the provider needs a property which is not found in the property set
    056     *  @throws IOException If there is an IO problem
    057     */
    058    default void initialize( final WikiEngine engine, final Properties properties ) throws NoRequiredPropertyException, IOException {}
    059
    060}
    061
    062