- /**
- * Sets whether the given post reply is known.
- *
- * @param postReply
- * The post reply
- * @param known
- * {@code true} if the post reply is known, {@code false} otherwise
- */
- void setPostReplyKnown(PostReply postReply, boolean known) {
- lock.writeLock().lock();
- try {
- if (known) {
- knownPostReplies.add(postReply.getId());
- } else {
- knownPostReplies.remove(postReply.getId());
- }
- } finally {
- lock.writeLock().unlock();
- }
- }
-
- void moveUp(Album album) {
- lock.writeLock().lock();
- try {
- List<String> albums = albumChildren.get(album.getParent().getId());
- int currentIndex = albums.indexOf(album.getId());
- if (currentIndex == 0) {
- return;
- }
- albums.remove(album.getId());
- albums.add(currentIndex - 1, album.getId());
- } finally {
- lock.writeLock().unlock();
- }
- }
-
- void moveDown(Album album) {
- lock.writeLock().lock();
- try {
- List<String> albums = albumChildren.get(album.getParent().getId());
- int currentIndex = albums.indexOf(album.getId());
- if (currentIndex == (albums.size() - 1)) {
- return;
- }
- albums.remove(album.getId());
- albums.add(currentIndex + 1, album.getId());
- } finally {
- lock.writeLock().unlock();
- }
- }
-
- void moveUp(Image image) {