org.xwiki.rendering.internal.macro.script
Interface AttachmentClassLoaderFactory
- All Known Implementing Classes:
- DefaultAttachmentClassLoaderFactory
@ComponentRole
public interface AttachmentClassLoaderFactory
Create a classloader that can load classes and resources from JARs specified as attachments of wiki pages.
- Since:
- 2.0.1
- Version:
- $Id$
createAttachmentClassLoader
ExtendedURLClassLoader createAttachmentClassLoader(java.lang.String jarURLs,
java.lang.ClassLoader parent)
throws java.lang.Exception
- Parameters:
jarURLs - the comma-separated lists of URLs pointing to the JARs that should be made visible in the
classloader.parent - the parent classloader in which to look first for a resource/class
- Returns:
- the classloader in which the passed JARs are visible
- Throws:
java.lang.Exception - in case of an error, for example if an attachment cannot be loaded
extendAttachmentClassLoader
void extendAttachmentClassLoader(java.lang.String jarURLs,
ExtendedURLClassLoader source)
throws java.lang.Exception
- Augment the passed classloader with the JARs definitions passed as parameter.
- Parameters:
jarURLs - the comma-separated lists of URLs pointing to the JARs that should be made visible in the
classloader.source - the classloader to augment
- Throws:
java.lang.Exception - in case of an error, for example if an attachment cannot be loaded
Copyright © 2004-2011 XWiki. All Rights Reserved.