diff --git a/file-formats/saia/README.md b/file-formats/saia/README.md new file mode 100644 index 000000000..712fc4bfc --- /dev/null +++ b/file-formats/saia/README.md @@ -0,0 +1,5 @@ +# SAIA File Format + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.saia.json` | 1 | [`zif_aff_saia_v1.intf.abap`](./type/zif_aff_saia_v1.intf.abap) | [`saia-v1.json`](./saia-v1.json) | [`z_aff_example_saia.saia.json`](./examples/z_aff_example_saia.saia.json) diff --git a/file-formats/saia/examples/z_aff_example_saia.saia.json b/file-formats/saia/examples/z_aff_example_saia.saia.json new file mode 100644 index 000000000..b953cda3d --- /dev/null +++ b/file-formats/saia/examples/z_aff_example_saia.saia.json @@ -0,0 +1,29 @@ +{ + "formatVersion": "1", + "header": { + "description": "IDE Action (SAIA) Example Object", + "originalLanguage": "en" + }, + "generalInformation": { + "title": "SAIA AFF Demo Action", + "summary": "This is a demo action for AFF.", + "implementingClass": "ZCL_DEMO_IMPL_CLASS", + "inputUiConfigurationClass": "ZCL_DEMO_INPUT_UI_CONFIG_CLASS" + }, + "filters": { + "numberOfFocusedResources": "exactlyOne", + "supportedDevObjectTypes": [ + { + "workbenchObjectType": "BDEF", + "workbenchObjectSubtype": "BAC" + }, + { + "workbenchObjectType": "CLAS" + }, + { + "workbenchObjectType": "INTF", + "workbenchObjectSubtype": "IO" + } + ] + } +} diff --git a/file-formats/saia/saia-v1.json b/file-formats/saia/saia-v1.json new file mode 100644 index 000000000..41538dfc6 --- /dev/null +++ b/file-formats/saia/saia-v1.json @@ -0,0 +1,160 @@ +{ + "$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/saia/saia-v1.json", + "title": "IDE Action", + "description": "IDE action (SAIA) v1", + "type": "object", + "properties": { + "formatVersion": { + "title": "Format Version", + "description": "Format version", + "type": "string", + "const": "1" + }, + "header": { + "title": "Header", + "description": "Header", + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "Description of the ABAP object", + "type": "string", + "maxLength": 100 + }, + "originalLanguage": { + "title": "Original Language", + "description": "Original language of the ABAP object", + "type": "string", + "minLength": 2 + }, + "abapLanguageVersion": { + "title": "ABAP Language Version", + "description": "ABAP language version", + "type": "string", + "enum": [ + "standard", + "keyUser", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP for Key Users", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP for key user extensibility", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "generalInformation": { + "title": "General Information", + "description": "General information", + "type": "object", + "properties": { + "title": { + "title": "Title", + "description": "Title", + "type": "string", + "maxLength": 30 + }, + "summary": { + "title": "Summary", + "description": "What is the action doing and how can it be used", + "type": "string" + }, + "implementingClass": { + "title": "Implementing Class", + "description": "Implementing class for handling the action input. Needs to implement interface {@link if_aia_action }.", + "type": "string", + "maxLength": 30 + }, + "inputUiConfigurationClass": { + "title": "Input UI Configuration Class", + "description": "Input UI configuration class for implementing the server-driven UI input configuration. Needs to implement interface {@link IF_AIA_SD_ACTION_INPUT }.", + "type": "string", + "maxLength": 30 + } + }, + "additionalProperties": false, + "required": [ + "title", + "summary" + ] + }, + "filters": { + "title": "Filter: Cardinality", + "description": "Filtering of application of action according to cardinality and object types", + "type": "object", + "properties": { + "numberOfFocusedResources": { + "title": "Number of Focused Resources", + "description": "Number of focused resources", + "type": "string", + "enum": [ + "exactlyOne", + "atLeastOne", + "moreThanOne", + "any" + ], + "enumTitles": [ + "One", + "At least One", + "At least Two", + "Any" + ], + "enumDescriptions": [ + "One", + "At least one", + "At least two", + "Any" + ], + "default": "any" + }, + "supportedDevObjectTypes": { + "title": "Filter: Object Types", + "description": "Filtering of action according to specified object types", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Object Type", + "description": "Object type", + "type": "object", + "properties": { + "workbenchObjectType": { + "title": "Object Type", + "description": "Object type", + "type": "string", + "maxLength": 4 + }, + "workbenchObjectSubtype": { + "title": "Object Subtype", + "description": "Object subtype", + "type": "string", + "maxLength": 3 + } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "generalInformation" + ] +} diff --git a/file-formats/saia/type/zif_aff_saia_v1.intf.abap b/file-formats/saia/type/zif_aff_saia_v1.intf.abap new file mode 100644 index 000000000..8c808d0eb --- /dev/null +++ b/file-formats/saia/type/zif_aff_saia_v1.intf.abap @@ -0,0 +1,110 @@ +INTERFACE zif_aff_saia_v1 + PUBLIC. + + "!

