public Vector<object> getPartStructure(WTPart parentPart) throws Exception {
LatestConfigSpec lcs = new LatestConfigSpec();
QueryResult usesLinks = StructHelper.service.navigateUses(parentPart, false);
while(usesLinks.hasMoreElements()){
WTPartUsageLink usageLink = (WTPartUsageLink) usesLinks.nextElement();
WTPart childPart = (WTPart) lcs.process(VersionControlHelper.service.allVersionsOf(usageLink.getUses())).nextElement();
getPartStructure(childPart);
}
}
转载于:https://my.oschina.net/zengbo/blog/115440