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