Rev 1800 | Rev 1803 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1800 | Rev 1801 | ||
---|---|---|---|
Line 167... | Line 167... | ||
167 | RepositoryFileImpl repoFile = repositoryService.loadView(cu.getProgramStreamId()); |
167 | RepositoryFileImpl repoFile = repositoryService.loadView(cu.getProgramStreamId()); |
168 | sendPdfFtpIonline(cu,errors,u,path,repoFile.getLastVersion().getSaveDate(),null,warns); |
168 | sendPdfFtpIonline(cu,errors,u,path,repoFile.getLastVersion().getSaveDate(),null,warns); |
169 | } |
169 | } |
170 | 170 | ||
171 | 171 | ||
172 | public void sendPdfIonlineOnly(CourseUnit cu, List<String> errors,UserSession u,List<String> warns) throws 1.5.0/docs/api/java/io/IOException.html">IOException, 1.5.0/docs/api/javax/xml/transform/TransformerException.html">TransformerException, FOPException { |
172 | public boolean sendCurrentPdf2IonlineDontGeneratePdf(CourseUnit cu, List<String> errors,UserSession u,FTPClient client,List<String> warns) throws 1.5.0/docs/api/java/io/IOException.html">IOException, 1.5.0/docs/api/javax/xml/transform/TransformerException.html">TransformerException, FOPException { |
173 | 173 | ||
- | 174 | if(cu.getProgramStreamId() != null && cu.getProgramStreamId().length()> 0) |
|
- | 175 | { |
|
- | 176 | try |
|
- | 177 | { |
|
- | 178 | IRepositoryFile repoFileLastVersion = repositoryService.load(cu.getProgramStreamId(), null); |
|
174 | 179 | ||
175 | IRepositoryFile repoFileLastVersion = repositoryService.load(cu.getProgramStreamId(), null); |
180 | sendPdfFtpIonline(cu, errors, u, repoFileLastVersion.getInput(), repoFileLastVersion.getSaveDate(), client, warns); |
- | 181 | return true; |
|
176 | 182 | } |
|
177 | FTPClient nullClient = null; |
183 | catch(1.5.0/docs/api/java/lang/Throwable.html">Throwable e) |
- | 184 | { |
|
178 | sendPdfFtpIonline(cu, errors, u, repoFileLastVersion.getInput(), repoFileLastVersion.getSaveDate(), nullClient, warns); |
185 | logger.error("Loading repository file: " + cu.getProgramStreamId() + " " + e.toString(),e); |
- | 186 | } |
|
- | 187 | } |
|
- | 188 | return false; |
|
179 | } |
189 | } |
180 | 190 | ||
181 | 191 | ||
182 | public boolean sendPdfFtpIonline(CourseUnit cu, List<String> errors, UserSession u, FTPClient client, List<String> warns) throws 1.5.0/docs/api/java/io/IOException.html">IOException, 1.5.0/docs/api/javax/xml/transform/TransformerException.html">TransformerException, FOPException |
192 | public boolean sendPdfFtpIonline(CourseUnit cu, List<String> errors, UserSession u, FTPClient client, List<String> warns) throws 1.5.0/docs/api/java/io/IOException.html">IOException, 1.5.0/docs/api/javax/xml/transform/TransformerException.html">TransformerException, FOPException |
183 | { |
193 | { |
Line 474... | Line 484... | ||
474 | CourseUnit next = cuIter.next(); |
484 | CourseUnit next = cuIter.next(); |
475 | 485 | ||
476 | try { |
486 | try { |
477 | List<String> errors = new ArrayList<String>(); |
487 | List<String> errors = new ArrayList<String>(); |
478 | 1.5.0/docs/api/java/lang/System.html">System.out.print("Sending " + next.getCourse().getName() + " - " + next.getSemestre() + " - " + next.getNormalizedName()); |
488 | 1.5.0/docs/api/java/lang/System.html">System.out.print("Sending " + next.getCourse().getName() + " - " + next.getSemestre() + " - " + next.getNormalizedName()); |
479 | if(sendPdfFtpIonline(next,errors,null,client,null)) |
489 | if(sendCurrentPdf2IonlineDontGeneratePdf(next, errors, null, client, null)) |
480 | 1.5.0/docs/api/java/lang/System.html">System.out.print(" ... OK"); |
490 | 1.5.0/docs/api/java/lang/System.html">System.out.print(" ... OK"); |
481 | else |
491 | else |
482 | 1.5.0/docs/api/java/lang/System.html">System.out.print(" ... FAIL probably no StreamID"); |
492 | 1.5.0/docs/api/java/lang/System.html">System.out.print(" ... FAIL probably no StreamID"); |
483 | 1.5.0/docs/api/java/lang/System.html">System.out.print("\n"); |
493 | 1.5.0/docs/api/java/lang/System.html">System.out.print("\n"); |
484 | if(errors.size()>0) |
494 | if(errors.size()>0) |