if (!registry.resourceExists(minorVersionPath)) {
String majorVersionPath = RegistryUtils.getParentPath(minorVersionPath);
if (!registry.resourceExists(majorVersionPath)) {
String versionCollectionPath = RegistryUtils.getParentPath(majorVersionPath);
if (!registry.resourceExists(versionCollectionPath)) {
Collection collection = registry.newCollection();
collection.setMediaType(
CommonConstants.PROCESS_VERSION_COLLECTION_MEDIA_TYPE);
registry.put(versionCollectionPath, collection);
for (String key : smartLifecycleLinks) {
Resource linkResource = registry.newResource();
linkResource.setMediaType(
CommonConstants.SMART_LIFECYCLE_LINK_MEDIA_TYPE);
registry.put(versionCollectionPath +
RegistryConstants.PATH_SEPARATOR + key, linkResource);
}
}
Collection collection = registry.newCollection();
collection.setMediaType(CommonConstants.PROCESS_MAJOR_VERSION_MEDIA_TYPE);
registry.put(majorVersionPath, collection);
}
Collection collection = registry.newCollection();
collection.setMediaType(CommonConstants.PROCESS_MINOR_VERSION_MEDIA_TYPE);
registry.put(minorVersionPath, collection);
}
Collection collection = registry.newCollection();
collection.setMediaType(CommonConstants.PROCESS_PATCH_VERSION_MEDIA_TYPE);
registry.put(patchVersionPath, collection);
}
registry.put(processVersionPath, resource);
}