public class DefaultNameGenerator extends java.lang.Object implements NameGenerator
| Constructor and Description |
|---|
DefaultNameGenerator(ContentLocation location) |
DefaultNameGenerator(ContentLocation location,
java.lang.String defaultNameHint) |
DefaultNameGenerator(ContentLocation location,
java.lang.String defaultNameHint,
java.lang.String defaultSuffix) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateName(java.lang.String nameHint,
java.lang.String mimeType)
Generates a new, unique name for storing resources in the output
repository.
|
public DefaultNameGenerator(ContentLocation location)
public DefaultNameGenerator(ContentLocation location, java.lang.String defaultNameHint)
public DefaultNameGenerator(ContentLocation location, java.lang.String defaultNameHint, java.lang.String defaultSuffix)
public java.lang.String generateName(java.lang.String nameHint,
java.lang.String mimeType)
throws ContentIOException
generateName in interface NameGeneratornameHint - a user defined name for that resource.mimeType - the mime type of the resource to be stored in the
repository.ContentIOException - if the name could not be generated for any reason.