约束:07230001 该值不是允许的值

发布于 2024-11-30 16:43:26 字数 1280 浏览 4 评论 0原文

我定义了一个内容模型,其中有一个 LIST 类型的约束值。

我有一个页面包含与“Position”类型的节点关联的 r:propertySheet,并且该类型具有引用约束列表的属性。

页面的渲染是正确的,但是一旦我从 NodeService 执行 setProperties 代码,就会出现以下错误。 操作过程中发生系统错误:07230003 发现 1 个完整性违规:属性值无效:节点:workspace://SpacesStore/4c7464b2-2c1b-4346-b3f4-215a3818ac9c 类型:{www.ds.alfresco.security.extension.com}位置属性:{www.ds.alfresco.security.extension.com}权限约束:07230002 该值不是允许的值:[READ SADER、WRITE SADER、READ WARED]

我的代码在哪里:

            if(currentPosition != null && currentPosition.getNodeRef() != null){
                Map<String,Object> properties = currentPosition.getProperties();
                ArrayList<String> permissions = (ArrayList<String>)properties.get(Constants.SecurityModelQNames.PROP_SEC_POSITION_POSITION_PERMISSIONS);
                Map<QName,Serializable> qnameSerializableProperties = NodeUtil.prepareQnameSerializableList(properties);
                for(Map.Entry<QName, Serializable> entry : qnameSerializableProperties.entrySet()){
                    System.out.println(entry.getKey()+","+entry.getValue());
                }
                getNodeService().setProperties(currentPosition.getNodeRef(), qnameSerializableProperties);
            }

我要做什么才能使该代码可执行?

I have a content model defined and inside it i have a constraint values with LIST type.

I have a page contains r:propertySheet associated with a node of type "Position" and that type have a property refer to the constraint LIST.

The render of the page is correct, but once i execute a code to setProperties from NodeService, i have the following errors.
A system error happened during the operation: 07230003 Found 1 integrity violations: Invalid property value: Node: workspace://SpacesStore/4c7464b2-2c1b-4346-b3f4-215a3818ac9c Type: {www.ds.alfresco.security.extension.com}position Property: {www.ds.alfresco.security.extension.com}permissions Constraint: 07230002 The value is not an allowed value: [READ SADER, WRITE SADER, READ WARED]

Where My Code is:

            if(currentPosition != null && currentPosition.getNodeRef() != null){
                Map<String,Object> properties = currentPosition.getProperties();
                ArrayList<String> permissions = (ArrayList<String>)properties.get(Constants.SecurityModelQNames.PROP_SEC_POSITION_POSITION_PERMISSIONS);
                Map<QName,Serializable> qnameSerializableProperties = NodeUtil.prepareQnameSerializableList(properties);
                for(Map.Entry<QName, Serializable> entry : qnameSerializableProperties.entrySet()){
                    System.out.println(entry.getKey()+","+entry.getValue());
                }
                getNodeService().setProperties(currentPosition.getNodeRef(), qnameSerializableProperties);
            }

What i do to make this code executable?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乜一 2024-12-07 16:43:26

简而言之,我从页面读取值并将它们填充到列表中,然后再次在节点中将此列表设置为属性。

Simply, i read the values from the page and fill them in a list and again set this list in the node as property.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文