java - 我们如何在 Sailpoint IIQ 中设置日期范围
问题描述
我正在尝试动态设置报告的日期范围。但似乎我正在使用的包没有像它应该的那样实现接口 Serializable 。您知道我如何使用 Sailpoint 处理日期范围吗?有我的包裹: org.jfree.data.time.DateRange
当我设置一个字符串对象时,我没有收到任何错误,而我正在使用 dateRange:
java.lang.Exception: sailpoint.tools.GeneralException:
The application script threw an exception:
sailpoint.tools.xml.ConfigurationException:
No serializer registered for class class org.jfree.data.time.DateRange
它发生在我保存对象后执行 context.commitTransaction() 时。
谢谢
解决方案
我找到了解决方案。Daterange 不是对象的类型,它只是接口上的精度。如果您要设置日期范围,请执行以下操作:
TaskDefinition task = context.getObjectByName(TaskDefinition.class, "The name of the report");
Map map = new HashMap();
map.put("end",end_date_convert_in_long);
map.put("start",start_date_convert_in_long);
task.setArgument("the name of the variable", map);
context.saveObject(task);
context.commitTransaction();
推荐阅读
- typescript - JSON 完成的自定义扩展在双引号中不起作用
- python - 类型对象不可下标 BeatifulSoup
- r - 如何使用 R 匹配 3 个表?一张表有多个对应关系
- xaml - 通过 xaml 将 ToolbarItem 文本颜色更改为所有平台(Android、iOS、UWP)
- mysql - 检查可空电话号码列的约束 - MySQL
- postgresql - Postgres如何将空间和非空间数据合并到一个索引中
- .net - 使用 RSACryptoServiceProvider 生成 RSA 密钥时出现持久性错误
- c# - 用于验证模拟方法是否调用的通用方法
- r - 为什么在 R 中修改“hydrogeo”函数时出现错误?
- c# - GridView 试图选择除最后一列之外的整行?