As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
String query = "PATH:\"app:company_home/st:sites/cm:research/cm:dataLists\""; StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"); ResultSet resultSet = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, query); NodeRef listNodeRef = resultSet.getNodeRef(0); resultSet.close(); //create dataLists object String nameContactList = "Summary"; Map<QName, Serializable> contentProps = new HashMap<QName, Serializable>(); contentProps.put(ContentModel.PROP_NAME, nameContactList); ChildAssociationRef dataList = nodeService.createNode(listNodeRef, ContentModel.ASSOC_CONTAINS, QName.createQName(NamespaceService.DATALIST_MODEL_PREFIX, nameContactList), TYPE_CONTACTLIST, contentProps);