Skip to content

Commit 19a79e7

Browse files
committed
Fix slide download
1 parent 8b76fbf commit 19a79e7

7 files changed

Lines changed: 22 additions & 13 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<properties>
2222
<java-version>1.7</java-version>
2323
<org.cloudfoundry-version>0.8.6</org.cloudfoundry-version>
24-
<org.springframework-version>4.1.4.RELEASE</org.springframework-version>
24+
<org.springframework-version>4.1.6.RELEASE</org.springframework-version>
2525
<org.aspectj-version>1.6.9</org.aspectj-version>
2626
<org.slf4j-version>1.7.10</org.slf4j-version>
2727
<jawr.debug.on>true</jawr.debug.on>

src/main/java/com/devnexus/ting/core/service/impl/BusinessServiceImpl.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,13 @@ public ApplicationCache getApplicationCacheManifest() {
424424
}
425425

426426
@Override
427-
@Transactional
428-
public FileData getPresentationFileData(Long presentationId) {
427+
public FileData getPresentationFileData(final Long presentationId) {
429428

430-
final Presentation presentation = this.getPresentation(presentationId);
429+
final Presentation presentation = transactionTemplate.execute(new TransactionCallback<Presentation>() {
430+
public Presentation doInTransaction(TransactionStatus status) {
431+
return presentationDao.getOneWithSlide(presentationId);
432+
}
433+
});
431434

432435
if (presentation == null) {
433436
return null;

src/main/java/com/devnexus/ting/repository/PresentationRepositoryCustom.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ List<Presentation> findPresentations(
3333

3434
List<Presentation> getPresentationsForEventOrderedByTrack(Long eventId);
3535

36+
Presentation getOneWithSlide(Long presentationId);
3637
}

src/main/java/com/devnexus/ting/repository/jpa/CfpSubmissionRepositoryImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ public class CfpSubmissionRepositoryImpl implements CfpSubmissionRepositoryCusto
3333
@PersistenceContext
3434
private EntityManager entityManager;
3535

36-
public CfpSubmissionRepositoryImpl() {
37-
super();
38-
// TODO Auto-generated constructor stub
39-
}
40-
4136
@Override
4237
public List<CfpSubmission> getCfpSubmissions(Long eventId) {
4338

src/main/java/com/devnexus/ting/repository/jpa/PresentationRepositoryImpl.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,14 @@ else if (presentationSearchQuery.getTrack().getName() != null) {
116116
return rootCriteria.list();
117117
}
118118

119+
@Override
120+
public Presentation getOneWithSlide(Long presentationId) {
121+
return this.entityManager
122+
.createQuery("select p from Presentation p "
123+
+ "join fetch p.presentationFile e "
124+
+ "where p.id = :presentationId ", Presentation.class)
125+
.setParameter("presentationId", presentationId)
126+
.getSingleResult();
127+
}
128+
119129
}

src/main/java/com/devnexus/ting/web/controller/admin/PresentationController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public String prepareEditPresentation(@PathVariable("presentationId") Long prese
167167
model.addAttribute("presentation", presentation);
168168

169169
final List<Speaker> speakers = businessService.getSpeakersForEvent(presentation.getEvent().getId());
170-
model.addAttribute("speakers", speakers);
170+
model.addAttribute("sp2", speakers);
171171

172172
this.prepareReferenceData(model, presentation.getEvent());
173173

src/main/resources/ehcache.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<defaultCache
4545
maxElementsInMemory="10000"
4646
eternal="false"
47-
overflowToDisk="true"
47+
overflowToDisk="false"
4848
timeToIdleSeconds="500"
4949
timeToLiveSeconds="500"
5050
diskPersistent="false"
@@ -55,8 +55,8 @@
5555
maxElementsInMemory="500"
5656
eternal="false"
5757
timeToLiveSeconds="220"
58-
overflowToDisk="true"
58+
overflowToDisk="false"
5959
diskPersistent="false"/>
6060

6161
<!-- See http://ehcache.sourceforge.net/documentation/#mozTocId258426 for how to configure caching for your objects -->
62-
</ehcache>
62+
</ehcache>

0 commit comments

Comments
 (0)