org.java.plugin.extension
Class InternalPluginLocation

java.lang.Object
  extended by org.java.plugin.extension.InternalPluginLocation
All Implemented Interfaces:
PluginManager.PluginLocation

public class InternalPluginLocation
extends java.lang.Object
implements PluginManager.PluginLocation

Simple internal plugin location. Both manifest and context location point to the given URL. The URL you pass to the constructor must point to a valid XML file that defines a plugin.

Author:
Thasso Griebel (thasso.griebel@gmail.com)

Constructor Summary
InternalPluginLocation(java.net.URL pluginXML)
          Create a new Internal location.
 
Method Summary
protected  java.lang.String convertToContext(java.lang.String urlString)
          Helper method that removes the plugin file from the path.
 java.net.URL getContextLocation()
          The context is unused here and points to the same URL as the Manifest.
 java.net.URL getManifestLocation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalPluginLocation

public InternalPluginLocation(java.net.URL pluginXML)
Create a new Internal location. The url must point to a valid Plugin XML file.

Parameters:
pluginXML - url to the plugin file
Method Detail

getManifestLocation

public java.net.URL getManifestLocation()
Specified by:
getManifestLocation in interface PluginManager.PluginLocation
Returns:
location of plug-in manifest

getContextLocation

public java.net.URL getContextLocation()
The context is unused here and points to the same URL as the Manifest.

Specified by:
getContextLocation in interface PluginManager.PluginLocation
Returns:
url to context (in this case unused and equal to the manifest URL)

convertToContext

protected java.lang.String convertToContext(java.lang.String urlString)
Helper method that removes the plugin file from the path. This also removes META-INF.

Parameters:
urlString -
Returns:
path to the plugins context folder


Copyright © 2010. All Rights Reserved.