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