本文整理汇总了Java中org.wso2.carbon.registry.resource.stub.beans.xsd.VersionPath类的典型用法代码示例。如果您正苦于以下问题:Java VersionPath类的具体用法?Java VersionPath怎么用?Java VersionPath使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VersionPath类属于org.wso2.carbon.registry.resource.stub.beans.xsd包,在下文中一共展示了VersionPath类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteAllVersions
import org.wso2.carbon.registry.resource.stub.beans.xsd.VersionPath; //导入依赖的package包/类
public static VersionPath[] deleteAllVersions(ResourceAdminServiceClient resourceAdminClient,
String path)
throws ResourceAdminServiceExceptionException, RemoteException {
VersionPath[] versionPaths;
try {
versionPaths = resourceAdminClient.getVersionPaths(path);
if (versionPaths != null) {
for (VersionPath versionPath : versionPaths) {
long versionNo = versionPath.getVersionNumber();
String snapshotId = String.valueOf(versionNo);
resourceAdminClient.deleteVersionHistory(path, snapshotId);
}
return resourceAdminClient.getVersionPaths(path);
}
} catch (RemoteException ignored) {
log.info("Resource not found at " + path);
}
return null;
}
示例2: getVersionPaths
import org.wso2.carbon.registry.resource.stub.beans.xsd.VersionPath; //导入依赖的package包/类
public VersionPath[] getVersionPaths(String path)
throws RemoteException, ResourceAdminServiceExceptionException {
VersionPath[] versionPaths = null;
VersionsBean vb = resourceAdminServiceStub.getVersionsBean(path);
versionPaths = vb.getVersionPaths();
return versionPaths;
}