Interface RestAwareCustomFieldType
- All Known Implementing Classes:
CascadingSelectCFType,DateCFType,DateTimeCFType,FuncTestTextAreaCFType,GenericTextCFType,ImportIdLinkCFType,InitialWatchersCFType,LabelsCFType,MultiGroupCFType,MultiSelectCFType,MultiUserCFType,NumberCFType,ProjectCFType,ReadOnlyCFType,RenderableTextCFType,SelectCFType,StringCFType,TextAreaCFType,TextAreaNoValidationCFType,TextCFType,URLCFType,UserCFType,VersionCFType
@PublicSpi
public interface RestAwareCustomFieldType
Fields that implement this interface can:
- Supply meta data for the REST APIs to use.
- Optionally Process command verbs from rest resoucres.
- Format their data into beans that can be used to generate meaningful REST values.
- Since:
- v5.0
-
Method Summary
Modifier and TypeMethodDescriptiongetFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext) Returns lower level Information about the field.getJsonFromIssue(CustomField field, Issue issue, boolean renderedVersionRequested, FieldLayoutItem fieldLayoutItem) Return a JsonData representation of the field valuegetJsonSchema(CustomField customField) Return a description of the shape of this field when represented as JSON.
-
Method Details
-
getFieldTypeInfo
Returns lower level Information about the field. This information contains allowed values and/or the autocomplete url- Parameters:
fieldTypeInfoContext- context information for generating theFieldTypeInfo.- Returns:
- Low level information about the field.
-
getJsonSchema
Return a description of the shape of this field when represented as JSON.- Parameters:
customField-
-
getJsonFromIssue
FieldJsonRepresentation getJsonFromIssue(CustomField field, Issue issue, boolean renderedVersionRequested, @Nullable FieldLayoutItem fieldLayoutItem) Return a JsonData representation of the field value- Parameters:
field- configuration of the current fieldissue- to get field data fromrenderedVersionRequested- whether the use requested the return of rendered/pretty data as well as raw datafieldLayoutItem- field layout for this field.- Returns:
- FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.
-