// String map = getCleanParameter( params, PARAM_MAP );
String border = getCleanParameter( params, PARAM_BORDER );
if( src == null )
{
throw new PluginException("Parameter 'src' is required for Image plugin");
}
if( cssclass == null ) cssclass = "imageplugin";
if( target != null && !validTargetValue(target) )
{
target = null; // not a valid value so ignore
}
try
{
AttachmentManager mgr = engine.getAttachmentManager();
Attachment att = mgr.getAttachmentInfo( context, src );
if( att != null )
{
src = context.getURL( WikiContext.ATTACH, att.getName() );
}
}
catch( ProviderException e )
{
throw new PluginException( "Attachment info failed: "+e.getMessage() );
}
StringBuffer result = new StringBuffer();
result.append( "<table border=\"0\" class=\""+cssclass+"\"" );