com.almworks.jira.structure.api.item.ItemVersionUpdate 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.api.item;
import com.almworks.jira.structure.api.pull.DataVersion;
import com.almworks.jira.structure.api.pull.VersionedDataUpdate;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
import java.util.Set;
public abstract class ItemVersionUpdate extends VersionedDataUpdate {
protected ItemVersionUpdate(@NotNull DataVersion version) {
super(version);
}
@NotNull
public abstract DataVersion getFromVersion();
@NotNull
public abstract Set getAffectedItems();
public static final class Empty extends ItemVersionUpdate {
public Empty(@NotNull DataVersion version) {
super(version);
}
@NotNull
public DataVersion getFromVersion() {
return getVersion();
}
public boolean isEmpty() {
return true;
}
@NotNull
public Set getAffectedItems() {
return Collections.emptySet();
}
public String toString() {
return String.format("empty[%s]", getVersion());
}
}
public static final class Total extends ItemVersionUpdate {
public Total(@NotNull DataVersion version) {
super(version);
}
@NotNull
public DataVersion getFromVersion() {
return DataVersion.ZERO;
}
public boolean isFull() {
return true;
}
@NotNull
public Set getAffectedItems() {
return Collections.emptySet();
}
public String toString() {
return String.format("FULL[%s]", getVersion());
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy