public ContentLocation createLocation(String name)
throws ContentCreationException
{
if (entries.containsKey(name))
{
throw new ContentCreationException("Entry already exists");
}
final ZipContentLocation item = new ZipContentLocation(repository, this, name);
entries.put (name, item);
try
{
final ZipEntry entry = new ZipEntry(contentId);
repository.writeDirectory(entry);
return item;
}
catch (IOException e)
{
throw new ContentCreationException("Failed to create directory.");
}
}