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.
System.out.println("Start"); ApplicationContext appctx = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml"); System.out.println(" ..Done");
ApplicationContext context = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml"); // Retrieve Repository Repository repository = (Repository)context.getBean("JCR.Repository"); // Login to workspace // Note: Default workspace is the one used by Alfresco Web Client which contains all the Spaces // and their documents Session session = repository.login(new SimpleCredentials("admin", "admin".toCharArray())); try { // Retrieve Company Home Node root = session.getRootNode(); Node companyHome = root.getNode("app:company_home"); // Iterator through children of Company Home NodeIterator iterator = companyHome.getNodes(); while(iterator.hasNext()) { Node child = iterator.nextNode(); System.out.println(child.getName()); PropertyIterator propIterator = child.getProperties(); while(propIterator.hasNext()) { Property prop = propIterator.nextProperty(); if (!prop.getDefinition().isMultiple()) { System.out.println(" " + prop.getName() + " = " + prop.getString()); } } } } finally { session.logout(); System.exit(0); }