节点浏览器无法正常运行 [英] Node Browser does not work properly

查看:145
本文介绍了节点浏览器无法正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新的内容模型,并通过它创建了一个名为 organization的新节点,该节点将保存在organizations文件夹下。

I have a new content model and by it i create a new node called "organization" and that node will be saved under organizations folder.

创建一个节点后我注意到,在导航到组织文件夹节点之前,节点浏览器和搜索服务将无法找到位于组织文件夹中的组织节点。

After create a node i noticed that Node Browser and search Service will not be able to find my organization(s) nodes which are located in the organizations folder until i navigate to the organizations folder node.

有什么可以帮助我的吗?

Can any on help me ?

您的所有答复都受到高度赞赏。

All of your replies are highly appreciated.

我的代码是:

                // Acquire organization folder
            Node organizationsFolder = new Node(NodeUtil
                    .acquireOrganizationsFolder(searchService));
            // current organization created
            currentOrganization = new Node(
                    nodeService.createNode(
                                    organizationsFolder.getNodeRef(),
                                    ContentModel.ASSOC_CONTAINS,
                                    QName.createQName(
                                                    Constants.DIGITAL_SERIES_SECURITY_MODEL_NAMEPSACE_PREFIX_STRING,
                                                    Constants.TYPE_SEC_ORGANIZATION_STRING),
                                    Constants.SecurityModelQNames.TYPE_SEC_ORGANIZATION,
                                    new HashMap<QName,Serializable>()).getChildRef());

            // PREPARE ORGANIZATION SEQUENCE ID
            Node organizationSeq = new Node(SequenceUtil.prepareSequence(
                    SequenceUtil.ORGANIZATION_SEQUENCE_NODE_NAME_STRING,
                    nodeService, searchService));

            // LOCK ORGANIZATION SEQUENCE
            if(!organizationSeq.isLocked()){
                lockService.lock(organizationSeq.getNodeRef(), LockType.NODE_LOCK);
                // GET THE NEXT SEQUENCE
                SequenceUtil.addCurrentSequence(organizationSeq.getNodeRef(), nodeService);
            }

            // PREPARE ORGANIZATION PROPERTIES
            Map<QName, Serializable> orgProps = new HashMap<QName, Serializable>();

            // UPDATE ORGANIZATION SEQUENCE ID
            orgProps.put(Constants.SecurityModelQNames.PROP_SEC_ORGANIZATION_ORGANIZATION_ID,
                            SequenceUtil.getCurrentSequence(
                                    organizationSeq.getNodeRef(), nodeService));
            // UPDATE ORGANIZATION/CONTENT NAME PROPERTY
            orgProps.put(ContentModel.PROP_NAME, 
                    NodeUtil.extractNodeProperty(Constants.SecurityModelQNames.PROP_SEC_ORGANIZATION_ORGANIZATION_NAME, 
                            currentOrganization).toString() + 
                    "_"+orgProps.get(Constants.SecurityModelQNames.PROP_SEC_ORGANIZATION_ORGANIZATION_ID)); 
            // UPDATE ORGANIZATION NAME PROPERTY
            orgProps.put(Constants.SecurityModelQNames.PROP_SEC_ORGANIZATION_ORGANIZATION_NAME, 
                    NodeUtil.extractNodeProperty(Constants.SecurityModelQNames.PROP_SEC_ORGANIZATION_ORGANIZATION_NAME, 
                            currentOrganization).toString());
            // UPDATE ORGANIZATION DESCRIPTION
            orgProps.put(Constants.SecurityModelQNames.PROP_SEC_ORGANIZATION_ORGANIZATION_DESCRIPTION, 
                    NodeUtil.extractNodeProperty(Constants.SecurityModelQNames.PROP_SEC_ORGANIZATION_ORGANIZATION_DESCRIPTION, 
                            currentOrganization).toString());
            // UPDATE THE PROPERTIES TO AN ORGANIZATION NODE
            nodeService.setProperties(currentOrganization.getNodeRef(), orgProps);
            // UNLOCK 
            lockService.unlock(organizationSeq.getNodeRef());

感谢
Mohammed Amr
高级系统开发人员
Digital Series Co 。

Thanks Mohammed Amr Senior System Developer Digital Series Co.

推荐答案

奇怪,通常应该可以。

索引如果您直接尝试搜索创建的内容,则该过程可能仍处于活动状态。

The indexing process could be still active if you directly try to search the created content.

您可以发布代码如何创建节点吗?

Can you post your code how you create the node?

这篇关于节点浏览器无法正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