org.java.plugin.extension.util
Class PluginIOUtils
java.lang.Object
org.java.plugin.extension.util.PluginIOUtils
public class PluginIOUtils
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluginIOUtils
public PluginIOUtils()
getPluginPath
public static java.net.URL getPluginPath(PluginDescriptor desc)
- Takes the
PluginDescriptor
and uses its
PluginDescriptor.getLocation()
method to find the plugins
location. The location URL is reduced to its path part and the reduced
URL is returned. The default location points to a plugin.xml in the
plugins root and the path reduction should point to that root.
- Parameters:
desc
-
- Returns:
- url to the plugins root
getPluginPathTo
public static java.net.URL getPluginPathTo(PluginDescriptor desc,
java.lang.String path)
isResourceAvailable
public static boolean isResourceAvailable(PluginDescriptor pluginDescriptor,
java.lang.String resource)
- Returns true if the given
PluginDescriptor
contains the resource,
that is, the IoUtil.isResourceExists(URL)
returns true for the
URL created from the plugins location and the given resource.
- Parameters:
pluginDescriptor
- resource
-
- Returns:
- true if resource exists
getAllElementsIn
public static java.util.Collection<java.lang.String> getAllElementsIn(PluginDescriptor plugin,
java.lang.String path)
getAllElementsInDir
protected static java.util.Collection<java.lang.String> getAllElementsInDir(java.net.URL url,
java.lang.String path)
getAllElementsInJar
protected static java.util.Collection<java.lang.String> getAllElementsInJar(java.net.URL url,
java.lang.String path)
Copyright © 2010. All Rights Reserved.