use of com.thinkbiganalytics.metadata.api.versioning.EntityVersion in project kylo by Teradata.
the class InitialFeedVersionUpgradeAction method upgradeTo.
@Override
public void upgradeTo(final KyloVersion startingVersion) {
log.info("Upgrading feeds as versionable from version: {}", startingVersion);
feedProvider.getFeeds().forEach(feed -> {
JcrFeed jcrFeed = (JcrFeed) feed;
List<EntityVersion<Feed.ID, Feed>> versions = feedProvider.findVersions(jcrFeed.getId(), false);
if (versions.size() <= 1) {
jcrFeed.setDescription(jcrFeed.getDescription());
feedProvider.update(jcrFeed);
}
});
}
use of com.thinkbiganalytics.metadata.api.versioning.EntityVersion in project kylo by Teradata.
the class DraftVersionProviderMixin method createVersion.
@Override
default EntityVersion<PK, T> createVersion(PK entityId, String comment, boolean includeContent) {
Version version = createVersionedEntity(entityId, comment);
Node versionable = JcrVersionUtil.getFrozenNode(version);
T entity = includeContent ? asEntity(entityId, versionable) : null;
return new JcrEntityVersion<>(version, getChangeComment(entityId, versionable), entityId, entity);
}
Aggregations