]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/OsFileFactoryBean.java
Fix SVN issues
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / core / execution / OsFileFactoryBean.java
index b566e57423fd1a5feb4feebc185c87ec83b10080..b8c1f1c6b0d806cec40a6eba7930732b503794fc 100644 (file)
@@ -6,25 +6,26 @@ import org.springframework.beans.factory.FactoryBean;
 import org.springframework.core.io.Resource;
 import org.springframework.util.Assert;
 
-/** Workaround when execution placedholders needs to be passed. */
+/** Retrieve an OS File from the given resource. */
 public class OsFileFactoryBean implements FactoryBean {
        private ExecutionResources executionResources;
        private Resource resource;
        private Boolean overwrite = false;
 
-       /** Return an existing file on the fiel system. */
+       /** Return an existing file on the file system. */
        public Object getObject() throws Exception {
                Assert.notNull(executionResources, "executionResources is null");
-               Assert.notNull(resource, "relativePath is null");
+               Assert.notNull(resource, "resource is null");
                return executionResources.getAsOsPath(resource, overwrite);
        }
 
+       /** Return {@link Object} because CGLIB is unable to proxy {@link File}.*/
        public Class<? extends Object> getObjectType() {
-               return File.class;
+               return CharSequence.class;
        }
 
        public boolean isSingleton() {
-               return true;
+               return false;
        }
 
        /** The execution resources object. */