authority.internalSetLocalAuthService(localAuthService);
authority.internalSetRefs(refs);
authority.internalSetServices(services);
} catch (IOException ex) {
throw new StoreInternalException(ex, "Cannot create rootauthority.");
}
// create subsegment
File subSegmentDir = this.getSubSegmentDir(parentAuthorityDir, subSegmentName);
if (subSegmentDir.exists()) {
throw new StoreDuplicateEntryException("Subsegment exists already.");
}
FileSubSegment subSegment = new FileSubSegment(subSegmentDir);
try {
subSegment.internalSetName(subSegmentName);
subSegment.internalSetAuthorityId(authority.getAuthorityId());
subSegment.internalSetParentAuthorityId(parent.getAuthorityId());
} catch (IOException ex) {
throw new StoreInternalException(ex, "Cannot create subsegment.");
}
// done
return(subSegment);