hu.midori.kosmos.server.store
Interface StaticContentStore

All Known Implementing Classes:
WebdavStaticContentStore

public interface StaticContentStore

Any pluggable store implementation must implement this interface. The concrete implementations can have their own naming policy, cache eviction policy, storing mechanism and such.

Version:
$Id$
Author:
Aron Gombas

Method Summary
 void begin()
          Called before a service starts storing its files.
 void end()
          Called after a service has stored all its files.
 java.lang.String storeFile(java.lang.String fileName, java.io.InputStream in)
          Stores the passed stream to an implementation-dependent "storage".
 

Method Detail

begin

void begin()
Called before a service starts storing its files. A service call results in the sequence:
 begin()
 storeFile()
 storeFile()
 ...
 end()
 
This can be used mostly for optimization purposes. Leave the implementation empty if there is no way to optimize "bulk storings" in your concrete implementation.

See Also:
end()

end

void end()
Called after a service has stored all its files.

See Also:
begin()

storeFile

java.lang.String storeFile(java.lang.String fileName,
                           java.io.InputStream in)
                           throws java.lang.Exception
Stores the passed stream to an implementation-dependent "storage".

Returns:
the absolute URL that points to the resulted file.
Throws:
java.lang.Exception