ro.isdc.wro.model.resource.support.naming
Class HashEncoderNamingStrategy
java.lang.Object
ro.isdc.wro.model.resource.support.naming.HashEncoderNamingStrategy
- All Implemented Interfaces:
- NamingStrategy
Deprecated. prefer Using DefaultHashEncoderNamingStrategy
.
public class HashEncoderNamingStrategy
- extends Object
- implements NamingStrategy
The simplest implementation of NamingStrategy
which encodes the hash code into the name of the
resource. For instance: For group.js
-> group-.js
. This implementation uses by
default CRC32HashBuilder
implementation.
- Author:
- Alex Objelean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALIAS
public static final String ALIAS
- Deprecated.
- See Also:
- Constant Field Values
HashEncoderNamingStrategy
public HashEncoderNamingStrategy()
- Deprecated.
newHashStrategy
protected HashStrategy newHashStrategy()
- Deprecated.
- Returns:
- an implementation of
HashStrategy
.
getHashStrategy
protected HashStrategy getHashStrategy()
- Deprecated.
- Returns:
- the
HashStrategy
to use for renaming. By default the used strategy is the same as the one
configured by wro4j. Override this method to provide a custom HashStrategy
.
rename
public String rename(String originalName,
InputStream inputStream)
throws IOException
- Deprecated.
- Creates a new name of the resource which encodes a version.
- Specified by:
rename
in interface NamingStrategy
- 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.