public ContentLocation createLocation(final String name) throws ContentCreationException
{
if (entries.containsKey(name))
{
throw new ContentCreationException("An entry with name '" + name + "' already exists.");
}
if (entries.containsKey(name))
{
throw new ContentCreationException("An entry with name '" + name + "' already exists.");
}
if (name.indexOf('/') != -1)
{
throw new ContentCreationException("The entry-name '" + name + "' is invalid.");
}
if ("".equals(name) || ".".equals(name) || "..".equals(name))
{
throw new ContentCreationException("The entry-name '" + name + "' is invalid.");
}
final ZipContentLocation value = new ZipContentLocation(repository, this, name);
entries.put(name, value);
return value;
}