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.
/** * input : /Company Home/User Homes/koen/subfolder * output : /app:company_home/app:user_homes/sys:koen/cm:subfolder * @return */ private String convertFolderToXPathPrefix(NodeRef pHomeRef, String psFolderPath) { try { List<String> listPaths = new ArrayList(); StringTokenizer T = new StringTokenizer(psFolderPath, "/", false); while (T.hasMoreTokens()) listPaths.add(T.nextToken()); listPaths.remove(0); //removing "Company Home" return m_nodeService.getPath(m_fileFolderService.resolveNamePath(pHomeRef, listPaths).getNodeRef()).toPrefixString( m_namespaceService); } catch (FileNotFoundException e) { //TODO e.printStackTrace(); return null; } }