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