## org.pentaho.reporting.libraries.repository
Class DefaultNameGenerator

    java.lang.Object
      org.pentaho.reporting.libraries.repository.DefaultNameGenerator

All Implemented Interfaces:
  NameGenerator

    public class DefaultNameGenerator

extends java.lang.Object
implements NameGenerator

Constructor Summary
`DefaultNameGenerator(ContentLocation location)`
`DefaultNameGenerator(ContentLocation location, java.lang.String defaultNameHint)`
`DefaultNameGenerator(ContentLocation location, java.lang.String defaultNameHint, java.lang.String defaultSuffix)`

Method Summary
`java.lang.String` `generateName(java.lang.String nameHint, java.lang.String mimeType)` Generates a new, unique name for storing resources in the output repository.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultNameGenerator

    public DefaultNameGenerator(ContentLocation location)

### DefaultNameGenerator

    public DefaultNameGenerator(ContentLocation location,
                                java.lang.String defaultNameHint)

### DefaultNameGenerator

    public DefaultNameGenerator(ContentLocation location,
                                java.lang.String defaultNameHint,
                                java.lang.String defaultSuffix)

Method Detail

### generateName

    public java.lang.String generateName(java.lang.String nameHint,
                                         java.lang.String mimeType)
                                  throws ContentIOException

  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.

  Specified by:
    `generateName` in interface `NameGenerator`
  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.
  Throws:
    `ContentIOException` - if the name could not be generated for any reason.