diff --git a/export.bat b/export.bat index a4cc1443fd4ed55ff99b4e740e08f2e137dfe0ca..b4f1a47f0d6cc2c89cb1eca333bd4b2a5d8a4ced 100644 --- a/export.bat +++ b/export.bat @@ -22,42 +22,32 @@ md %EXPORT_PATH%%PFCOMMON_SU_PATH% md %EXPORT_PATH%%METADATA_TOOL_PATH% md %EXPORT_PATH%%DEV_SU_PATH% -goto view-object-api :view-object-api copy .\view-object-api\target\view-object-api-%version%.jar %EXPORT_PATH%%DEV_SU_PATH%view-object-api.jar -goto view-object-manager :view-object-manager copy .\view-object-manager\target\view-object-manager-%version%.jar %EXPORT_PATH%%PFCOMMON_SU_PATH%com.inspur.edp.formserver.vmmanager.jar copy .\view-object-manager\target\view-object-manager-%version%.jar %EXPORT_PATH%%METADATA_TOOL_PATH%com.inspur.edp.formserver.vmmanager.jar -goto view-object-model :view-object-model copy .\view-object-model\target\view-object-model-%version%.jar %EXPORT_PATH%%PFCOMMON_SU_PATH%com.inspur.edp.formserver.viewmodel.jar copy .\view-object-model\target\view-object-model-%version%.jar %EXPORT_PATH%%METADATA_TOOL_PATH%com.inspur.edp.formserver.viewmodel.jar -goto view-object-rtwebapi :view-object-rtwebapi copy .\view-object-rtwebapi\target\view-object-rtwebapi-%version%.jar %EXPORT_PATH%%LCM_SU_PATH%formserver-viewmodel-rtwebapi.jar -goto view-object-voextendinfo-server-api :view-object-voextendinfo-server-api copy .\view-object-voextendinfo-server-api\target\view-object-voextendinfo-server-api-%version%.jar %EXPORT_PATH%%LCM_SU_PATH%formserver-voextendinfo-server-api.jar copy .\view-object-voextendinfo-server-api\target\view-object-voextendinfo-server-api-%version%.jar %EXPORT_PATH%%METADATA_TOOL_PATH%formserver-voextendinfo-server-api.jar -goto view-object-voextendinfo-server-core :view-object-voextendinfo-server-core copy .\view-object-voextendinfo-server-core\target\view-object-voextendinfo-server-core-%version%.jar %EXPORT_PATH%%LCM_SU_PATH%formserver-voextendinfo-server-core.jar copy .\view-object-voextendinfo-server-core\target\view-object-voextendinfo-server-core-%version%.jar %EXPORT_PATH%%METADATA_TOOL_PATH%formserver-voextendinfo-server-core.jar -goto view-object-webapi :view-object-webapi copy .\view-object-webapi\target\view-object-webapi-%version%.jar %EXPORT_PATH%%DEV_SU_PATH%com.inspur.edp.formserver.viewmodel.webapi.jar -goto resource_file :resource_file md %EXPORT_PATH%server\platform\common\resources xcopy /E .\resources %EXPORT_PATH%server\platform\common\resources - -:end \ No newline at end of file diff --git a/pom.xml b/pom.xml index c0a26a5ffcf3c9c7432f3ad70881818ea6310b99..80599a4ad520d27736b65e98aece7c2bf24da3df 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ com.inspur.edp viewObject-model1 pom - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT view-object-model view-object-manager diff --git a/resources/en/viewobject_model_designtime.en.properties b/resources/en/viewobject_model_designtime.en.properties index 6cb0ac1301998c763e0f60a446aaaa423c24da73..f5d24b65dccd2895b1dc1fb99a38b66a7665b617 100644 --- a/resources/en/viewobject_model_designtime.en.properties +++ b/resources/en/viewobject_model_designtime.en.properties @@ -310,7 +310,7 @@ GSP_VIEWOBJECT_MSGTEMP_FROM_PROCESS_CONFIG=Form process configuration GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_0=The code is [{0}], the name is [{1}] GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_1=The code is [{0}], the name is [{1}], the namespace is [{2}] of the view object metadata, GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_2=The code is [{0}], the name is [{1}], the namespace is [{2}] -GSP_VIEWOBJECT_MSGTEMP_ERROR_PUBLISH_FORM_WITHOUT_BO_TO_PROCESS_DESIGN=[ERROR] The current form did not obtain the corresponding business category, unable to push the form format to process design. +GSP_VIEWOBJECT_MSGTEMP_ERROR_PUBLISH_FORM_WITHOUT_BO_TO_PROCESS_DESIGN=[WARNING] The current form did not obtain the corresponding business category, unable to push the form format to process design. GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_DATAMAPPING_ACTION=In the extended operation [Data Mapping] , GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_BEFOREQUERY_ACTION=In the extended operation [Before Query] , GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_QUERY_ACTION=In the extended operation [Query] , diff --git a/resources/viewobject_model_designtime.properties b/resources/viewobject_model_designtime.properties index 6b86dc44b1c3bd8137e2288956df7137381806e1..5bd0c02e9e26fb3ccce40280a189951916aa2f1c 100644 --- a/resources/viewobject_model_designtime.properties +++ b/resources/viewobject_model_designtime.properties @@ -310,7 +310,7 @@ GSP_VIEWOBJECT_MSGTEMP_FROM_PROCESS_CONFIG=\u8868\u5355\u6D41\u7A0B\u914D\u7F6E GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_0=\u7F16\u53F7\u4E3A[{0}],\u540D\u79F0\u4E3A[{1}] GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_1=\u7F16\u53F7\u4E3A[{0}],\u540D\u79F0\u4E3A[{1}],\u547D\u540D\u7A7A\u95F4\u4E3A[{2}]\u7684\u89C6\u56FE\u5BF9\u8C61\u5143\u6570\u636E, GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_2=\u7F16\u53F7\u4E3A[{0}],\u540D\u79F0\u4E3A[{1}],\u547D\u540D\u7A7A\u95F4\u4E3A[{2}] -GSP_VIEWOBJECT_MSGTEMP_ERROR_PUBLISH_FORM_WITHOUT_BO_TO_PROCESS_DESIGN=[ERROR] \u5F53\u524D\u8868\u5355\u672A\u83B7\u53D6\u5230\u5BF9\u5E94\u7684\u4E1A\u52A1\u79CD\u7C7B\uFF0C\u65E0\u6CD5\u63A8\u9001\u8868\u5355\u683C\u5F0F\u81F3\u6D41\u7A0B\u8BBE\u8BA1 +GSP_VIEWOBJECT_MSGTEMP_ERROR_PUBLISH_FORM_WITHOUT_BO_TO_PROCESS_DESIGN=[WARNING] \u5F53\u524D\u8868\u5355\u672A\u83B7\u53D6\u5230\u5BF9\u5E94\u7684\u4E1A\u52A1\u79CD\u7C7B\uFF0C\u65E0\u6CD5\u63A8\u9001\u8868\u5355\u683C\u5F0F\u81F3\u6D41\u7A0B\u8BBE\u8BA1 GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_DATAMAPPING_ACTION=\u6269\u5C55\u64CD\u4F5C[\u6570\u636EMapping]\u4E2D\u7684 GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_BEFOREQUERY_ACTION=\u6269\u5C55\u64CD\u4F5C[\u67E5\u8BE2\u6570\u636E\u524D]\u4E2D\u7684 GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_QUERY_ACTION=\u6269\u5C55\u64CD\u4F5C[\u67E5\u8BE2\u6570\u636E]\u4E2D\u7684 diff --git a/resources/zh-CHT/viewobject_model_designtime.zh-CHT.properties b/resources/zh-CHT/viewobject_model_designtime.zh-CHT.properties index 387b8ae58931538ed2729f7fe2670da693816841..12ee1f1e7e4b1e92863136e3f42f4bfce8d2305c 100644 --- a/resources/zh-CHT/viewobject_model_designtime.zh-CHT.properties +++ b/resources/zh-CHT/viewobject_model_designtime.zh-CHT.properties @@ -310,7 +310,7 @@ GSP_VIEWOBJECT_MSGTEMP_FROM_PROCESS_CONFIG=\u8868\u55AE\u6D41\u7A0B\u914D\u7F6E GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_0=\u7DE8\u865F\u70BA[{0}],\u540D\u7A31\u70BA[{1}] GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_1=\u7DE8\u865F\u70BA[{0}],\u540D\u7A31\u70BA[{1}],\u547D\u540D\u7A7A\u9593\u70BA[{2}]\u7684\u8996\u5716\u5C0D\u8C61\u5143\u6578\u64DA, GSP_VIEWOBJECT_MSGTEMP_VIEWMODEL_MESSAGE_PREFIX_2=\u7DE8\u865F\u70BA[{0}],\u540D\u7A31\u70BA[{1}],\u547D\u540D\u7A7A\u9593\u70BA[{2}] -GSP_VIEWOBJECT_MSGTEMP_ERROR_PUBLISH_FORM_WITHOUT_BO_TO_PROCESS_DESIGN=[ERROR] \u7576\u524D\u8868\u55AE\u672A\u7372\u53D6\u5230\u5C0D\u61C9\u7684\u696D\u52D9\u7A2E\u985E\uFF0C\u7121\u6CD5\u63A8\u9001\u8868\u55AE\u683C\u5F0F\u81F3\u6D41\u7A0B\u8A2D\u8A08 +GSP_VIEWOBJECT_MSGTEMP_ERROR_PUBLISH_FORM_WITHOUT_BO_TO_PROCESS_DESIGN=[WARNING] \u7576\u524D\u8868\u55AE\u672A\u7372\u53D6\u5230\u5C0D\u61C9\u7684\u696D\u52D9\u7A2E\u985E\uFF0C\u7121\u6CD5\u63A8\u9001\u8868\u55AE\u683C\u5F0F\u81F3\u6D41\u7A0B\u8A2D\u8A08 GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_DATAMAPPING_ACTION=\u64F4\u5C55\u64CD\u4F5C[\u8CC7\u6599Mapping]\u4E2D\u7684 GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_BEFOREQUERY_ACTION=\u64F4\u5C55\u64CD\u4F5C[\u67E5\u8A62\u8CC7\u6599\u524D]\u4E2D\u7684 GSP_VIEWOBJECT_MSGTEMP_VALIDATE_DATAEXTEND_PREFIX_QUERY_ACTION=\u64F4\u5C55\u64CD\u4F5C[\u67E5\u8A62\u8CC7\u6599]\u4E2D\u7684 diff --git a/view-object-api/pom.xml b/view-object-api/pom.xml index 4be6bb5c2a4eb6bf7e6e43130d8e3add921eca5b..f465ddb2806a706b1e3cf723df7d880db8994777 100644 --- a/view-object-api/pom.xml +++ b/view-object-api/pom.xml @@ -20,7 +20,7 @@ com.inspur.edp viewObject-model1 - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT view-object-api diff --git a/view-object-manager/pom.xml b/view-object-manager/pom.xml index 457a8c6169971793e6018b657dc12f69052398aa..fd0042fc49945bbad501d94e9555eb23b7b4e1f6 100644 --- a/view-object-manager/pom.xml +++ b/view-object-manager/pom.xml @@ -21,7 +21,7 @@ com.inspur.edp viewObject-model1 - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT view-object-manager diff --git a/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/generatacmpcode/JavaBaseActionGenerator.java b/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/generatacmpcode/JavaBaseActionGenerator.java index 2f2f62a1cedf5734ffb59141c5b17f07df7aa696..81f37d1c7fe63af400ec3ac241b2e344e7a0e530 100644 --- a/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/generatacmpcode/JavaBaseActionGenerator.java +++ b/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/generatacmpcode/JavaBaseActionGenerator.java @@ -99,6 +99,9 @@ public abstract class JavaBaseActionGenerator extends JavaBaseCompCodeGenerator if (param.getParameterType() == VMParameterType.Custom) { addUsing(param.getClassName()); } + if (param.getParameterType() == VMParameterType.Stream) { + addUsing(JavaCompCodeNames.ResponeseNameSpace); + } } private String GetParameterTypeName(IViewModelParameter param) { diff --git a/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/generatacmpcode/JavaCompCodeNames.java b/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/generatacmpcode/JavaCompCodeNames.java index 22a691d2ae91ccbfa8112022c638b04f7f24ec29..383cafe16be9beafe76ba42534978b3163f31e50 100644 --- a/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/generatacmpcode/JavaCompCodeNames.java +++ b/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/generatacmpcode/JavaCompCodeNames.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.inspur.edp.formserver.vmmanager.generatacmpcode; public final class JavaCompCodeNames { @@ -69,6 +85,7 @@ public final class JavaCompCodeNames { public static String DateNameSpace = "java.util.Date"; public static String BigDecimalNameSpace = "java.math.BigDecimal"; public static String ArrayListNameSpace = "java.util.ArrayList"; + public static String ResponeseNameSpace = "javax.ws.rs.core.Response"; //public static string VoidActionResult = "com.inspur.edp.bef.api.action.VoidActionResult"; //public static string AbstractFSAction = "com.inspur.edp.bff.spi.AbstractFSAction"; diff --git a/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/util/PushChangeSets.java b/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/util/PushChangeSets.java index 71b39c08d86e95b437a52475e5bdc23b7cadf3f7..bbae300ea4dd2ad826614682e6989b4f9d86b778 100644 --- a/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/util/PushChangeSets.java +++ b/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/util/PushChangeSets.java @@ -142,24 +142,23 @@ public class PushChangeSets { ObjectChangeDetail detail = set.getChangeDetail(); PushObjectChangeSet pushObject = new PushObjectChangeSet(); GspViewObject orgObject = pushObject.getObjectByID(this.metadata, detail.getBizObjectId()); - GspViewObject newObject = null; - - // 根据父对象ID获取对应的VO对象 - String parentObjID = detail.getParentObjIDElementId(); - GspViewObject parentVoObj = pushObject.getObjectByID(this.metadata, parentObjID); - - if (set.getChangeDetail().getBizObject() != null) { - newObject = ConvertUtils.toObject(set.getChangeDetail().getBizObject(), - ((GspViewModel) metadata.getContent()).getMapping().getTargetMetadataPkgName(), - ((GspViewModel) metadata.getContent()).getMapping().getTargetMetadataId(), - parentVoObj, GspVoObjectSourceType.BeObject); - } // 新增节点 - if (set.getChangeType().equals(ChangeType.Add) && newObject != null && !parentObjectHasBeenAdded(parentObjID)) { - - pushObject.addObject(metadata, newObject, parentObjID); - return; + if (set.getChangeType().equals(ChangeType.Add)) { + // 根据父对象ID获取对应的VO对象 + String parentObjID = detail.getParentObjIDElementId(); + GspViewObject parentVoObj = pushObject.getObjectByID(this.metadata, parentObjID); + GspViewObject newObject = null; + if (set.getChangeDetail().getBizObject() != null) { + newObject = ConvertUtils.toObject(set.getChangeDetail().getBizObject(), + ((GspViewModel) metadata.getContent()).getMapping().getTargetMetadataPkgName(), + ((GspViewModel) metadata.getContent()).getMapping().getTargetMetadataId(), + parentVoObj, GspVoObjectSourceType.BeObject); + } + if (newObject != null && !parentObjectHasBeenAdded(parentObjID)) { + pushObject.addObject(metadata, newObject, parentObjID); + return; + } } // 修改节点 if (set.getChangeType().equals(ChangeType.Modify) && orgObject != null) { diff --git a/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/validate/ViewModelValidator.java b/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/validate/ViewModelValidator.java index 37ad6bd5c1de78b9ebd27dffead8012d93de6553..588db601a7214ac6ed3d09125c48689e0baf856f 100644 --- a/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/validate/ViewModelValidator.java +++ b/view-object-manager/src/main/java/com/inspur/edp/formserver/vmmanager/validate/ViewModelValidator.java @@ -58,6 +58,7 @@ import com.inspur.edp.formserver.vmmanager.exception.VoManagerErrorCodes; import com.inspur.edp.formserver.vmmanager.service.VmManagerService; import com.inspur.edp.formserver.vmmanager.util.CheckInfoUtil; import com.inspur.edp.lcm.metadata.api.entity.GspMetadata; +import com.inspur.edp.lcm.metadata.api.entity.uri.MetadataURI; import com.inspur.edp.lcm.metadata.api.service.RefCommonService; import io.iec.edp.caf.commons.exception.ExceptionLevel; import io.iec.edp.caf.commons.utils.CollectionUtils; @@ -90,9 +91,9 @@ public class ViewModelValidator { this.metaPath = path; if (!vm.getIsVirtual() && vm.getMainObject().getMapping().getSourceType() == GspVoObjectSourceType.BeObject) { - - GspMetadata dto = SpringBeanUtils.getBean(RefCommonService.class) - .getRefMetadata(vm.getMapping().getTargetMetadataId()); + MetadataURI sourceURI = new MetadataURI(vm.getID()); + MetadataURI targetURI = new MetadataURI(vm.getMapping().getTargetMetadataId()); + GspMetadata dto = SpringBeanUtils.getBean(RefCommonService.class).getRefMetadata(targetURI, sourceURI, this.metaPath); if (dto == null || dto.getContent() == null) { throw new ViewModelException(VoManagerErrorCodes.GSP_VIEWOBJECT_MANAGER_0105,null, vm.getMapping().getTargetMetadataId()); } @@ -456,7 +457,7 @@ public class ViewModelValidator { private String validateElementDefaultValue(IGspCommonField ele, String errorMessage) { StringBuilder sb = new StringBuilder(); String reInt = "^-?\\d+$"; //判断整数,负值也是整数 - String reDecimalString = String.format("^(([0-9]+\\.[0-9]{0,%1$s})|([0-9]*\\.[0-9]{0,%1$s})|([1-9][0-9]+)|([0-9]))$", + String reDecimalString = String.format("^-?(([0-9]+\\.[0-9]{0,%1$s})|-?([0-9]*\\.[0-9]{0,%1$s})|-?([1-9][0-9]+)|([0-9]))$", ele.getPrecision()); // 20190523-整型枚举可设置枚举编号为默认值;关联/udt默认值暂不支持; diff --git a/view-object-model/pom.xml b/view-object-model/pom.xml index 3ab68bc7c53f7a9086c110eb59e3a79fa9d8d0c1..945143ccbc78c09d6ab4da8ee6d7bca95cb0de41 100644 --- a/view-object-model/pom.xml +++ b/view-object-model/pom.xml @@ -21,7 +21,7 @@ com.inspur.edp viewObject-model1 - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT view-object-model diff --git a/view-object-model/src/main/java/com/inspur/edp/formserver/viewmodel/common/InternalExtendActionUtil.java b/view-object-model/src/main/java/com/inspur/edp/formserver/viewmodel/common/InternalExtendActionUtil.java index 4aabf7d8241cc21a015f255088a60198e99cfe8d..1eb6417e08abb792fb96b9a51ffc28bc8370f7b8 100644 --- a/view-object-model/src/main/java/com/inspur/edp/formserver/viewmodel/common/InternalExtendActionUtil.java +++ b/view-object-model/src/main/java/com/inspur/edp/formserver/viewmodel/common/InternalExtendActionUtil.java @@ -1,19 +1,46 @@ +/* + * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.inspur.edp.formserver.viewmodel.common; import com.inspur.edp.formserver.viewmodel.action.MappedCdpAction; -import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.*; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.ChangesetMappingAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.ChangesetReversalMappingAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.CreateAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.DataMappingAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.DataReversalMappingAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.DeleteAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.ModifyAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.MultiDeleteAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.QueryAction; +import com.inspur.edp.formserver.viewmodel.action.internalexternalaction.RetrieveAction; import com.inspur.edp.formserver.viewmodel.exception.ViewModelException; import com.inspur.edp.formserver.viewmodel.exception.VoModelErrorCodes; +import java.util.ArrayList; +import java.util.Arrays; + /** * The Tool Of Internal Extend Action * - * @ClassName: InternalExtendActionUtil - * @Author: Benjamin Gong - * @Date: 2021/1/11 17:13 - * @Version: V1.0 + * @author Benjamin Gong + * @version 2021/1/11 17:13 + * @since V1.0 */ -public class InternalExtendActionUtil { +public final class InternalExtendActionUtil { //Internal ExtendActionIDs public static final String DeleteActionId = "9a17e935-7366-489d-b110-0ae103e5648e"; public static final String ModifyActionId = "47dd3752-72a3-4c56-81c0-ae8ccfe5eb98"; @@ -27,11 +54,19 @@ public class InternalExtendActionUtil { public static final String ChangesetMappingActionId = "5798f884-c222-47f4-8bbe-685c7013dee4"; public static final String MultiDeleteActionId = "7b1c3c4l-t1a4-4dyc-b75b-7695hcb3we7e"; - public java.util.ArrayList InternalActionIds = new java.util.ArrayList(java.util.Arrays.asList(new String[]{DeleteActionId, ModifyActionId, QueryActionId, CreateActionId, RetrieveActionId, DataReversalMappingActionId, DataMappingActionId, ChangesetReversalMappingActionId, ChangesetMappingActionId})); + public static ArrayList InternalActionIds = new ArrayList<>(Arrays.asList( + DeleteActionId, ModifyActionId, QueryActionId, CreateActionId, RetrieveActionId, + DataReversalMappingActionId, DataMappingActionId, ChangesetReversalMappingActionId, + ChangesetMappingActionId)); - public final MappedCdpAction GetInternalExtendActionById(String actionId) { + /** + * 根据actionId获取内置扩展动作, 若不存在则返回null + * @param actionId 扩展动作ID + * @return 扩展动作 + */ + public static MappedCdpAction getInternalExtendActionById(String actionId) { if (!InternalActionIds.contains(actionId)) { - throw new ViewModelException(VoModelErrorCodes.GSP_VIEWOBJECT_MODEL_1011, null, actionId); + return null; } switch (actionId) { @@ -56,7 +91,20 @@ public class InternalExtendActionUtil { case MultiDeleteActionId: return new MultiDeleteAction(); default: - throw new ViewModelException(VoModelErrorCodes.GSP_VIEWOBJECT_MODEL_1011, null, actionId); + return null; + } + } + + /** + * 兼容原逻辑, 根据actionId获取内置扩展动作, 若不存在则抛出异常 + * @param actionId 扩展动作ID + * @return 扩展动作 + */ + public MappedCdpAction GetInternalExtendActionById(String actionId) { + MappedCdpAction action = InternalExtendActionUtil.getInternalExtendActionById(actionId); + if (action == null) { + throw new ViewModelException(VoModelErrorCodes.GSP_VIEWOBJECT_MODEL_1011, null, actionId); } + return action; } } \ No newline at end of file diff --git a/view-object-model/src/main/java/com/inspur/edp/formserver/viewmodel/i18n/names/VoResourceKeyNames.java b/view-object-model/src/main/java/com/inspur/edp/formserver/viewmodel/i18n/names/VoResourceKeyNames.java index a193f7f8d518c641afbd9d87d521ba20bc070e72..cce416cd668b68f8a1f63e1ec761740743d1ea6a 100644 --- a/view-object-model/src/main/java/com/inspur/edp/formserver/viewmodel/i18n/names/VoResourceKeyNames.java +++ b/view-object-model/src/main/java/com/inspur/edp/formserver/viewmodel/i18n/names/VoResourceKeyNames.java @@ -375,7 +375,7 @@ public enum VoResourceKeyNames { */ VIEWMODEL_MESSAGE_PREFIX_2, /** - * [ERROR] 当前表单未获取到对应的业务对象,无法推送表单格式至流程设计 + * [WARNING] 当前表单未获取到对应的业务对象,无法推送表单格式至流程设计 */ ERROR_PUBLISH_FORM_WITHOUT_BO_TO_PROCESS_DESIGN, /** diff --git a/view-object-rtapi/pom.xml b/view-object-rtapi/pom.xml index 8aeb9858f0b6dce145c1f20a1afa6d5bf6fd0737..d89d8e746efd0211a6ecc5e5aafa44398a57a5c9 100644 --- a/view-object-rtapi/pom.xml +++ b/view-object-rtapi/pom.xml @@ -15,14 +15,12 @@ ~ limitations under the License. --> - + 4.0.0 com.inspur.edp viewObject-model1 - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT view-object-rtapi diff --git a/view-object-rtwebapi/pom.xml b/view-object-rtwebapi/pom.xml index 934a6577f0a5dfb09d84d3c4a25e3f124d734282..5e469ee33bb33dacc749a65c117f45b4d42c9fbc 100644 --- a/view-object-rtwebapi/pom.xml +++ b/view-object-rtwebapi/pom.xml @@ -20,7 +20,7 @@ com.inspur.edp viewObject-model1 - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT view-object-rtwebapi diff --git a/view-object-voextendinfo-server-api/pom.xml b/view-object-voextendinfo-server-api/pom.xml index b68409c787132c3daed5f9c489e985cb9676984c..b5848404edaf4337bd06f84b3fd35ae64b9462eb 100644 --- a/view-object-voextendinfo-server-api/pom.xml +++ b/view-object-voextendinfo-server-api/pom.xml @@ -19,7 +19,7 @@ com.inspur.edp viewObject-model1 - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT 4.0.0 diff --git a/view-object-voextendinfo-server-core/pom.xml b/view-object-voextendinfo-server-core/pom.xml index 2536e298b3a706546415c8d237cb9e5ac00b53e1..9b380393e1eeddf2143f060ac59b9af250f2e54d 100644 --- a/view-object-voextendinfo-server-core/pom.xml +++ b/view-object-voextendinfo-server-core/pom.xml @@ -19,7 +19,7 @@ com.inspur.edp viewObject-model1 - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT 4.0.0 diff --git a/view-object-webapi/pom.xml b/view-object-webapi/pom.xml index 0fd1472ffa69e62addde9d736d2f52986f5daf4a..e5fea728fda0bf95fbb4f8f6cf2f165138e787e3 100644 --- a/view-object-webapi/pom.xml +++ b/view-object-webapi/pom.xml @@ -21,7 +21,7 @@ com.inspur.edp viewObject-model1 - 0.2.0-SNAPSHOT + 0.2.1-SNAPSHOT view-object-webapi