Updated ImExporter for assets to implement new abstract methods
parent
e7e5b50b60
commit
4587f8b266
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@librecms/ccm-cms",
|
||||
"version": "7.0.0-SNAPSHOT.2022-12-01T192513",
|
||||
"version": "7.0.0-SNAPSHOT.2022-12-24T130950",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@librecms/ccm-cms",
|
||||
"version": "7.0.0-SNAPSHOT.2022-12-01T192513",
|
||||
"version": "7.0.0-SNAPSHOT.2022-12-24T130950",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@tiptap/core": "^2.0.0-beta.127",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@librecms/ccm-cms",
|
||||
"version": "7.0.0-SNAPSHOT.2022-12-01T192513",
|
||||
"version": "7.0.0-SNAPSHOT.2022-12-24T130950",
|
||||
"description": "JavaScript stuff for ccm-cms",
|
||||
"main": "target/generated-resources/assets/@content-sections/cms-admin.js",
|
||||
"types": "target/generated-resources/assets/@content-sections/cms-admin.d.ts",
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import org.librecms.contentsection.Asset;
|
|||
import org.librecms.contentsection.AssetRepository;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
|
@ -37,11 +38,59 @@ public abstract class AbstractAssetImExporter<T extends Asset>
|
|||
@Inject
|
||||
private AssetRepository assetRepo;
|
||||
|
||||
@Override
|
||||
protected Optional<T> findExistingEntity(final String uuid) {
|
||||
return assetRepo.findByUuidAndType(uuid, getEntityClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveImportedEntity(T asset) {
|
||||
assetRepo.save(asset);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void updateExistingEntity(
|
||||
final T existingEntity, final T importedEntity
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingEntity.getTitle(),
|
||||
importedEntity.getTitle()
|
||||
)) {
|
||||
syncLocalizedStrings(
|
||||
importedEntity.getTitle(),
|
||||
existingEntity.getTitle()
|
||||
);
|
||||
}
|
||||
|
||||
updateExistingAsset(existingEntity, importedEntity);
|
||||
|
||||
assetRepo.save(existingEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing entity. Called by the implementation of
|
||||
* {@link #updateExistingEntity(org.librecms.contentsection.Asset, org.librecms.contentsection.Asset)}
|
||||
* in {@link AbstractAssetImExporter}. The same rules as for implementations
|
||||
* of
|
||||
* AbstractEntityImExporter#updateExistingEntity(org.libreccm.imexport.Exportable,
|
||||
* org.libreccm.imexport.Exportable) apply to implementations of this
|
||||
* method. Implementations should <strong>not</strong> save the updated
|
||||
* asset. The calling method
|
||||
* {@link AbstractAssetImExporter#updateExistingAsset(org.librecms.contentsection.Asset, org.librecms.contentsection.Asset)}
|
||||
* is taking care of saving the updated, existing asset.
|
||||
*
|
||||
* @param exisitingAsset The existing asset.
|
||||
* @param importedAsset The imported asset.
|
||||
*
|
||||
* @see
|
||||
* AbstractEntityImExporter#updateExistingEntity(org.libreccm.imexport.Exportable,
|
||||
* org.libreccm.imexport.Exportable)
|
||||
*/
|
||||
protected abstract void updateExistingAsset(
|
||||
final T exisitingAsset,
|
||||
final T importedAsset
|
||||
);
|
||||
|
||||
@Override
|
||||
protected T reloadEntity(T asset) {
|
||||
return assetRepo
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
*/
|
||||
package org.librecms.assets;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
|
|
@ -26,4 +29,62 @@ package org.librecms.assets;
|
|||
public abstract class AbstractBinaryAssetImExporter<T extends BinaryAsset>
|
||||
extends AbstractAssetImExporter<T> {
|
||||
|
||||
@Override
|
||||
protected final void updateExistingAsset(
|
||||
final T existingAsset,
|
||||
final T importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingAsset.getDescription(),
|
||||
importedAsset.getDescription()
|
||||
)) {
|
||||
syncLocalizedStrings(
|
||||
importedAsset.getDescription(),
|
||||
existingAsset.getDescription()
|
||||
);
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingAsset.getFileName(),
|
||||
importedAsset.getFileName()
|
||||
)) {
|
||||
existingAsset.setFileName(importedAsset.getFileName());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingAsset.getMimeType(),
|
||||
importedAsset.getMimeType()
|
||||
)) {
|
||||
existingAsset.setMimeType(importedAsset.getMimeType());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingAsset.getData(),
|
||||
importedAsset.getData()
|
||||
)) {
|
||||
existingAsset.setData(importedAsset.getData());
|
||||
}
|
||||
|
||||
if (existingAsset.getSize() != importedAsset.getSize()) {
|
||||
existingAsset.setSize(importedAsset.getSize());
|
||||
}
|
||||
|
||||
updateExistingBinaryAsset(existingAsset, importedAsset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a existing binary asset.
|
||||
*
|
||||
* @param existingAsset The existing asset.
|
||||
* @param importedAsset The imported asset.
|
||||
*
|
||||
* @see
|
||||
* AbstractAssetImExporter#updateExistingAsset(org.librecms.contentsection.Asset,
|
||||
* org.librecms.contentsection.Asset)
|
||||
*/
|
||||
protected abstract void updateExistingBinaryAsset(
|
||||
final T existingAsset,
|
||||
final T importedAsset
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
*/
|
||||
package org.librecms.assets;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
|
|
@ -26,4 +28,34 @@ package org.librecms.assets;
|
|||
public abstract class AbstractBookmarkImExporter<T extends Bookmark>
|
||||
extends AbstractAssetImExporter<T> {
|
||||
|
||||
@Override
|
||||
protected final void updateExistingAsset(
|
||||
final T existingAsset,
|
||||
final T importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingAsset.getDescription(),
|
||||
importedAsset.getDescription()
|
||||
)) {
|
||||
syncLocalizedStrings(
|
||||
importedAsset.getDescription(),
|
||||
existingAsset.getDescription()
|
||||
);
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingAsset.getUrl(),
|
||||
importedAsset.getUrl()
|
||||
)) {
|
||||
existingAsset.setUrl(importedAsset.getUrl());
|
||||
}
|
||||
|
||||
updateExistingBookmark(existingAsset, importedAsset);
|
||||
}
|
||||
|
||||
protected abstract void updateExistingBookmark(
|
||||
final T existingBookmark,
|
||||
final T importedBookmark
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.librecms.assets;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
|
@ -36,6 +37,35 @@ public abstract class AbstractContactableEntityImExporter<T extends ContactableE
|
|||
addRequiredEntities(Set.of(PostalAddress.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void updateExistingAsset(
|
||||
final T existingAsset,
|
||||
final T importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingAsset.getContactEntries(),
|
||||
importedAsset.getContactEntries()
|
||||
)) {
|
||||
existingAsset.setContactEntries(importedAsset.getContactEntries());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingAsset.getPostalAddress(),
|
||||
importedAsset.getPostalAddress()
|
||||
)) {
|
||||
existingAsset.setPostalAddress(importedAsset.getPostalAddress());
|
||||
}
|
||||
|
||||
updateExistingContactable(existingAsset, importedAsset);
|
||||
}
|
||||
|
||||
protected abstract void initContactableEntityImExporter();
|
||||
|
||||
|
||||
protected abstract void updateExistingContactable(
|
||||
final T existingContactable,
|
||||
final T importedContactable
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
|
@ -42,4 +43,17 @@ public class AudioAssetImExporter extends AbstractBinaryAssetImExporter<AudioAss
|
|||
addRequiredEntities(Set.of(LegalMetadata.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingBinaryAsset(
|
||||
final AudioAsset existingAsset,
|
||||
final AudioAsset importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingAsset.getLegalMetadata(),
|
||||
importedAsset.getLegalMetadata()
|
||||
)) {
|
||||
existingAsset.setLegalMetadata(importedAsset.getLegalMetadata());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,4 +41,12 @@ public class BookmarkImExporter
|
|||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingBookmark(
|
||||
final Bookmark existingBookmark,
|
||||
final Bookmark importedBookmark
|
||||
) {
|
||||
// Nothing to do here
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
|
@ -43,4 +44,19 @@ public class ExternalAudioAssetImExporter
|
|||
addRequiredEntities(Set.of(LegalMetadata.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingBookmark(
|
||||
final ExternalAudioAsset existingBookmark,
|
||||
final ExternalAudioAsset importedBookmark
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingBookmark.getLegalMetadata(),
|
||||
importedBookmark.getLegalMetadata()
|
||||
)) {
|
||||
existingBookmark.setLegalMetadata(
|
||||
importedBookmark.getLegalMetadata()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
|
@ -43,4 +44,19 @@ public class ExternalVideoAssetImExporter
|
|||
addRequiredEntities(Set.of(LegalMetadata.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingBookmark(
|
||||
final ExternalVideoAsset existingBookmark,
|
||||
final ExternalVideoAsset importedBookmark
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingBookmark.getLegalMetadata(),
|
||||
importedBookmark.getLegalMetadata()
|
||||
)) {
|
||||
existingBookmark.setLegalMetadata(
|
||||
importedBookmark.getLegalMetadata()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,4 +35,12 @@ public class FileAssetImExporter
|
|||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingBinaryAsset(
|
||||
final FileAsset existingAsset,
|
||||
final FileAsset importedAsset
|
||||
) {
|
||||
// Nothing to do here
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
|
@ -42,4 +43,25 @@ public class ImageImExporter extends AbstractBinaryAssetImExporter<Image> {
|
|||
addRequiredEntities(Set.of(LegalMetadata.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingBinaryAsset(
|
||||
final Image existingAsset,
|
||||
final Image importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingAsset.getLegalMetadata(),
|
||||
importedAsset.getLegalMetadata()
|
||||
)) {
|
||||
existingAsset.setLegalMetadata(importedAsset.getLegalMetadata());
|
||||
}
|
||||
|
||||
if (existingAsset.getWidth() != importedAsset.getWidth()) {
|
||||
existingAsset.setWidth(importedAsset.getWidth());
|
||||
}
|
||||
|
||||
if (existingAsset.getHeight() != importedAsset.getHeight()) {
|
||||
existingAsset.setHeight(importedAsset.getHeight());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
||||
/**
|
||||
|
|
@ -41,4 +43,49 @@ public class LegalMetadataImExporter
|
|||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingAsset(
|
||||
final LegalMetadata exisitingAsset,
|
||||
final LegalMetadata importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getRightsHolder(),
|
||||
importedAsset.getRightsHolder()
|
||||
)) {
|
||||
exisitingAsset.setRightsHolder(importedAsset.getRightsHolder());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getRights(),
|
||||
importedAsset.getRights()
|
||||
)) {
|
||||
syncLocalizedStrings(
|
||||
importedAsset.getRights(),
|
||||
exisitingAsset.getRights()
|
||||
);
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getPublisher(),
|
||||
importedAsset.getPublisher()
|
||||
)) {
|
||||
exisitingAsset.setPublisher(importedAsset.getPublisher());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getCreator(),
|
||||
importedAsset.getCreator()
|
||||
)) {
|
||||
exisitingAsset.setCreator(importedAsset.getCreator());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getContributors(),
|
||||
importedAsset.getContributors()
|
||||
)) {
|
||||
exisitingAsset.setContributors(importedAsset.getContributors());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
||||
/**
|
||||
|
|
@ -41,4 +43,17 @@ public class OrganizationImExporter
|
|||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingContactable(
|
||||
final Organization existingContactable,
|
||||
final Organization importedContactable
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingContactable.getName(),
|
||||
importedContactable.getName()
|
||||
)) {
|
||||
existingContactable.setName(importedContactable.getName());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
*/
|
||||
package org.librecms.assets;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
|
|
@ -35,4 +37,28 @@ public class PersonImExporter
|
|||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingContactable(
|
||||
final Person existingContactable,
|
||||
final Person importedContactable
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingContactable.getPersonNames(),
|
||||
importedContactable.getPersonNames()
|
||||
)) {
|
||||
existingContactable.setPersonNames(
|
||||
importedContactable.getPersonNames()
|
||||
);
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
existingContactable.getBirthdate(),
|
||||
importedContactable.getBirthdate()
|
||||
)) {
|
||||
existingContactable.setBirthdate(
|
||||
importedContactable.getBirthdate()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
package org.librecms.assets;
|
||||
|
||||
import org.librecms.contentsection.Asset;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -37,4 +37,47 @@ public class PostalAddressImExporter
|
|||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingAsset(
|
||||
final PostalAddress exisitingAsset,
|
||||
final PostalAddress importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getAddress(),
|
||||
importedAsset.getAddress()
|
||||
)) {
|
||||
exisitingAsset.setAddress(importedAsset.getAddress());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getPostalCode(),
|
||||
importedAsset.getPostalCode()
|
||||
)) {
|
||||
exisitingAsset.setPostalCode(importedAsset.getPostalCode());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getCity(),
|
||||
importedAsset.getCity()
|
||||
)) {
|
||||
exisitingAsset.setCity(importedAsset.getCity());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getState(),
|
||||
importedAsset.getState()
|
||||
)) {
|
||||
exisitingAsset.setState(importedAsset.getState());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getIsoCountryCode(),
|
||||
importedAsset.getIsoCountryCode()
|
||||
)) {
|
||||
exisitingAsset.setIsoCountryCode(
|
||||
importedAsset.getIsoCountryCode()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ package org.librecms.assets;
|
|||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityReference;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import org.librecms.contentsection.Asset;
|
||||
import org.hibernate.envers.Audited;
|
||||
import org.librecms.contentsection.ContentItem;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
|
@ -42,6 +43,24 @@ public class RelatedLinkImExporter extends AbstractAssetImExporter<RelatedLink>
|
|||
addRequiredEntities(Set.of(Bookmark.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingAsset(
|
||||
final RelatedLink exisitingAsset,
|
||||
final RelatedLink importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getTargetItem(),
|
||||
importedAsset.getTargetItem()
|
||||
)) {
|
||||
exisitingAsset.setTargetItem(importedAsset.getTargetItem());
|
||||
}
|
||||
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getBookmark(),
|
||||
importedAsset.getBookmark()
|
||||
)) {
|
||||
exisitingAsset.setBookmark(importedAsset.getBookmark());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
||||
/**
|
||||
|
|
@ -40,6 +42,17 @@ public class SideNoteImExporter extends AbstractAssetImExporter<SideNote>{
|
|||
// Nothing
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void updateExistingAsset(
|
||||
final SideNote exisitingAsset,
|
||||
final SideNote importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
exisitingAsset.getText(),
|
||||
importedAsset.getText()
|
||||
)) {
|
||||
exisitingAsset.setText(importedAsset.getText());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.librecms.assets;
|
|||
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
|
@ -45,4 +46,17 @@ public class VideoAssetImExporter
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateExistingBinaryAsset(
|
||||
final VideoAsset existingAsset,
|
||||
final VideoAsset importedAsset
|
||||
) {
|
||||
if (!Objects.equals(
|
||||
existingAsset.getLegalMetadata(),
|
||||
importedAsset.getLegalMetadata()
|
||||
)) {
|
||||
existingAsset.setLegalMetadata(importedAsset.getLegalMetadata());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue