Methods Summary |
---|
java.net.URL | extractDescriptorUrl(java.lang.String resource)
try
{
VirtualFile vf = unit.getMetaDataFile(resource);
if (vf == null) return null;
return vf.toURL();
}
catch (Exception e)
{
throw new RuntimeException(e);
}
|
public java.lang.ClassLoader | getClassLoader()
return unit.getClassLoader();
|
public java.util.List | getClasses()
return null;
|
public java.lang.String | getDefaultEntityManagerName()
String url = getUrl().toString();
String name = url.substring(url.lastIndexOf('/") + 1, url.lastIndexOf('."));
return name;
|
public java.util.Map | getDefaultPersistenceProperties()
return defaultPersistenceProperties;
|
public java.net.URL | getEjbJarXml()
return extractDescriptorUrl("ejb-jar.xml");
|
public org.jboss.ejb3.interceptor.InterceptorInfoRepository | getInterceptorInfoRepository()
return interceptorInfoRepository;
|
public java.net.URL | getJbossXml()
return extractDescriptorUrl("jboss.xml");
|
public java.util.Hashtable | getJndiProperties()
return null;
|
public org.jboss.virtual.VirtualFile | getMetaDataFile(java.lang.String name)
return unit.getMetaDataFile(name);
|
public java.net.URL | getPersistenceXml()
return extractDescriptorUrl("persistence.xml");
|
public java.net.URL | getRelativeURL(java.lang.String jar)
try
{
return new URL(jar);
}
catch (MalformedURLException e)
{
try
{
if (jar.startsWith(".."))
{
if (getUrl() == null)
throw new RuntimeException("relative <jar-file> not allowed when standalone deployment unit is used");
String tmpjar = jar.substring(3);
VirtualFile vf = unit.getDeploymentContext().getRoot().getParent().findChild(tmpjar);
return vf.toURL();
}
else
{
File fp = new File(jar);
return fp.toURL();
}
}
catch (Exception e1)
{
throw new RuntimeException("could not find relative path: " + jar, e1);
}
}
|
public java.lang.ClassLoader | getResourceLoader()
return unit.getClassLoader();
|
public java.util.List | getResources(org.jboss.virtual.VirtualFileFilter filter)
VisitorAttributes va = new VisitorAttributes();
va.setLeavesOnly(true);
SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
va.setRecurseFilter(noJars);
FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
List<VirtualFile> classpath = unit.getDeploymentContext().getClassPath();
if (classpath != null)
{
for (VirtualFile vf : classpath)
{
try
{
vf.visit(visitor);
}
catch (IOException e)
{
throw new RuntimeException(e);
}
}
}
return visitor.getMatched();
|
public org.jboss.virtual.VirtualFile | getRootFile()
return unit.getDeploymentContext().getRoot();
|
public java.lang.String | getShortName()
return unit.getDeploymentContext().getRoot().getName();
|
public java.net.URL | getUrl()
try
{
return unit.getDeploymentContext().getRoot().toURL();
}
catch (Exception e)
{
throw new RuntimeException(e);
}
|
public void | setDefaultPersistenceProperties(java.util.Map defaultPersistenceProperties)
this.defaultPersistenceProperties = defaultPersistenceProperties;
|