Top Description Fields Constructors Methods
org.hibernate.boot.archive.internal

public Class StandardArchiveDescriptorFactory

extends Object
implements ArchiveDescriptorFactory, JarFileEntryUrlAdjuster
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.archive.spi.JarFileEntryUrlAdjuster, org.hibernate.boot.archive.spi.ArchiveDescriptorFactory
Imports
java.io.File, java.net.MalformedURLException, .URISyntaxException, .URL, org.hibernate.boot.archive.spi.ArchiveDescriptor, .ArchiveDescriptorFactory, .JarFileEntryUrlAdjuster, org.hibernate.internal.util.StringHelper, org.jboss.logging.Logger

Standard implementation of ArchiveDescriptorFactory
Authors
Emmanuel Bernard, Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final StandardArchiveDescriptorFactory
INSTANCE

Singleton access

private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public URL
adjustJarFileEntryUrl(URL
The url to adjust
url
,
URL
The root URL, for resolving relative URLs
rootUrl
)

Implements org.hibernate.boot.archive.spi.JarFileEntryUrlAdjuster.adjustJarFileEntryUrl.

Adjust the given URL, if needed.
public ArchiveDescriptor
buildArchiveDescriptor(URL
The url to the archive
url
)

Implements org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.buildArchiveDescriptor.

Build a descriptor of the archive indicated by the given url
public ArchiveDescriptor
buildArchiveDescriptor(URL
The url to the archive
url
,
String
The path within the given url that refers to the archive
entry
)

Implements org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.buildArchiveDescriptor.

Build a descriptor of the archive indicated by the path relative to the given url
protected String
public URL
getJarURLFromURLEntry(URL
The URL to an entry within a JAR
url
,
String
The entry that described the thing referred to by the URL relative to the JAR
entry
)

Implements org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.getJarURLFromURLEntry.

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.
public URL
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final StandardArchiveDescriptorFactory INSTANCE

Singleton access

logback to summary
private static final Logger log

Constructor Detail

StandardArchiveDescriptorFactoryback to summary
public StandardArchiveDescriptorFactory()

Method Detail

adjustJarFileEntryUrlback to summary
public URL adjustJarFileEntryUrl(URL url, URL rootUrl)

Implements org.hibernate.boot.archive.spi.JarFileEntryUrlAdjuster.adjustJarFileEntryUrl.

Doc from org.hibernate.boot.archive.spi.JarFileEntryUrlAdjuster.adjustJarFileEntryUrl.

Adjust the given URL, if needed.

Parameters
url:URL

The url to adjust

rootUrl:URL

The root URL, for resolving relative URLs

Returns:URL

The adjusted url.

Annotations
@Override
buildArchiveDescriptorback to summary
public ArchiveDescriptor buildArchiveDescriptor(URL url)

Implements org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.buildArchiveDescriptor.

Doc from org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.buildArchiveDescriptor.

Build a descriptor of the archive indicated by the given url

Parameters
url:URL

The url to the archive

Returns:ArchiveDescriptor

The descriptor

Annotations
@Override
buildArchiveDescriptorback to summary
public ArchiveDescriptor buildArchiveDescriptor(URL url, String entry)

Implements org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.buildArchiveDescriptor.

Doc from org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.buildArchiveDescriptor.

Build a descriptor of the archive indicated by the path relative to the given url

Parameters
url:URL

The url to the archive

entry:String

The path within the given url that refers to the archive

Returns:ArchiveDescriptor

The descriptor

Annotations
@Override
extractLocalFilePathback to summary
protected String extractLocalFilePath(URL url)
getJarURLFromURLEntryback to summary
public URL getJarURLFromURLEntry(URL url, String entry) throws IllegalArgumentException

Implements org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.getJarURLFromURLEntry.

Doc from org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.getJarURLFromURLEntry.

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.

Parameters
url:URL

The URL to an entry within a JAR

entry:String

The entry that described the thing referred to by the URL relative to the JAR

Returns:URL

The URL to the JAR

Annotations
@Override
Exceptions
IllegalArgumentException:
Generally indicates a problem with malformed urls.
getURLFromPathback to summary
public URL getURLFromPath(String jarPath)

Implements org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.getURLFromPath.

Doc from org.hibernate.boot.archive.spi.ArchiveDescriptorFactory.getURLFromPath.

Not used!

Parameters
jarPath:String

The jar path

Returns:URL

The url from the path?

Annotations
@Override