
com.almworks.jira.structure.api2g.attribute.AttributeTrail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of structure-api Show documentation
Show all versions of structure-api Show documentation
Public API for the Structure Plugin for JIRA
package com.almworks.jira.structure.api2g.attribute;
import com.almworks.jira.structure.api2g.attribute.loader.ForestDependencyType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.Set;
public interface AttributeTrail {
AttributeTrail EMPTY = new EmptyTrail();
@NotNull
Set getTrailMode();
@Nullable
ItemSet getAdditionalItemDependencies(Long row);
/**
* @return true if the value for the row can be reliably cached and invalidated, by observing forest changes (according to trail mode),
* and item changes (according to row's item and additional dependencies). {@code false} is returned only when the row
* has been mapped to another row, and so correct invalidation according to forest updates is impossible
*/
boolean isCacheable(Long row);
class EmptyTrail implements AttributeTrail {
@NotNull
@Override
public Set getTrailMode() {
return Collections.emptySet();
}
@Nullable
@Override
public ItemSet getAdditionalItemDependencies(Long row) {
return null;
}
@Override
public boolean isCacheable(Long row) {
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy