/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


import org.apache.wiki.WikiContext;
import org.apache.wiki.WikiEngine;
import org.apache.wiki.api.plugin.WikiPlugin;
import org.apache.wiki.api.exceptions.PluginException;

import java.util.*;

/**
 *  Implements a simple plugin that just returns its text.
 *  <P>
 *  Parameters: text - text to return.
 *
 */
public class SamplePlugin2
    implements WikiPlugin
{
    public void initialize( WikiEngine engine )
        throws PluginException
    {
    }

    public String execute( WikiContext context, Map< String, String > params )
        throws PluginException
    {
        return params.get("text");
    }

}

@@ -556,17 +556,16 @@
 e.%0A */%0A%0A
-%0A
 import o
@@ -579,20 +579,25 @@
 he.wiki.
-Wiki
+api.core.
 Context;
@@ -620,20 +620,25 @@
 he.wiki.
-Wiki
+api.core.
 Engine;%0A
@@ -668,24 +668,33 @@
 api.
-plugin.WikiPlugi
+exceptions.PluginExceptio
 n;%0Ai
@@ -723,33 +723,20 @@
 api.
-exceptions.PluginExceptio
+plugin.Plugi
 n;%0A%0A
@@ -752,17 +752,19 @@
 va.util.
-*
+Map
 ;%0A%0A/**%0A 
@@ -901,20 +901,16 @@
 ePlugin2
-%0A   
  impleme
@@ -917,20 +917,17 @@
 nts 
-Wiki
 Plugin
+ %7B
 %0A
-%7B
 %0A   
@@ -951,20 +951,22 @@
 ialize( 
-Wiki
+final 
 Engine e
@@ -972,24 +972,16 @@
 engine )
-%0A       
  throws 
@@ -991,28 +991,24 @@
 ginException
-%0A   
  %7B%0A    %7D%0A%0A  
@@ -1036,12 +1036,14 @@
 te( 
-Wiki
+final 
 Cont
@@ -1054,16 +1054,22 @@
 context,
+ final
  Map%3C St
@@ -1091,24 +1091,16 @@
 params )
-%0A       
  throws 
@@ -1114,20 +1114,16 @@
 xception
-%0A   
  %7B%0A     
@@ -1147,14 +1147,16 @@
 get(
+ 
 %22text%22
+ 
 );%0A 

use new Plugin interface from public api