All pastes #446770 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-18 17:23 UTC
rendered paste body
	/**
	* printRootFolderContents
	* @throws Exception
	*/
	public void printRootFolderContents()
	throws Exception
	{
		Collection collections = null;
		WorkspaceManager workspaceManager = Connector.getWorkspaceManager();
		
		String uuid = workspaceManager.getDefaultCollection(m_userAuth, null);
		try {
			collections = workspaceManager.getChildrenWorkspaceInfo(
					m_userAuth, uuid, WorkspaceType.COLLECTION, 0, 0);
		} catch(Exception e) {
			System.out.println("Failed collections!");
			System.out.println(e);
		}
		
		Iterator iter = collections.iterator();
		while(iter.hasNext()) {
			Object item = iter.next();
			System.out.println(((WorkspaceInfo)item).getName());
		}
	}