com.almworks.jira.structure.api.row.MissingRowException 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.row;
import com.almworks.jira.structure.api.error.StructureRuntimeException;
import com.almworks.jira.structure.api.forest.item.ItemForestBuilder;
import com.atlassian.annotations.PublicApi;
/**
* This exception is thrown by {@link RowManager} if the code requests a non-existent row. Since row IDs
* may not appear from anywhere else except from the same {@code RowManager}, it is an unexpected error condition.
*
* Note: there are also negative row IDs that are used for temporary rows when building forest fragments —
* see {@link ItemForestBuilder}. Usage of these row ID must be confined to the builder they came from. Trying to
* retrieve rows with negative ID from {@code RowManager} would result in this exception.
*
* @see RowManager
*/
@PublicApi
public class MissingRowException extends StructureRuntimeException {
private final long myRowId;
public MissingRowException(long rowId) {
this(rowId, "row " + rowId + " is not found");
}
public MissingRowException(long rowId, String message) {
super(message);
myRowId = rowId;
}
public long getRowId() {
return myRowId;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy