Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket#8557 upload videos #117

Open
wants to merge 93 commits into
base: sedici_master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
5c03c41
8557 Creo clase con codigo que envia un video a youtube
santit96 Nov 28, 2022
78bbb4b
8557 Separo el codigo de subida de video a youtube en dos clases
santit96 Nov 29, 2022
3365eda
8557 primera aprox de consumer y service para subir videos a youtube
PabloDeAlbu Dec 27, 2022
4a89c57
8557-Cambio en las dependencias
GarrafaGalactica Dec 28, 2022
6e85cf1
Merge branch 'ticket#8557-uploadVideos' of https://github.com/sedici/…
GarrafaGalactica Dec 28, 2022
1eeb1bc
8557-Dependencias explicitas
GarrafaGalactica Dec 29, 2022
ad13471
#8557-Parametros y cambio de nombre al adapter
GarrafaGalactica Jan 30, 2023
f411c1c
#8557-Primer update
GarrafaGalactica Feb 1, 2023
85efa42
8557-Logger para el upload y logs en el adapter
GarrafaGalactica Feb 2, 2023
30fd793
8557 Acercamiento con un consumer que llama al servicio que subiría v…
PabloDeAlbu Feb 2, 2023
362c3b3
8557 Agrego VideoUploaderTask.java vacio
PabloDeAlbu Feb 2, 2023
98358c3
8557-Delete de videos
GarrafaGalactica Feb 3, 2023
c4075e0
8557 arreglada autenticacion
mugen-2 Feb 3, 2023
46edf16
8557 delarado videouploader curation
mugen-2 Feb 3, 2023
ea2a1c2
8557- videoconsumer queue
mugen-2 Feb 3, 2023
87eacac
quito imports no usado en VideoUploaderEventConsumer
PabloDeAlbu Feb 3, 2023
e90d5f5
8557 Quito lineas innecesarias en VideoUploaderEventConsumer
PabloDeAlbu Feb 3, 2023
a803b86
8557-modificada la curation
mugen-2 Feb 3, 2023
338f6f5
8557-Cambio en el orden de los parametros
GarrafaGalactica Feb 7, 2023
2c4db7d
8557-Primer version del servicio
GarrafaGalactica Feb 10, 2023
0f88418
8557-Autorize con cuenta de servicio
GarrafaGalactica Feb 13, 2023
3fe109e
8557 - mediacontent.setLength arreglado
mugen-2 Feb 16, 2023
6066ed6
8557-Cambio en la manera de autorizacion
GarrafaGalactica Feb 23, 2023
4cd3cdf
8557-Guardar el id del video y elimino imports
GarrafaGalactica Feb 27, 2023
345828e
8557-Construccion de descipcion
GarrafaGalactica Mar 2, 2023
22768c3
8557-Pom ;)
GarrafaGalactica Mar 2, 2023
20d33f3
ticket8557 - Consumer upload
mugen-2 Mar 2, 2023
d6d8b9f
Merge branch 'ticket#8557-uploadVideos' of github.com:sedici/DSpace i…
mugen-2 Mar 2, 2023
f9439b1
8557 - Local Reciever al puerto 9080
mugen-2 Mar 3, 2023
9cd0afd
8557 - Local Reciever cambio el host
mugen-2 Mar 3, 2023
ad87ef4
8557 - correccion metadato youtubeID
mugen-2 Mar 3, 2023
cbc4826
8557-Metodo de construccion de descipcion
GarrafaGalactica Mar 6, 2023
5bbac89
8557-CategoryId y arreglo de errores
GarrafaGalactica Mar 7, 2023
edd94b5
8557 bundle add videoConsumer
mugen-2 Mar 7, 2023
cc63ed7
8557- Upload por partes
mugen-2 Mar 9, 2023
05010f7
8557-Correcciones y curation de updateVideo
mugen-2 Mar 10, 2023
ec71373
8557-Upload Service
GarrafaGalactica Mar 10, 2023
f4bb528
8557-Coregido curate.cfg y update service
mugen-2 Mar 10, 2023
27e0869
8557-Fix condicion para encolar update vacio
mugen-2 Mar 10, 2023
03b0d30
8557-Correcion de keywords
mugen-2 Mar 14, 2023
bae72e5
8557-Corregido el abstract
mugen-2 Mar 14, 2023
9d85e09
8557-Arreglando problema de subida con error
GarrafaGalactica Mar 16, 2023
9a03dae
Merge branch 'ticket#8557-uploadVideos' of https://github.com/sedici/…
GarrafaGalactica Mar 16, 2023
101df31
8557-Implementacion del delete en el service
GarrafaGalactica Mar 16, 2023
3de5a9f
8557-Caso de delete sin bundle original
GarrafaGalactica Mar 17, 2023
3f19cab
8557-Consumer/curation de delete
mugen-2 Mar 17, 2023
c72eaa2
8557-Parseo del mapeo a youtube
GarrafaGalactica Mar 17, 2023
0e3f9de
8557-cambio de lugar el armado de la descripcion
mugen-2 Mar 23, 2023
75af0ce
8557-Manejo de exepciones
GarrafaGalactica Mar 27, 2023
30d9fcf
Merge branch 'ticket#8557-uploadVideos' of https://github.com/sedici/…
GarrafaGalactica Mar 27, 2023
31108f9
8557 - Correciòn de host en el localreciever
mugen-2 Mar 27, 2023
f788fef
8557-Agrego los try al update y al delete
GarrafaGalactica Mar 27, 2023
c27019c
8557-Mejor manejo de exepciones
GarrafaGalactica Mar 28, 2023
746e183
8557-Borrado de println y fix minimo del consumer
mugen-2 Mar 28, 2023
f986fcf
8557-Agrego algunos comentarios
GarrafaGalactica Mar 29, 2023
7880f3b
8557-fix del titulo de los videos y otros
mugen-2 Mar 31, 2023
4218ca8
8557-Añadido el StringBuffer
mugen-2 Mar 31, 2023
fa82d19
8557-youtubeId mapeado en solr
mugen-2 Apr 10, 2023
f96d945
8557-Agrego el youtubeId a sedici_metadata.xml
GarrafaGalactica Apr 13, 2023
5db0a0f
Merge branch 'ticket#8557-uploadVideos' of https://github.com/sedici/…
GarrafaGalactica Apr 13, 2023
9d5addb
8557-Aca no paso nada(aux)
GarrafaGalactica Apr 13, 2023
4617b11
#8557-Misma curation queue todos los eventos
mugen-2 Apr 21, 2023
c453153
8557-Cambios de scopes por politicas Google
GarrafaGalactica Apr 25, 2023
75f0855
Cambio para dejar de usar LocalServerReceiver
GarrafaGalactica Aug 17, 2023
2aca072
Agrego metadato de catedra
GarrafaGalactica Aug 22, 2023
a424a92
ticket#8557-cron para youtube queue
mugen-2 Aug 24, 2023
9450a09
Agrego propiedades para upload de videos
GarrafaGalactica Aug 25, 2023
e188727
Envio de mail en caso de errores
GarrafaGalactica Aug 28, 2023
f487a74
Actualizo el envio de mails en exepciones
GarrafaGalactica Aug 29, 2023
1f31c82
ticket#8557-Limpieza adapter y crons
mugen-2 Aug 29, 2023
28299f0
Construccion de las tags de youtube
GarrafaGalactica Aug 29, 2023
e3b136f
Cambios en como se llama al UploadService
GarrafaGalactica Sep 4, 2023
18f4420
ticket#8557-youtube adapter como service
mugen-2 Sep 4, 2023
a6217ff
ticket#8557-Fix VideoUploaderService
mugen-2 Sep 5, 2023
3b5d404
8557-Implementacon de Youtube como service
GarrafaGalactica Sep 7, 2023
6c547c4
8557-Agrego property de privacidad
GarrafaGalactica Sep 13, 2023
bae4951
9792 - Arreglos en la descripcion
GarrafaGalactica Sep 21, 2023
8b4eb79
8557-Los videos se suben como creative commons
mugen-2 Sep 22, 2023
facb5e7
Merge branch 'ticket#8557-uploadVideos' of github.com:sedici/DSpace i…
mugen-2 Sep 22, 2023
a5d9c21
8557 - Cambio modificacion y titulo, para niños F
GarrafaGalactica Sep 25, 2023
91a0b81
8557-Check de tamaño maximo de descripcion
GarrafaGalactica Oct 3, 2023
d1d0c35
8557-Dejar de mandar cuano no queda quota
GarrafaGalactica Oct 10, 2023
79c341b
8557-Borro print
GarrafaGalactica Oct 10, 2023
150b8c5
8557-Cambios sobre comentarios en el pull
GarrafaGalactica Dec 11, 2023
6b3ae19
8557-Cambio comentarios y log a ingles
GarrafaGalactica Dec 13, 2023
a2f0816
8557-Cambio de lugar comentario
GarrafaGalactica Dec 13, 2023
26ee4d7
8557-Arreglo comentarios
GarrafaGalactica Dec 14, 2023
06d3723
8557-Traduccion que faltaba
GarrafaGalactica Dec 14, 2023
ef96091
8557-Cambios a partir de comentarios del pull
GarrafaGalactica Dec 18, 2023
9009481
8557-Borro condicion que no va
GarrafaGalactica Dec 18, 2023
c665629
8557-Agrego configuracion de adapter por xml
GarrafaGalactica Feb 2, 2024
670d095
8557-Correccion de errores
GarrafaGalactica Feb 5, 2024
d1ff179
8557-Replicar cambio de desc de bitstream
GarrafaGalactica Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ META-INF/
.DS_Store

##Omito los datos relativos a la configuración local de dspace
install/
install/

# Omito las credenciales de google api
client_secrets.json
6 changes: 6 additions & 0 deletions dspace/config/cron.d-dspace
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,9 @@ DSPACE=/var/dspace/install

#Limpieza de la cache de cocoon cada 8 horas a partir de las 7am
30 */8 * * * dspace curl --silent --output /dev/null --show-error --fail --data "cache-clearance" http://sedici.unlp.edu.ar/clear-cache

#Cron para ejecutar tareas relacionadas con youtube, se ejecuta de lunes a viernes, de 8 a 18 cada una hora
#0 8-18 * * 1-5 dspace $DSPACE/bin/dspace curate -q replicateVideo > /dev/null

#Cron identica a de arriba pero para probar en testing
0 8-18 * * 1-5 root docker exec sedici sh -c "cd /dspace/install/bin && ./dspace curate -q replicateVideo"> /dev/null
10 changes: 9 additions & 1 deletion dspace/config/dspace.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ event.dispatcher.default.class = org.dspace.event.BasicDispatcher
# Add doi here if you are using org.dspace.identifier.DOIIdentifierProvider to generate DOIs.
# Adding doi here makes DSpace send metadata updates to your doi registration agency.
# Add rdf here, if you are using dspace-rdf to export your repository content as RDF.
event.dispatcher.default.consumers = discovery, eperson, harvester, doi
event.dispatcher.default.consumers = discovery, eperson, harvester, doi, videouploader

# The noindex dispatcher will not create search or browse indexes (useful for batch item imports)
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
Expand Down Expand Up @@ -814,6 +814,10 @@ event.consumer.versioning.filters = Item+Install
event.consumer.authority.class = org.dspace.authority.indexer.AuthorityConsumer
event.consumer.authority.filters = Item+Modify|Modify_Metadata

# consumer to upload videos
event.consumer.videouploader.class = ar.edu.unlp.sedici.dspace.uploader.VideoUploaderEventConsumer
event.consumer.videouploader.filters = Collection|Item|Bundle|Bitstream+Add|Modify_Metadata|Remove

# ...set to true to enable testConsumer messages to standard output
#testConsumer.verbose = true

Expand Down Expand Up @@ -1966,6 +1970,10 @@ webui.bitstream.order.field = bitstream_order
google-metadata.config = ${dspace.dir}/config/crosswalks/google-metadata.properties
google-metadata.enable = true

##### Youtube Uploader Configuration #####
youtube.upload.redirect_uri=${youtube.upload.redirect_uri}
youtube.enable = true

#---------------------------------------------------------------#
#--------------JSPUI SPECIFIC CONFIGURATIONS--------------------#
#---------------------------------------------------------------#
Expand Down
17 changes: 17 additions & 0 deletions dspace/config/input-forms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,19 @@
<type-bind>Objeto de aprendizaje</type-bind>
</field>

<!-- Catedras -->
<field>
<dc-schema>sedici</dc-schema>
<dc-element>description</dc-element>
<dc-qualifier>catedra</dc-qualifier>
<repeatable>true</repeatable>
<label>Catedras responsables</label>
<input-type>textarea</input-type>
<hint>Nombre de la catedra</hint>
<visibility-on-group>Bibliotecarios</visibility-on-group>
<type-bind>Objeto de aprendizaje</type-bind>
</field>

</page>

</form>
Expand Down Expand Up @@ -1243,6 +1256,10 @@
<displayed-value>Objeto de aprendizaje</displayed-value>
<stored-value>Objeto de aprendizaje</stored-value>
</pair>
<pair>
<displayed-value>Video de catedras</displayed-value>
<stored-value>Video de catedras</stored-value>
</pair>
</value-pairs>

<value-pairs value-pairs-name="common_subtypes_objeto_conferencia" dc-term="type">
Expand Down
13 changes: 13 additions & 0 deletions dspace/config/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ log4j.appender.A3.File=${log.dir}/cocoon.log
log4j.appender.A3.layout=org.apache.log4j.PatternLayout
log4j.appender.A3.layout.ConversionPattern=%d %-5p %c %x - %m%n

###########################################################################
# Appender for the uploads
###########################################################################
log4j.appender.upload=org.apache.log4j.FileAppender
log4j.appender.upload.File=${log.dir}/upload.log
log4j.appender.upload.layout=org.apache.log4j.PatternLayout
log4j.appender.upload.layout.ConversionPattern=%d %-5p %c @ %m%n

log4j.logger.ar.edu.unlp.sedici.dspace.uploader=INFO, upload
log4j.logger.ar.edu.unlp.sedici.dspace.curation.VideoDeleteTask=INFO, upload
log4j.logger.ar.edu.unlp.sedici.dspace.curation.VideoUpdaterTask=INFO, upload
log4j.logger.ar.edu.unlp.sedici.dspace.curation.VideoUploaderTask=INFO, upload


###########################################################################
# Other settings
Expand Down
3 changes: 3 additions & 0 deletions dspace/config/modules/curate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ plugin.named.org.dspace.curate.CurationTask = \
ar.edu.unlp.sedici.dspace.curation.MetadataAuthorityQualityControl = metadataauthorityqualitycontrol-fixClosedAuthorities, \
ar.edu.unlp.sedici.dspace.curation.MetadataAuthorityQualityControl = metadataauthorityqualitycontrol-fixInvalidAuthorities, \
ar.edu.unlp.sedici.dspace.curation.PDFVersionChecker = PDFversionchecker, \
ar.edu.unlp.sedici.dspace.curation.VideoUploaderTask = VideoUploaderTask, \
ar.edu.unlp.sedici.dspace.curation.VideoUpdaterTask = VideoUpdaterTask, \
ar.edu.unlp.sedici.dspace.curation.VideoDeleteTask = VideoDeleteTask, \
org.dspace.ctask.general.ProfileFormats = profileformats, \
org.dspace.ctask.general.RequiredMetadata = requiredmetadata, \
org.dspace.ctask.general.ClamScan = vscan, \
Expand Down
18 changes: 18 additions & 0 deletions dspace/config/modules/upload.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Uri de redireccionamiento de las credenciales
#youtube.upload.redirect_uri=

# Usuario reencola las tareas
[email protected]

# Ruta de credenciales
youtube.upload.secrets=${dspace.dir}/config/client_secrets.json

# Ruta de refresh token
youtube.upload.refresh=${dspace.dir}/config/youtube-api-uploadvideo.json

# Privacidad del video public/unlisted/private
youtube.upload.video.state=private

# Metadato que identifica al bitstream en otra plataforma externa
video.identifier.metadata=sedici.identifier.youtubeId

12 changes: 12 additions & 0 deletions dspace/config/registries/sedici-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,18 @@
<qualifier>expediente</qualifier>
<scope_note>Numero de expediente asociado a un documento institucional</scope_note>
</dc-type>
<dc-type>
<schema>sedici</schema>
<element>identifier</element>
<qualifier>youtubeId</qualifier>
<scope_note>Id de video replicado en Youtube</scope_note>
</dc-type>
<dc-type>
<schema>sedici</schema>
<element>description</element>
<qualifier>catedra</qualifier>
<scope_note>Nombre de catedra a la que pertenece el recurso</scope_note>
</dc-type>
<dc-type>
<schema>sedici</schema>
<element>relation</element>
Expand Down
1 change: 1 addition & 0 deletions dspace/config/spring/api/discovery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

<bean id="solrServiceResourceIndexPlugin" class="org.dspace.discovery.SolrServiceResourceRestrictionPlugin" scope="prototype"/>
<bean id="SolrServiceSpellIndexingPlugin" class="org.dspace.discovery.SolrServiceSpellIndexingPlugin" scope="prototype"/>
<bean id="SolrServiceYoutubeBitstreamPlugin" class="ar.edu.unlp.sedici.dspace.uploader.SolrServiceYoutubeBitstreamPlugin" scope="prototype"/>

<alias name="solrServiceResourceIndexPlugin" alias="org.dspace.discovery.SolrServiceResourceRestrictionPlugin"/>

Expand Down
36 changes: 36 additions & 0 deletions dspace/config/spring/api/upload.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at

http://www.dspace.org/license/

-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd"
default-autowire-candidates="*Service,*DAO,javax.sql.DataSource">

<!--Change the class to change Adapter-->
<bean id="adapter"
class="ar.edu.unlp.sedici.dspace.uploader.adapter.YoutubeAdapter"
scope="singleton"/>

<bean id="ar.edu.unlp.sedici.dspace.uploader.VideoUploaderServiceImpl"
class="ar.edu.unlp.sedici.dspace.uploader.VideoUploaderServiceImpl"
scope="singleton">

<constructor-arg ref="adapter" />

</bean>

</beans>
57 changes: 57 additions & 0 deletions dspace/modules/additions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,17 @@
<properties>
<!-- This is the path to the root [dspace-src] directory. -->
<root.basedir>${basedir}/../../..</root.basedir>
<project.youtube.version>v3-rev20230123-2.0.0</project.youtube.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<repositories>
<repository>
<id>google-api-services</id>
<url>http://google-api-client-libraries.appspot.com/mavenrepo</url>
</repository>
</repositories>

<profiles>
<profile>
<id>oracle-support</id>
Expand Down Expand Up @@ -97,6 +106,54 @@
</exclusions>
</dependency>




<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-youtube</artifactId>
<version>${project.youtube.version}</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>1.42.3</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.34.1</version>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<version>1.42.3</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
<version>1.34.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.4</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package ar.edu.unlp.sedici.dspace.curation;

import java.io.IOException;
import java.sql.SQLException;

import org.apache.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.curate.AbstractCurationTask;
import org.dspace.curate.Curator;
import org.dspace.eperson.EPerson;
import org.dspace.utils.DSpace;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import ar.edu.unlp.sedici.dspace.uploader.VideoUploaderServiceImpl;

public class VideoDeleteTask extends AbstractCurationTask {

private int status;

private static final Logger log = Logger.getLogger(VideoDeleteTask.class);

@Override
public int perform(DSpaceObject dso) throws IOException {

status = Curator.CURATE_SKIP;
Item item = (Item) dso;


VideoUploaderServiceImpl vuploader = new DSpace().getSingletonService(VideoUploaderServiceImpl.class);
GarrafaGalactica marked this conversation as resolved.
Show resolved Hide resolved
try {
vuploader.removeContent(item);
status = Curator.CURATE_SUCCESS;
} catch (IOException e) {
log.error("IO error in the delete of the item with ID "+item.getID()+": "+e.getMessage(),e);
throw e;
}

return status;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package ar.edu.unlp.sedici.dspace.curation;

import java.io.IOException;
import java.sql.SQLException;

import org.apache.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.curate.AbstractCurationTask;
import org.dspace.curate.Curator;
import org.dspace.eperson.EPerson;
import org.dspace.utils.DSpace;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import ar.edu.unlp.sedici.dspace.uploader.VideoUploaderServiceImpl;

public class VideoUpdaterTask extends AbstractCurationTask {

private int status;

private static final Logger log = Logger.getLogger(VideoUpdaterTask.class);

@Override
public int perform(DSpaceObject dso) throws IOException {

status = Curator.CURATE_SKIP;
Item item = (Item) dso;


VideoUploaderServiceImpl vuploader = new DSpace().getSingletonService(VideoUploaderServiceImpl.class);
try {
vuploader.modifyContent(item);
status = Curator.CURATE_SUCCESS;
} catch (IOException e) {
log.error("IO error in the update of the item with ID "+item.getID()+": "+e.getMessage(),e);
throw e;
}

return status;
}

}
Loading