@Override
public RepositoryFile createFile( final Serializable parentFolderId, final RepositoryFile file,
final IRepositoryFileData data, final RepositoryFileAcl acl, final String versionMessage ) {
Validate.isTrue( !file.isFolder() );
if ( !hasAccess( parentFolderId, EnumSet.of( WRITE ) ) ) {
throw new AccessDeniedException( "access denied" );
}
FileRecord parentFolder = idManager.getFileById( parentFolderId );
RepositoryFile fileFromRepo =
new RepositoryFile.Builder( file ).path( parentFolder.getPath() + RepositoryFile.SEPARATOR + file.getName() )
.title( findTitle( file ) ).description( findDesc( file ) ).build();