From bff05aef36f1dd69f1bf86dbc34ebcf45b0692ca Mon Sep 17 00:00:00 2001 From: Robert Csakany Date: Tue, 9 Jul 2024 01:44:12 +0200 Subject: [PATCH] JNG-5826 Fixing operation name --- .../Earth/AccessViewPage/index.tsx.snapshot | 14 +- .../AccessTablePage/index.tsx.snapshot | 6 +- .../model/ActionGroupTest-ui.model | 439 +++++++++--------- .../index.tsx.snapshot | 6 +- .../AccessTablePage/index.tsx.snapshot | 6 +- .../model/ActionGroupTestPro-ui.model | 439 +++++++++--------- .../model/OperationParametersTest-ui.model | 422 ++++++++--------- .../react/UiPageContainerHelper.java | 26 +- 8 files changed, 687 insertions(+), 671 deletions(-) diff --git a/judo-ui-react-itest/ActionGroupTest/action_group_test__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Earth/AccessViewPage/index.tsx.snapshot b/judo-ui-react-itest/ActionGroupTest/action_group_test__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Earth/AccessViewPage/index.tsx.snapshot index 60899327..d2bf0d4c 100644 --- a/judo-ui-react-itest/ActionGroupTest/action_group_test__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Earth/AccessViewPage/index.tsx.snapshot +++ b/judo-ui-react-itest/ActionGroupTest/action_group_test__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Earth/AccessViewPage/index.tsx.snapshot @@ -451,7 +451,7 @@ export default function GodGodEarthAccessViewPage() { // if the `target` is missing we are likely navigating to a relation table page, in which case we need the owner's id navigate(routeToViewPlanetCreaturesRelationViewPage(((target as ViewCreatureStored) || data).__signedIdentifier)); }; - // ParameterlessCallOperationAction: God/(esm/_6l6P0TV7Ee-rMcMaep1uNQ)/OperationFormTableTableCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) + // ParameterlessCallOperationAction: God/(esm/_ZggBoT0wEe-oxNmZsPxMmA)/OperationFormTableTableCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) const creaturesChooseTheMessiahForPlanetAction = async (target?: ViewPlanetStored) => { try { setIsLoading(true); @@ -471,7 +471,7 @@ export default function GodGodEarthAccessViewPage() { setIsLoading(false); } }; - // OpenOperationInputFormAction: God/(esm/_R_BrUTV8Ee-rMcMaep1uNQ)/OperationFormTableTableCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) + // OpenOperationInputFormAction: God/(esm/_Tr7a8T0wEe-oxNmZsPxMmA)/OperationFormTableTableCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) const creaturesCreateCreatureAction = async ( target: ViewPlanetStored, isDraft?: boolean, @@ -484,7 +484,7 @@ export default function GodGodEarthAccessViewPage() { await refresh(); } }; - // ParameterlessCallOperationAction: God/(esm/_3_lGwTV7Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) + // ParameterlessCallOperationAction: God/(esm/_a2C4QT0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) const creaturesHateGodForCreatureAction = async (target?: ViewCreatureStored) => { try { setIsLoading(true); @@ -504,7 +504,7 @@ export default function GodGodEarthAccessViewPage() { setIsLoading(false); } }; - // ParameterlessCallOperationAction: God/(esm/_3_lGwzV7Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) + // ParameterlessCallOperationAction: God/(esm/_a2C4Qz0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) const creaturesLoveGodForCreatureAction = async (target?: ViewCreatureStored) => { try { setIsLoading(true); @@ -524,7 +524,7 @@ export default function GodGodEarthAccessViewPage() { setIsLoading(false); } }; - // OpenOperationInputSelectorAction: God/(esm/_ASgmQTV8Ee-rMcMaep1uNQ)/OperationFormTableTableCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) + // OpenOperationInputSelectorAction: God/(esm/_VRoNcT0wEe-oxNmZsPxMmA)/OperationFormTableTableCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) const creaturesPunishCreatureAction = async (target?: ViewPlanetStored) => { const { result, data: returnedData } = await openViewPlanetViewGroup_2RightCreaturesPunishCreatureRelationTableCallSelector({ @@ -534,7 +534,7 @@ export default function GodGodEarthAccessViewPage() { await refresh(); } }; - // OpenOperationInputSelectorAction: God/(esm/_AShNUTV8Ee-rMcMaep1uNQ)/OperationFormTableTableCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) + // OpenOperationInputSelectorAction: God/(esm/_VRoNcz0wEe-oxNmZsPxMmA)/OperationFormTableTableCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) const creaturesRewardCreatureAction = async (target?: ViewPlanetStored) => { const { result, data: returnedData } = await openViewPlanetViewGroup_2RightCreaturesRewardCreatureRelationTableCallSelector({ @@ -544,7 +544,7 @@ export default function GodGodEarthAccessViewPage() { await refresh(); } }; - // OpenOperationInputSelectorAction: God/(esm/_3_lGxTV7Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) + // OpenOperationInputSelectorAction: God/(esm/_a2C4RT0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_QKcpkE7vEeycO-gUAWxcVg)/TabularReferenceField) const creaturesTalkToGodAction = async (target?: ViewPlanetStored) => { const { result, data: returnedData } = await openViewPlanetViewGroup_2RightCreaturesTalkToGodRelationTableCallSelector({ diff --git a/judo-ui-react-itest/ActionGroupTest/action_group_test__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Galaxies/AccessTablePage/index.tsx.snapshot b/judo-ui-react-itest/ActionGroupTest/action_group_test__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Galaxies/AccessTablePage/index.tsx.snapshot index 217f20e8..f4adcc26 100644 --- a/judo-ui-react-itest/ActionGroupTest/action_group_test__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Galaxies/AccessTablePage/index.tsx.snapshot +++ b/judo-ui-react-itest/ActionGroupTest/action_group_test__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Galaxies/AccessTablePage/index.tsx.snapshot @@ -208,7 +208,7 @@ export default function GodGodGalaxiesAccessTablePage() { // if the `target` is missing we are likely navigating to a relation table page, in which case we need the owner's id navigate(routeToGodGodGalaxiesAccessViewPage((target as ViewGalaxyStored)!.__signedIdentifier)); }; - // OpenOperationInputFormAction: God/(esm/_uqp7kDV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) + // OpenOperationInputFormAction: God/(esm/_9MKM0T0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) const createDarkMatterAction = async ( target: ViewGalaxyStored, isDraft?: boolean, @@ -221,7 +221,7 @@ export default function GodGodGalaxiesAccessTablePage() { await refresh(); } }; - // OpenOperationInputFormAction: God/(esm/_uqqioTV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) + // OpenOperationInputFormAction: God/(esm/_9MKz4T0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) const createIntergalacticDustAction = async ( target: ViewGalaxyStored, isDraft?: boolean, @@ -234,7 +234,7 @@ export default function GodGodGalaxiesAccessTablePage() { await refresh(); } }; - // OpenOperationInputFormAction: God/(esm/_uqqiozV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) + // OpenOperationInputFormAction: God/(esm/_9MKz4z0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) const createInterstellarMediumAction = async ( target: ViewGalaxyStored, isDraft?: boolean, diff --git a/judo-ui-react-itest/ActionGroupTest/model/ActionGroupTest-ui.model b/judo-ui-react-itest/ActionGroupTest/model/ActionGroupTest-ui.model index 5d639e1d..29d678c7 100644 --- a/judo-ui-react-itest/ActionGroupTest/model/ActionGroupTest-ui.model +++ b/judo-ui-react-itest/ActionGroupTest/model/ActionGroupTest-ui.model @@ -184,8 +184,8 @@ - - + + @@ -400,13 +400,13 @@ - - - - - - - + + + + + + + @@ -427,9 +427,9 @@ - - - + + + @@ -884,20 +884,20 @@ - - - - + + + + - - - - + + + + - - - - + + + + @@ -1022,21 +1022,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -1046,14 +1046,14 @@ - - - - - - - - + + + + + + + + @@ -1075,37 +1075,37 @@ - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - + + + + + + @@ -5124,11 +5124,11 @@ - + - + @@ -5282,9 +5282,9 @@ - - - + + + @@ -5581,17 +5581,17 @@ - - - + + + - - - + + + - - - + + + @@ -5836,11 +5836,11 @@ - + - + @@ -6083,27 +6083,27 @@ - + - - - + + + - + - - - + + + - + - - - + + + @@ -6387,25 +6387,25 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -6439,11 +6439,11 @@ - + - + @@ -6451,7 +6451,7 @@ - + @@ -6510,22 +6510,21 @@ - - - - + + + - - - + + + - - - + + + - - - + + + @@ -6541,17 +6540,17 @@ - - - + + + - - - + + + - - - + + + @@ -6581,11 +6580,11 @@ - + - + @@ -6658,97 +6657,97 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + @@ -7265,13 +7264,13 @@ - - - + + + - - - + + + diff --git a/judo-ui-react-itest/ActionGroupTestPro/action_group_test_pro__god/src/test/resources/snapshots/frontend-react/src/containers/View/Galaxy/Table/components/ViewGalaxyTableTableComponent/index.tsx.snapshot b/judo-ui-react-itest/ActionGroupTestPro/action_group_test_pro__god/src/test/resources/snapshots/frontend-react/src/containers/View/Galaxy/Table/components/ViewGalaxyTableTableComponent/index.tsx.snapshot index caeecfd2..630be554 100644 --- a/judo-ui-react-itest/ActionGroupTestPro/action_group_test_pro__god/src/test/resources/snapshots/frontend-react/src/containers/View/Galaxy/Table/components/ViewGalaxyTableTableComponent/index.tsx.snapshot +++ b/judo-ui-react-itest/ActionGroupTestPro/action_group_test_pro__god/src/test/resources/snapshots/frontend-react/src/containers/View/Galaxy/Table/components/ViewGalaxyTableTableComponent/index.tsx.snapshot @@ -447,7 +447,7 @@ export function ViewGalaxyTableTableComponent(props: ViewGalaxyTableTableCompone : undefined, }, { - id: 'God/(esm/_uqp7kDV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_YT0hQE7rEeycO-gUAWxcVg)/TransferObjectTable)', + id: 'God/(esm/_9MKM0T0wEe-oxNmZsPxMmA)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_YT0hQE7rEeycO-gUAWxcVg)/TransferObjectTable)', label: t('View.Galaxy.Table.createDarkMatter', { defaultValue: 'createDarkMatter' }) as string, icon: , disabled: ( @@ -463,7 +463,7 @@ export function ViewGalaxyTableTableComponent(props: ViewGalaxyTableTableCompone : undefined, }, { - id: 'God/(esm/_uqqioTV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_YT0hQE7rEeycO-gUAWxcVg)/TransferObjectTable)', + id: 'God/(esm/_9MKz4T0wEe-oxNmZsPxMmA)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_YT0hQE7rEeycO-gUAWxcVg)/TransferObjectTable)', label: t('View.Galaxy.Table.createIntergalacticDust', { defaultValue: 'createIntergalacticDust' }) as string, icon: , disabled: ( @@ -479,7 +479,7 @@ export function ViewGalaxyTableTableComponent(props: ViewGalaxyTableTableCompone : undefined, }, { - id: 'God/(esm/_uqqiozV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_YT0hQE7rEeycO-gUAWxcVg)/TransferObjectTable)', + id: 'God/(esm/_9MKz4z0wEe-oxNmZsPxMmA)/OperationFormTableRowCallOperationButton/(discriminator/God/(esm/_YT0hQE7rEeycO-gUAWxcVg)/TransferObjectTable)', label: t('View.Galaxy.Table.createInterstellarMedium', { defaultValue: 'createInterstellarMedium' }) as string, icon: , disabled: ( diff --git a/judo-ui-react-itest/ActionGroupTestPro/action_group_test_pro__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Galaxies/AccessTablePage/index.tsx.snapshot b/judo-ui-react-itest/ActionGroupTestPro/action_group_test_pro__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Galaxies/AccessTablePage/index.tsx.snapshot index 3fc2e9ae..57046be3 100644 --- a/judo-ui-react-itest/ActionGroupTestPro/action_group_test_pro__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Galaxies/AccessTablePage/index.tsx.snapshot +++ b/judo-ui-react-itest/ActionGroupTestPro/action_group_test_pro__god/src/test/resources/snapshots/frontend-react/src/pages/God/God/Galaxies/AccessTablePage/index.tsx.snapshot @@ -208,7 +208,7 @@ export default function GodGodGalaxiesAccessTablePage() { // if the `target` is missing we are likely navigating to a relation table page, in which case we need the owner's id navigate(routeToGodGodGalaxiesAccessViewPage((target as ViewGalaxyStored)!.__signedIdentifier)); }; - // OpenOperationInputFormAction: God/(esm/_uqp7kDV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) + // OpenOperationInputFormAction: God/(esm/_9MKM0T0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) const createDarkMatterAction = async ( target: ViewGalaxyStored, isDraft?: boolean, @@ -221,7 +221,7 @@ export default function GodGodGalaxiesAccessTablePage() { await refresh(); } }; - // OpenOperationInputFormAction: God/(esm/_uqqioTV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) + // OpenOperationInputFormAction: God/(esm/_9MKz4T0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) const createIntergalacticDustAction = async ( target: ViewGalaxyStored, isDraft?: boolean, @@ -234,7 +234,7 @@ export default function GodGodGalaxiesAccessTablePage() { await refresh(); } }; - // OpenOperationInputFormAction: God/(esm/_uqqiozV3Ee-rMcMaep1uNQ)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) + // OpenOperationInputFormAction: God/(esm/_9MKz4z0wEe-oxNmZsPxMmA)/OperationFormTableRowCallAction/(discriminator/God/(esm/_4pyPkM_cEe6fibzd7gNETg)/AccessTablePageDefinition) const createInterstellarMediumAction = async ( target: ViewGalaxyStored, isDraft?: boolean, diff --git a/judo-ui-react-itest/ActionGroupTestPro/model/ActionGroupTestPro-ui.model b/judo-ui-react-itest/ActionGroupTestPro/model/ActionGroupTestPro-ui.model index 5d639e1d..29d678c7 100644 --- a/judo-ui-react-itest/ActionGroupTestPro/model/ActionGroupTestPro-ui.model +++ b/judo-ui-react-itest/ActionGroupTestPro/model/ActionGroupTestPro-ui.model @@ -184,8 +184,8 @@ - - + + @@ -400,13 +400,13 @@ - - - - - - - + + + + + + + @@ -427,9 +427,9 @@ - - - + + + @@ -884,20 +884,20 @@ - - - - + + + + - - - - + + + + - - - - + + + + @@ -1022,21 +1022,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -1046,14 +1046,14 @@ - - - - - - - - + + + + + + + + @@ -1075,37 +1075,37 @@ - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - + + + + + + @@ -5124,11 +5124,11 @@ - + - + @@ -5282,9 +5282,9 @@ - - - + + + @@ -5581,17 +5581,17 @@ - - - + + + - - - + + + - - - + + + @@ -5836,11 +5836,11 @@ - + - + @@ -6083,27 +6083,27 @@ - + - - - + + + - + - - - + + + - + - - - + + + @@ -6387,25 +6387,25 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -6439,11 +6439,11 @@ - + - + @@ -6451,7 +6451,7 @@ - + @@ -6510,22 +6510,21 @@ - - - - + + + - - - + + + - - - + + + - - - + + + @@ -6541,17 +6540,17 @@ - - - + + + - - - + + + - - - + + + @@ -6581,11 +6580,11 @@ - + - + @@ -6658,97 +6657,97 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + @@ -7265,13 +7264,13 @@ - - - + + + - - - + + + diff --git a/judo-ui-react-itest/OperationParametersTest/model/OperationParametersTest-ui.model b/judo-ui-react-itest/OperationParametersTest/model/OperationParametersTest-ui.model index 302dc70f..0f2b3b86 100644 --- a/judo-ui-react-itest/OperationParametersTest/model/OperationParametersTest-ui.model +++ b/judo-ui-react-itest/OperationParametersTest/model/OperationParametersTest-ui.model @@ -19,9 +19,9 @@ - - - + + + @@ -46,10 +46,10 @@ - - - - + + + + @@ -211,47 +211,47 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -578,52 +578,52 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + @@ -2090,17 +2090,17 @@ - - - + + + - - - + + + - - - + + + @@ -2121,17 +2121,17 @@ - + - + - + @@ -4382,15 +4382,15 @@ - - - - - + + + + + @@ -4752,21 +4752,21 @@ - - - + + + - - - + + + - - - + + + - - - + + + @@ -4779,120 +4779,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + + + + + + + + diff --git a/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiPageContainerHelper.java b/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiPageContainerHelper.java index d9e6971d..f360e7ef 100644 --- a/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiPageContainerHelper.java +++ b/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiPageContainerHelper.java @@ -4,6 +4,7 @@ import hu.blackbelt.judo.meta.ui.*; import hu.blackbelt.judo.meta.ui.data.ClassType; import hu.blackbelt.judo.meta.ui.data.EnumerationType; +import hu.blackbelt.judo.meta.ui.data.OperationType; import hu.blackbelt.judo.ui.generator.react.mask.MaskEntry; import hu.blackbelt.judo.ui.generator.typescript.rest.commons.UiCommonsHelper; import lombok.extern.java.Log; @@ -86,19 +87,19 @@ public static String simpleActionDefinitionName(ActionDefinition actionDefinitio if (actionDefinition instanceof CallOperationActionDefinition callOperationActionDefinition) { // We need to append a discriminator for actions because for unmapped operation input forms, caller // CallOperation actions are rolled on the form container, which could lead to method name collisions. - suffix = firstToLower(callOperationActionDefinition.getOperation().getName()) + "For" + firstToUpper(callOperationActionDefinition.getOperation().getOwnerSimpleName()); + suffix = firstToLower(getCallOperationName(callOperationActionDefinition)) + "For" + firstToUpper(callOperationActionDefinition.getOperation().getOwnerSimpleName()); } else if (actionDefinition instanceof BulkCallOperationActionDefinition bulkCallOperationActionDefinition) { - suffix = "bulk" + firstToUpper(bulkCallOperationActionDefinition.getOperation().getName()); + suffix = "bulk" + firstToUpper(getCallOperationName(bulkCallOperationActionDefinition)); } else if (actionDefinition instanceof OpenOperationInputSelectorActionDefinition openOperationInputSelectorActionDefinition) { if (openOperationInputSelectorActionDefinition.getSelectorFor() != null) { if (openOperationInputSelectorActionDefinition.getSelectorFor() instanceof CallOperationActionDefinition callOperationActionDefinition) { - suffix = firstToLower(callOperationActionDefinition.getOperation().getName()); + suffix = firstToLower(getCallOperationName(callOperationActionDefinition)); } } } else if (actionDefinition instanceof OpenFormActionDefinition openFormActionDefinition) { if (openFormActionDefinition.getFormFor() != null) { if (openFormActionDefinition.getFormFor() instanceof CallOperationActionDefinition callOperationActionDefinition) { - suffix = firstToLower(callOperationActionDefinition.getOperation().getName()); + suffix = firstToLower(getCallOperationName(callOperationActionDefinition)); } } } else if (actionDefinition instanceof CustomActionDefinition) { @@ -109,6 +110,23 @@ public static String simpleActionDefinitionName(ActionDefinition actionDefinitio return relationName + (!relationName.isEmpty() ? firstToUpper(suffix) : suffix) + "Action"; } + private static String getCallOperationName(ActionDefinition actionDefinition) { + OperationType operationType = null; + int index = 2; + if (actionDefinition instanceof CallOperationActionDefinition callOperationActionDefinition) { + operationType = callOperationActionDefinition.getOperation(); + } else if (actionDefinition instanceof BulkCallOperationActionDefinition bulkCallOperationActionDefinition) { + operationType = bulkCallOperationActionDefinition.getOperation(); + } + String actionDefinitionName = actionDefinition.getName(); + String fallbackName = operationType.getName(); + String[] nameParts = actionDefinitionName.split(NAME_SPLITTER); + if (nameParts.length >= index + 1) { + return nameParts[nameParts.length - index]; + } else { + return fallbackName; + } + } public static List getContainerApiImports(PageContainer container) { Set imports = new HashSet<>();