    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.api.providers;
    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 *  A generic Wiki provider for all sorts of things that the Wiki can store.
    030 *
    031 *  @since 2.0
    032 */
    033public interface WikiProvider {
    034
    035    /** Passing this to any method should get the latest version */
    036    int LATEST_VERSION = -1;
    037
    038    /**
    039     *  Initializes the page provider.
    040     *
    041     *  @param engine Engine to own this provider
    042     *  @param properties A set of properties used to initialize this provider
    043     *  @throws NoRequiredPropertyException If the provider needs a property which is not found in the property set
    044     *  @throws IOException If there is an IO problem
    045     */
    046    void initialize( Engine engine, Properties properties ) throws NoRequiredPropertyException, IOException;
    047
    048    /**
    049     *  Return a valid HTML string for information.  May be anything.
    050     *  @since 1.6.4
    051     *  @return A string describing the provider.
    052     */
    053    String getProviderInfo();
    054
    055}
    056
    057