Tested these refactors and everything is working correctly.

This commit is contained in:
U-BASIS\dsmyda 2018-11-02 09:31:23 -04:00
parent a9df539136
commit 2bfec7517f
3 changed files with 9 additions and 6 deletions

View File

@ -22,10 +22,8 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -177,6 +175,8 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
List<ContentTag> tags = FileNodeUtil.getContentTagsFromDatabase(content); List<ContentTag> tags = FileNodeUtil.getContentTagsFromDatabase(content);
Pair<Score, String> scorePropertyAndDescription Pair<Score, String> scorePropertyAndDescription
= FileNodeUtil.getScorePropertyAndDescription(content, tags); = FileNodeUtil.getScorePropertyAndDescription(content, tags);
CorrelationAttributeInstance attribute =
FileNodeUtil.getCorrelationAttributeInstance(content);
updateProperty( updateProperty(
new ToggleableNodeProperty( new ToggleableNodeProperty(
SCORE.toString(), SCORE.toString(),
@ -185,7 +185,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
new ToggleableNodeProperty( new ToggleableNodeProperty(
COMMENT.toString(), COMMENT.toString(),
NO_DESCR, NO_DESCR,
FileNodeUtil.getCommentProperty(tags, null)) { FileNodeUtil.getCommentProperty(tags, attribute)) {
}); });
} }
} else if (eventType.equals(Case.Events.CONTENT_TAG_DELETED.toString())) { } else if (eventType.equals(Case.Events.CONTENT_TAG_DELETED.toString())) {
@ -197,6 +197,8 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
List<ContentTag> tags = FileNodeUtil.getContentTagsFromDatabase(content); List<ContentTag> tags = FileNodeUtil.getContentTagsFromDatabase(content);
Pair<Score, String> scorePropertyAndDescription Pair<Score, String> scorePropertyAndDescription
= FileNodeUtil.getScorePropertyAndDescription(content, tags); = FileNodeUtil.getScorePropertyAndDescription(content, tags);
CorrelationAttributeInstance attribute =
FileNodeUtil.getCorrelationAttributeInstance(content);
updateProperty( updateProperty(
new ToggleableNodeProperty( new ToggleableNodeProperty(
SCORE.toString(), SCORE.toString(),
@ -205,7 +207,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
new ToggleableNodeProperty( new ToggleableNodeProperty(
COMMENT.toString(), COMMENT.toString(),
NO_DESCR, NO_DESCR,
FileNodeUtil.getCommentProperty(tags, null)) FileNodeUtil.getCommentProperty(tags, attribute))
); );
} }
} else if (eventType.equals(Case.Events.CR_COMMENT_CHANGED.toString())) { } else if (eventType.equals(Case.Events.CR_COMMENT_CHANGED.toString())) {

View File

@ -51,7 +51,7 @@ public abstract class AbstractFsContentNode<T extends AbstractFile> extends Abst
*/ */
AbstractFsContentNode(T content, boolean directoryBrowseMode) { AbstractFsContentNode(T content, boolean directoryBrowseMode) {
super(content); super(content);
this.setDisplayName(AbstractAbstractFileNode.getContentDisplayName(content)); this.setDisplayName(FileNodeUtil.getContentDisplayName(content));
this.directoryBrowseMode = directoryBrowseMode; this.directoryBrowseMode = directoryBrowseMode;
} }

View File

@ -37,7 +37,8 @@ class ToggleableNodeProperty extends NodeProperty {
} }
/** /**
* * Allows a property to be either enabled or disabled. When creating a sheet,
* this method is used to filter out from displaying in the UI.
* *
* @return boolean denoting the availiability of this property. True by default. * @return boolean denoting the availiability of this property. True by default.
*/ */