控制“跟踪监管提交”操作的可见性
本主题介绍如何使用专为支持此功能而开发的 API 来管理“跟踪监管提交”操作的可见性。
TrackRegulatorySubmissionValidator API 支持使用 AbstractRegSubmission2Processor API 来控制可修订监管提交的“跟踪监管提交”操作的可见性。如果提供了简单的 regsub,则 API 会返回错误。
解决方案元素
接下来的表格介绍解决方案元素:
元素
类型
说明
AbstractRegSubmission2Processor
API
用于控制“跟踪监管提交”操作的可见性。
TrackRegulatorySubmissionValidator
API
用于处理 AbstractRegSubmission2Processor API。
默认行为
默认情况下,如果监管提交处于“正在提交”阶段,且监管提交类型具有定义的“跟踪布局”属性面板,则“跟踪监管提交”操作可见。
@Override
public boolean performTrackRegSubActionValidation(RegulatorySubmission regSub2) throws WTException {
if (!SubmissionStage.SUBMITTED.equals(regSub2.getSubmissionStage())) {
return false;
}
TypeIdentifier type = TypeIdentifierHelper.getType(regSub2);
LayoutDefinitionReadView layout = TypeDefinitionServiceHelper.service.getLayoutDefinition(type,
ScreenDefinitionName.TRACKING_LAYOUT.toString(), null);
Collection<ScreenDefinitionReadView> layoutScreens = layout.getAllScreens();
// if the screen layout is empty (default is returned) and the layout is not the tracking one
if (layoutScreens.isEmpty()
|| !layoutScreens.iterator().next().getName().equals(ScreenDefinitionName.TRACKING_LAYOUT.toString())) {
// the layout has a default layout at the start so the layoutScreens will never be empty, that's why second
// condition needs to be checked
return false;
}
return true;
}
这对您有帮助吗?