org.pentaho.reporting.libraries.repository

Class DefaultNameGenerator

public class DefaultNameGenerator extends Object implements NameGenerator

Constructor Summary
DefaultNameGenerator(ContentLocation location)
DefaultNameGenerator(ContentLocation location, String defaultNameHint)
DefaultNameGenerator(ContentLocation location, String defaultNameHint, String defaultSuffix)
Method Summary
StringgenerateName(String nameHint, String mimeType)
Generates a new, unique name for storing resources in the output repository.

Constructor Detail

DefaultNameGenerator

public DefaultNameGenerator(ContentLocation location)

DefaultNameGenerator

public DefaultNameGenerator(ContentLocation location, String defaultNameHint)

DefaultNameGenerator

public DefaultNameGenerator(ContentLocation location, String defaultNameHint, String defaultSuffix)

Method Detail

generateName

public String generateName(String nameHint, String mimeType)
Generates a new, unique name for storing resources in the output repository. Assuming that proper synchronization has been applied, the generated name will be unique within that repository.

Parameters: nameHint a user defined name for that resource. mimeType the mime type of the resource to be stored in the repository.

Returns: the generated, fully qualified name.