04-08-2013 08:05 AM
System.out.println("Start");
ApplicationContext appctx = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");
System.out.println(" ..Done");
04-08-2013 12:48 PM
04-22-2013 05:56 AM
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);
}
07-09-2013 02:05 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.