Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SAIA] Add new object type SAIA #614

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
5 changes: 5 additions & 0 deletions file-formats/saia/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SAIA File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.saia.json` | 1 | [`zif_aff_saia_v1.intf.abap`](./type/zif_aff_saia_v1.intf.abap) | [`saia-v1.json`](./saia-v1.json)
179 changes: 179 additions & 0 deletions file-formats/saia/saia-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
{
"$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": "ADT IDE Action",
"description": "ADT 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"
]
},
"adtIdeAction": {
"title": "ADT IDE Action",
"description": "ADT IDE Action",
"type": "object",
"properties": {
"actionId": {
"title": "Unique Id of the Action",
"description": "Unique action id - it should be human readable and reveal the intention of the action Action id is case insensitive TODO: length restriction, check how long it should be, su22 variant restrictions???",
"type": "string"
},
"title": {
"title": "Action Title",
"description": "Action title for the action",
"type": "string"
},
"description": {
"title": "Action Description",
"description": "What is the action doing and how can it be used",
"type": "string"
},
"filters": {
"title": "Action Filter(In development)",
"description": "Filter for application of action according to specific object type or object type groups TODO: new filter mechanis currently under development -> all filters stored in a string on database",
"type": "object",
"properties": {
"numberOfFocusedResources": {
"title": "Number of Focused Resources",
"description": "Number of Focused Resources",
"type": "string"
},
"supportedDevObjectTypes": {
"title": "Supported Development Object Types",
"description": "Supported development object types",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Global Workbench Object Type",
"description": "Global Workbench Object Type",
"type": "object",
"properties": {
"objtypeTr": {
"title": "Object Type in Object Directory",
"description": "Object Type in Object Directory",
"type": "string",
"maxLength": 4
},
"subtypeWb": {
"title": "WB Request: (Internal) Type of an ABAP Workbench Object",
"description": "WB Request: (Internal) Type of an ABAP Workbench Object",
"type": "string",
"maxLength": 3
}
},
"additionalProperties": false
}
},
"supportedResourceTypes": {
"title": "Supported Resource Types",
"description": "Supported resource types",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Resource Type",
"description": "Resource type",
"type": "object",
"properties": {
"categoryScheme": {
"title": "Category Scheme",
"description": "Category scheme",
"type": "string"
},
"categoryTerm": {
"title": "Category Term",
"description": "Category term",
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"implementationClass": {
"title": "Action Handler Class",
"description": "Implementation class for handling the action input. Needs to implement interface {@link if_aia_action }.",
"type": "string",
"maxLength": 30
},
"inputUiConfigurationClass": {
"title": "Action Input UI Class",
"description": "The ABAP class implementing the server-driven UI input configuration. Needs to implement interface {@link IF_AIA_SD_ACTION_INPUT }.",
"type": "string",
"maxLength": 30
},
"dontShowInRunActionDialog": {
"title": "Run Action Dialog Visibility",
"description": "Flag to indicate that the action shouldn't be shown in the action selection dialog where all available actions are listed. TODO: put in a structure: options -> all options stored in a string in database",
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"actionId",
"title",
"description",
"filters",
"implementationClass",
"inputUiConfigurationClass",
"dontShowInRunActionDialog"
]
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"adtIdeAction"
]
}
142 changes: 142 additions & 0 deletions file-formats/saia/type/zif_aff_saia_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
INTERFACE zif_aff_saia_v1
PUBLIC.

TYPES:
"! <p class="shorttext">Resource Type</p>
"! Resource type
BEGIN OF ty_resource_type,
"! <p class="shorttext">Category Scheme</p>
"! Category scheme
category_scheme TYPE string,
"! <p class="shorttext">Category Term</p>
"! Category term
category_term TYPE string,
END OF ty_resource_type.

"! <p class="shorttext">Object Type in Object Directory</p>
"! Object Type in Object Directory
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
TYPES ty_trobjtype TYPE c LENGTH 4.
"! <p class="shorttext">WB Request: (Internal) Type of an ABAP Workbench Object</p>
"! WB Request: (Internal) Type of an ABAP Workbench Object
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
TYPES ty_seu_objtyp TYPE c LENGTH 3.

TYPES:
"! <p class="shorttext">Global Workbench Object Type</p>
"! Global Workbench Object Type
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
BEGIN OF ty_wbobjtype,
"! <p class="shorttext">Object Type in Object Directory</p>
"! Object Type in Object Directory
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
objtype_tr TYPE ty_trobjtype,
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">WB Request: (Internal) Type of an ABAP Workbench Object</p>
"! WB Request: (Internal) Type of an ABAP Workbench Object
subtype_wb TYPE ty_seu_objtyp,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same applies to this

END OF ty_wbobjtype.

"! <p class="shorttext">Development Object Types</p>
"! Development object types
TYPES ty_development_object_types TYPE SORTED TABLE OF ty_wbobjtype WITH UNIQUE DEFAULT KEY.

"! <p class="shorttext">Resource Types</p>
"! Resource types
TYPES ty_resource_types TYPE SORTED TABLE OF ty_resource_type WITH UNIQUE DEFAULT KEY.

"! <p class="shorttext">Number of Focused Resources</p>
"! Number of focused resources
TYPES ty_number_of_focused_resources TYPE string.

CONSTANTS:
"! <p class="shorttext">Number of Focuses Resources</p>
"! Number of focused resources
BEGIN OF co_number_of_focused_resources,
"! <p class="shorttext">Exactly One</p>
"! Exactly one
exactly_one TYPE ty_number_of_focused_resources VALUE 'EXACTLY_ONE',
"! <p class="shorttext">At Least One</p>
"! At least one
at_least_one TYPE ty_number_of_focused_resources VALUE 'AT_LEAST_ONE',
"! <p class="shorttext">More Than One</p>
"! More than one
more_than_one TYPE ty_number_of_focused_resources VALUE 'MORE_THAN_ONE',
END OF co_number_of_focused_resources.

TYPES:
"! <p class="shorttext">Action Filter</p>
"! 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,
"! <p class="shorttext">Number of Focused Resources</p>
"! Number of Focused Resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sentence case

number_of_focused_resources TYPE ty_number_of_focused_resources,
"! <p class="shorttext">Supported Development Object Types</p>
"! Supported development object types
supported_dev_object_types TYPE ty_development_object_types,
"! <p class="shorttext">Supported Resource Types</p>
"! Supported resource types
supported_resource_types TYPE ty_resource_types,
END OF ty_filters.

"! <p class="shorttext">ABAP Class Name</p>
"! ABAP class name
TYPES ty_class_name TYPE c LENGTH 30.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could refer to zif_aff_types_v1=>ty_object_name_30


TYPES:
"! <p class="shorttext">ADT IDE Action</p>
"! ADT IDE Action
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sentence case

"! $required
BEGIN OF ty_adt_saia_object,
"! <p class="shorttext">Unique Id of the Action</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"! <p class="shorttext">Unique Id of the Action</p>
"! <p class="shorttext">Action ID</p>

should be enough

"! Unique action id - it should be human readable and reveal the intention of the action
"! Action id is case insensitive
"! TODO: length restriction, check how long it should be, su22 variant restrictions???
"! $required
action_id TYPE string,
"! <p class="shorttext">Action Title</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the same

Suggested change
"! <p class="shorttext">Action Title</p>
"! <p class="shorttext">Title</p>

"! Action title for the action
"! $required
title TYPE string,
"! <p class="shorttext">Action Description</p>
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
"! What is the action doing and how can it be used
"! $required
description TYPE string,
"! <p class="shorttext">Action Filter(In development)</p>
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
"! Filter for application of action according to specific object type or object type groups
"! TODO: new filter mechanis currently under development -> all filters stored in a string on database
"! $required
filters TYPE ty_filters,
"! <p class="shorttext">Action Handler Class</p>
"! Implementation class for handling the action input. Needs to implement interface {@link if_aia_action }.
"! $required
implementation_class TYPE ty_class_name,
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Action Input UI Class</p>
"! The ABAP class implementing the server-driven UI input configuration.
"! Needs to implement interface {@link IF_AIA_SD_ACTION_INPUT }.
"! $required
input_ui_configuration_class TYPE ty_class_name,
"! <p class="shorttext">Run Action Dialog Visibility</p>
"! Flag to indicate that the action shouldn't be shown in the action selection dialog
"! where all available actions are listed.
"! TODO: put in a structure: options -> all options stored in a string in database
"! $required
dont_show_in_run_action_dialog TYPE abap_bool,
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
END OF ty_adt_saia_object.

TYPES:
"! <p class="shorttext">ADT IDE Action</p>
"! ADT IDE Action (SAIA) v1
BEGIN OF ty_main,
"! <p class="shorttext">Format Version</p>
"! Format version
"! $required
format_version TYPE zif_aff_types_v1=>ty_format_version,
"! <p class="shorttext">Header</p>
"! Header
"! $required
header TYPE zif_aff_types_v1=>ty_header_100,
"! <p class="shorttext">ADT IDE Action</p>
"! ADT IDE Action
"! $required
adt_ide_action TYPE ty_adt_saia_object,
uenal-akkaya marked this conversation as resolved.
Show resolved Hide resolved
END OF ty_main.

ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/saia/type/zif_aff_saia_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "types for abap file format of ide actions",
"originalLanguage": "en"
}
}
Loading