polishing

This commit is contained in:
Juergen Hoeller 2012-02-09 17:59:49 +01:00
parent 57851de88e
commit 1bd260adaf
3 changed files with 31 additions and 23 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -27,7 +27,7 @@ import org.springframework.util.Assert;
/**
* VFS based {@link Resource} implementation.
* Supports the corresponding VFS API versions on JBoss AS 5.x as well as 6.x.
* Supports the corresponding VFS API versions on JBoss AS 5.x as well as 6.x and 7.x.
*
* @author Ales Justin
* @author Juergen Hoeller
@ -47,22 +47,21 @@ public class VfsResource extends AbstractResource {
}
public boolean exists() {
return VfsUtils.exists(this.resource);
}
public boolean isReadable() {
return VfsUtils.isReadable(this.resource);
}
public long lastModified() throws IOException {
return VfsUtils.getLastModified(this.resource);
}
public InputStream getInputStream() throws IOException {
return VfsUtils.getInputStream(this.resource);
}
@Override
public boolean exists() {
return VfsUtils.exists(this.resource);
}
@Override
public boolean isReadable() {
return VfsUtils.isReadable(this.resource);
}
@Override
public URL getURL() throws IOException {
try {
return VfsUtils.getURL(this.resource);
@ -72,6 +71,7 @@ public class VfsResource extends AbstractResource {
}
}
@Override
public URI getURI() throws IOException {
try {
return VfsUtils.getURI(this.resource);
@ -81,10 +81,17 @@ public class VfsResource extends AbstractResource {
}
}
@Override
public File getFile() throws IOException {
return VfsUtils.getFile(this.resource);
}
@Override
public long lastModified() throws IOException {
return VfsUtils.getLastModified(this.resource);
}
@Override
public Resource createRelative(String relativePath) throws IOException {
if (!relativePath.startsWith(".") && relativePath.contains("/")) {
try {
@ -98,6 +105,7 @@ public class VfsResource extends AbstractResource {
return new VfsResource(VfsUtils.getRelative(new URL(getURL(), relativePath)));
}
@Override
public String getFilename() {
return VfsUtils.getName(this.resource);
}

View File

@ -2,15 +2,15 @@
/**
*
* Package providing integration of
* <a href="http://www.hibernate.org">Hibernate3</a>
* <a href="http://www.hibernate.org">Hibernate 3.x</a>
* with Spring concepts.
*
*
* <p>Contains SessionFactory helper classes, a template plus callback
* for Hibernate access, and an implementation of Spring's transaction SPI
* for local Hibernate transactions.
*
*
* <p><b>This package supports Hibernate 3.x only.</b>
* See the org.springframework.orm.hibernate package for Hibernate 2.1 support.
* See the <code>org.springframework.orm.hibernate4</code> package for Hibernate 4.x support.
*
*/
package org.springframework.orm.hibernate3;

View File

@ -2,15 +2,15 @@
/**
*
* Package providing integration of
* <a href="http://www.hibernate.org">Hibernate 4.0</a>
* <a href="http://www.hibernate.org">Hibernate 4.x</a>
* with Spring concepts.
*
*
* <p>Contains an implementation of Spring's transaction SPI for local Hibernate transactions.
* This package is intentionally rather minimal, relying on native Hibernate builder APIs
* for building a SessionFactory (for example in an @Bean method in a @Configuration class).
* This package is intentionally rather minimal, with no template classes or the like,
* in order to follow native Hibernate recommendations as closely as possible.
*
* <p><b>This package supports Hibernate 4.x only.</b>
* See the org.springframework.orm.hibernate3 package for Hibernate 3.x support.
* See the <code>org.springframework.orm.hibernate3</code> package for Hibernate 3.x support.
*
*/
package org.springframework.orm.hibernate4;