Hmm, agree + defining a custom resource I don't want to define an URL + an URI.
createRelative shouldn't be in Resource but in a upper API (filesystem/resourcemanager or anything) IMO I'd make it implement optionally Closeable, this way isOpen should be useless (implementation detail) Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-12-16 9:07 GMT+01:00 Oliver B. Fischer <[email protected]>: > Dear all, > > while thinking about different scenarios I think the Resource interface is a > little bit to much oriented to file based resources. > > public interface Resource { > boolean exists(); > boolean isReadable(); > boolean isOpen(); > URL getURL() throws IOException; > URI getURI() throws IOException; > File getFile() throws IOException; > long contentLength() throws IOException; > long lastModified() throws IOException; > Resource createRelative(String relativePath) throws IOException; > String getFilename(); > String getDescription(); > } > > How to handle configuration resources overhanded via REST? There is no > filename, no modification date. > > I suppose the remodel this interface to be more generic and to be not so > much file system oriented. > > WDYT? > > Oliver > > -- > N Oliver B. Fischer > A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany > P +49 30 44793251 > M +49 178 7903538 > E [email protected] > S oliver.b.fischer > J [email protected] > X http://xing.to/obf >
