ro.isdc.wro.model.resource.support.naming
Interface NamingStrategy

All Known Implementing Classes:
ConfigurableNamingStrategy, DefaultHashEncoderNamingStrategy, FolderHashEncoderNamingStrategy, HashEncoderNamingStrategy, NoOpNamingStrategy, TimestampNamingStrategy

public interface NamingStrategy

Used to version a resource name somehow. There could be many strategies, like timestamp, content hashing, etc.

Author:
Alex Objelean

Method Summary
 String rename(String originalName, InputStream inputStream)
          Creates a new name of the resource which encodes a version.
 

Method Detail

rename

String rename(String originalName,
              InputStream inputStream)
              throws IOException
Creates a new name of the resource which encodes a version.

Parameters:
originalName - original name of the resource.
inputStream - the stream of the content to rename.
Returns:
new name of the resource with version encoded.
Throws:
IOException - if there are stream reading problem.


Copyright © 2008-2013. All Rights Reserved.