public abstract class AbstractFileNamingStrategy extends java.lang.Object implements FileNamingStrategy, Ordered
FileNamingStrategy implementations.
Also implements Ordered interface to be useful with
ChainedFileNamingStrategy and OrderedComposite.
Enable information from method isEnabled() can be used in cases
where strategy needs to be in place but perhaps should not be activated.
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractFileNamingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
abstract FileNamingStrategy |
createInstance()
Creates a new instance of
FileNamingStrategy. |
CodecInfo |
getCodecInfo()
Gets the codec info.
|
int |
getOrder()
Implementation should override this method to define a chaining order.
|
Path |
init(Path path)
Initialises a starting state of a strategy.
|
boolean |
isEnabled()
Checks if strategy is enabled.
|
void |
reset()
Resets the strategy to its original state.
|
void |
setCodecInfo(CodecInfo codecInfo)
Sets the codec info.
|
void |
setEnabled(boolean enabled)
Sets if this strategy is enabled.
|
void |
setOrder(int order)
Sets the order.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnext, resolvepublic int getOrder()
getOrder in interface OrderedOrdered.getOrder()public void setCodecInfo(CodecInfo codecInfo)
FileNamingStrategysetCodecInfo in interface FileNamingStrategycodecInfo - the new codec infopublic Path init(Path path)
FileNamingStrategyPath and
remove its own handled part if possible. Returned Path
is then passed into next strategy for it to able to
do its own initialisation logic.
Path passed to this method may be null indicating
that no further processing should be done or simply we don't
have information about the initialised path.
init in interface FileNamingStrategypath - the pathpublic void reset()
FileNamingStrategyreset in interface FileNamingStrategypublic abstract FileNamingStrategy createInstance()
FileNamingStrategyFactoryFileNamingStrategy.createInstance in interface FileNamingStrategyFactory<FileNamingStrategy>public void setOrder(int order)
order - the new orderOrderedpublic CodecInfo getCodecInfo()
public void setEnabled(boolean enabled)
enabled - the new enabledpublic boolean isEnabled()