Package org.hibernate.osgi
Class OsgiArchiveDescriptorFactory
- java.lang.Object
-
- org.hibernate.osgi.OsgiArchiveDescriptorFactory
-
- All Implemented Interfaces:
ArchiveDescriptorFactory
public class OsgiArchiveDescriptorFactory extends java.lang.Object implements ArchiveDescriptorFactory
ArchiveDescriptorFactory implementation for OSGi environments
-
-
Constructor Summary
Constructors Constructor Description OsgiArchiveDescriptorFactory(org.osgi.framework.Bundle persistenceBundle)
Creates a OsgiArchiveDescriptorFactory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArchiveDescriptor
buildArchiveDescriptor(java.net.URL url)
Build a descriptor of the archive indicated by the given urlArchiveDescriptor
buildArchiveDescriptor(java.net.URL url, java.lang.String entry)
Build a descriptor of the archive indicated by the path relative to the given urljava.net.URL
getJarURLFromURLEntry(java.net.URL url, java.lang.String entry)
Given a URL which defines an entry within a JAR (really any "bundled archive" such as a jar file, zip, etc) and an entry within that JAR, find the URL to the JAR itself.java.net.URL
getURLFromPath(java.lang.String jarPath)
Not used!
-
-
-
Method Detail
-
buildArchiveDescriptor
public ArchiveDescriptor buildArchiveDescriptor(java.net.URL url)
Description copied from interface:ArchiveDescriptorFactory
Build a descriptor of the archive indicated by the given url- Specified by:
buildArchiveDescriptor
in interfaceArchiveDescriptorFactory
- Parameters:
url
- The url to the archive- Returns:
- The descriptor
-
buildArchiveDescriptor
public ArchiveDescriptor buildArchiveDescriptor(java.net.URL url, java.lang.String entry)
Description copied from interface:ArchiveDescriptorFactory
Build a descriptor of the archive indicated by the path relative to the given url- Specified by:
buildArchiveDescriptor
in interfaceArchiveDescriptorFactory
- Parameters:
url
- The url to the archiveentry
- The path within the given url that refers to the archive- Returns:
- The descriptor
-
getJarURLFromURLEntry
public java.net.URL getJarURLFromURLEntry(java.net.URL url, java.lang.String entry) throws java.lang.IllegalArgumentException
Description copied from interface:ArchiveDescriptorFactory
Given a URL which defines an entry within a JAR (really any "bundled archive" such as a jar file, zip, etc) and an entry within that JAR, find the URL to the JAR itself.- Specified by:
getJarURLFromURLEntry
in interfaceArchiveDescriptorFactory
- Parameters:
url
- The URL to an entry within a JARentry
- The entry that described the thing referred to by the URL relative to the JAR- Returns:
- The URL to the JAR
- Throws:
java.lang.IllegalArgumentException
- Generally indicates a problem with malformed urls.
-
getURLFromPath
public java.net.URL getURLFromPath(java.lang.String jarPath)
Description copied from interface:ArchiveDescriptorFactory
Not used!- Specified by:
getURLFromPath
in interfaceArchiveDescriptorFactory
- Parameters:
jarPath
- The jar path- Returns:
- The url from the path?
-
-