org.kuali.ole.utility
Class ResourceUtil
java.lang.Object
org.kuali.ole.utility.ResourceUtil
public class ResourceUtil
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceUtil
public ResourceUtil()
getProperty
public String getProperty(Properties props,
String defaultPrefix,
String envPrefix,
String key)
getSystemProperty
public String getSystemProperty(String property,
String defaultValue)
validate
public void validate(ResourceItem item)
createOrVerifyAsNeeded
protected void createOrVerifyAsNeeded(ResourceItem item)
setSystemProperty
public void setSystemProperty(String property,
String value)
copy
protected void copy(String location,
File file)
throws IOException
- Throws:
IOException
isValidExistingResource
protected boolean isValidExistingResource(ResourceItem item)
getPropertiesFromSystemProperty
public Properties getPropertiesFromSystemProperty(String systemProperty)
throws IOException
- Throws:
IOException
getProperties
public Properties getProperties(String location)
throws IOException
- Throws:
IOException
getInputStream
public InputStream getInputStream(String location)
throws IOException
- Throws:
IOException
createLocalDirectory
public void createLocalDirectory(File dir)
isLocalDirectory
public boolean isLocalDirectory(String location)
exists
public boolean exists(String location)
- Return true if
location
is a file on the local file system or points to a resource Spring's resource
loading API can understand and locate. For example, classpath:config.properties
. Return false
otherwise.
getFile
public File getFile(String location)
copyDirectory
public void copyDirectory(String srcLoc,
File dstDir)
Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.