CCM NG: Added missing implementations
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5782 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
5fdcabf4c3
commit
1242a6d36e
|
|
@ -19,19 +19,23 @@
|
|||
package org.libreccm.docrepo;
|
||||
|
||||
import org.libreccm.imexport.AbstractEntityImExporter;
|
||||
import org.libreccm.imexport.Exportable;
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.faces.bean.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
/**
|
||||
* Im/Exporter for importing and exporting {@code BlobObject}s from the
|
||||
* system into a specified file and the other way around.
|
||||
* Im/Exporter for importing and exporting {@code BlobObject}s from the system
|
||||
* into a specified file and the other way around.
|
||||
*
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@RequestScoped
|
||||
@Processes(BlobObject.class)
|
||||
|
|
@ -48,7 +52,13 @@ public class BlobObjectImExporter extends AbstractEntityImExporter<BlobObject> {
|
|||
@Override
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
protected void saveImportedEntity(final BlobObject entity) {
|
||||
|
||||
|
||||
blobObjectRepository.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<Class<? extends Exportable>> getRequiredEntities() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,12 @@
|
|||
package org.libreccm.docrepo;
|
||||
|
||||
import org.libreccm.imexport.AbstractEntityImExporter;
|
||||
import org.libreccm.imexport.Exportable;
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
|
||||
|
||||
|
|
@ -51,4 +55,11 @@ public class FileImExporter extends AbstractEntityImExporter<File> {
|
|||
protected void saveImportedEntity(final File portableObject) {
|
||||
fileRepository.save(portableObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<Class<? extends Exportable>> getRequiredEntities() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,15 +18,19 @@
|
|||
*/
|
||||
package org.libreccm.docrepo;
|
||||
|
||||
import org.libreccm.imexport.Exportable;
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.faces.bean.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
/**
|
||||
* Im/Exporter for importing and exporting {@link Folder}s from the
|
||||
* system into a specified file and the other way around.
|
||||
* Im/Exporter for importing and exporting {@link Folder}s from the system into
|
||||
* a specified file and the other way around.
|
||||
*
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
|
||||
* @author <a href="mailto:jens.pelzetter@uni-bremen.de">Jens Pelzetter</a>
|
||||
|
|
@ -48,4 +52,10 @@ public class FolderImExporter extends AbstractResourceImExporter<Folder> {
|
|||
protected void saveImportedEntity(final Folder entity) {
|
||||
folderRepository.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<Class<? extends Exportable>> getRequiredEntities() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,12 @@
|
|||
package org.libreccm.docrepo;
|
||||
|
||||
import org.libreccm.imexport.AbstractEntityImExporter;
|
||||
import org.libreccm.imexport.Exportable;
|
||||
import org.libreccm.imexport.Processes;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.faces.bean.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
|
@ -44,4 +48,12 @@ public class RepositoryImExporter extends AbstractEntityImExporter<Repository> {
|
|||
protected void saveImportedEntity(final Repository portableObject) {
|
||||
repositoryRepository.save(portableObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<Class<? extends Exportable>> getRequiredEntities() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue