@Override
public RepositoryFile updateFolder( RepositoryFile folder, String versionMessage ) {
Validate.isTrue( folder.isFolder() );
if ( !hasAccess( folder.getId(), EnumSet.of( WRITE ) ) ) {
throw new AccessDeniedException( "access denied" );
}
FileRecord fileRecord = idManager.getFileById( folder.getId() );
fileRecord.setFile( new RepositoryFile.Builder( folder ).hidden( folder.isHidden() ).title( findTitle( folder ) )
.description( findDesc( folder ) ).build() );
if ( folder.isVersioned() ) {