Object Type

+ "! Object type + TYPES ty_wb_object_type TYPE c LENGTH 4. + "!

Object Subtype

+ "! Object sub-type + TYPES ty_wb_object_sub_type TYPE c LENGTH 3. + + TYPES: + "!

Object Type

+ "! Object type + BEGIN OF ty_workbench_object_type, + "!

Object Type

+ "! Object type + workbench_object_type TYPE ty_wb_object_type, + "!

Object Subtype

+ "! Object subtype + workbench_object_subtype TYPE ty_wb_object_sub_type, + END OF ty_workbench_object_type. + + "!

Filter: Object Types

+ "! Filter for object types + TYPES ty_workbench_object_types TYPE SORTED TABLE OF ty_workbench_object_type WITH UNIQUE DEFAULT KEY. + + "! $values { @link zif_aff_saia_v1.data:co_number_of_focused_resources } + "! $default { @link zif_aff_saia_v1.data:co_number_of_focused_resources.any } + TYPES ty_number_of_focused_resources TYPE string. + + CONSTANTS: + "!

Number of Focused Resources

+ "! Number of focused resources + BEGIN OF co_number_of_focused_resources, + "!

One

+ "! One + exactly_one TYPE ty_number_of_focused_resources VALUE 'EXACTLY_ONE', + "!

At least One

+ "! At least one + at_least_one TYPE ty_number_of_focused_resources VALUE 'AT_LEAST_ONE', + "!

At least Two

+ "! At least two + more_than_one TYPE ty_number_of_focused_resources VALUE 'MORE_THAN_ONE', + "!

Any

+ "! Any + any TYPE ty_number_of_focused_resources VALUE 'ANY', + END OF co_number_of_focused_resources. + + TYPES: + "!

Filter: Cardinality

+ "! Filtering of action according to specified applicable criteria. + "! If filter is satisfied then the action is available and will be shown. + "! $required + BEGIN OF ty_filters, + "!

Number of Focused Resources

+ "! Number of focused resources + number_of_focused_resources TYPE ty_number_of_focused_resources, + "!

Filter: Object Types

+ "! Filtering of action according to specified object types + supported_dev_object_types TYPE ty_workbench_object_types, + END OF ty_filters. + + "!

Title

+ "! title + TYPES ty_action_title TYPE c LENGTH 30. + + TYPES: + "!

IDE Action

+ "! IDE action + "! $required + BEGIN OF ty_adt_saia_object, + "!

Title

+ "! Title + "! $required + title TYPE ty_action_title, + "!

Summary

+ "! What is the action doing and how can it be used + "! $required + summary TYPE string, + "!

Implementing Class

+ "! Implementing class for handling the action input. Needs to implement interface {@link if_aia_action }. + implementing_class TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Input UI Configuration Class

+ "! Input UI configuration class for implementing the server-driven UI input configuration. + "! Needs to implement interface {@link IF_AIA_SD_ACTION_INPUT }. + input_ui_configuration_class TYPE zif_aff_types_v1=>ty_object_name_30, + END OF ty_adt_saia_object. + + TYPES: + "!

IDE Action

+ "! IDE action (SAIA) v1 + BEGIN OF ty_main, + "!

Format Version

+ "! Format version + "! $required + format_version TYPE zif_aff_types_v1=>ty_format_version, + "!

Header

+ "! Header + "! $required + header TYPE zif_aff_types_v1=>ty_header_100, + "!

General Information

+ "! General information + "! $required + general_information TYPE ty_adt_saia_object, + "!

Filter: Cardinality

+ "! Filtering of application of action according to cardinality and object types + filters TYPE ty_filters, + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/saia/type/zif_aff_saia_v1.intf.json b/file-formats/saia/type/zif_aff_saia_v1.intf.json new file mode 100644 index 000000000..5217285f3 --- /dev/null +++ b/file-formats/saia/type/zif_aff_saia_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "types for abap file format of ide actions", + "originalLanguage": "en" + } +}