You cannot cast a WTPartMater into a WTPart because they are entirely different classes that are not related in a java class parent-child relationship. However, there are a lot of helper APIs to use in
wt.vc.VersionControlHelper
and
wt.vc.VersionControlService
You access the service methods using wt.vc.VersionControlHelper.service.xxxxx()
For example, one method among the many to look at is this one.
wt.vc.VersionControlHelper.service.allVersionsFrom(Versioned version), defined from the API, below.
QueryResultallVersionsFrom(Versioned version) throws WTException, PersistenceException
- Finds all of the versions of a master from the first one created to the given version. The result is an ordered list of versions (i.e., latest iterations) from the given iteration to the first one created. For example, if version C is given, the list returned is C, B, A.
- Parameters:
version
-- Returns:
- QueryResult
- Throws:
WTException
PersistenceException