Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1844 → Rev 1845

/branches/v3/impl/build1.8.xml
391,11 → 391,11
 
<target name="war" depends="build.war">
<delete file="${dist.dir}/${tomcat.war.file}"/>
<jar destfile="${dist.dir}/${tomcat.war.file}">
<war destfile="${dist.dir}/${tomcat.war.file}">
<fileset dir="${build.dir.war}">
<include name="**/*" />
</fileset>
</jar>
</war>
</target>
 
<target name="war.jasper" depends="build.war,jasper">
/branches/v3/impl/conf/WEB-INF/struts/struts-json-ws.xml
51,7 → 51,7
 
 
 
<action path="/ws-units-report-list" forward="/json/coursesServices.do?dispatch=executeService&amp;serviceJson=getCourseUnitsEvaluations"/>
<!--<action path="/ws-units-report-list" forward="/json/coursesServices.do?dispatch=executeService&amp;serviceJson=getCourseUnitsEvaluations"/>-->
<action path="/ws-course-pedagogic-results-list" forward="/json/coursesServices.do?dispatch=executeService&amp;serviceJson=findPedagogicReport4Period"/>
<action path="/ws-units-dtp-stats" forward="/json/coursesServices.do?dispatch=executeService&amp;serviceJson=getCourseUnitDtpStats"/>
 
/branches/v3/impl/conf/WEB-INF/tlds/struts-logic.tld
1,16 → 1,10
<?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>logic</shortname>
<uri>http://struts.apache.org/tags-logic</uri>
<uri>/WEB-INF/tlds/struts-logic.tld</uri>
<tag>
<name>empty</name>
<tagclass>org.apache.struts.taglib.logic.EmptyTag</tagclass>
/branches/v3/impl/conf/WEB-INF/tlds/jomm.tld
4,7 → 4,7
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>jomm</shortname>
<uri>http://jomm.pt/</uri>
<uri>/WEB-INF/tlds/jomm.tld</uri>
<tag>
<name>equalBeans</name>
<tagclass>jomm.web.tags.EqualBeansTag</tagclass>
/branches/v3/impl/conf/WEB-INF/tlds/struts-tiles.tld
1,17 → 1,10
<?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
 
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>tiles</shortname>
<uri>http://struts.apache.org/tags-tiles</uri>
<uri>/WEB-INF/tlds/struts-tiles.tld</uri>
<tag>
<name>insert</name>
<tagclass>org.apache.struts.taglib.tiles.InsertTag</tagclass>
/branches/v3/impl/conf/WEB-INF/tlds/baco.tld
4,7 → 4,7
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>baco</shortname>
<uri>http://www.estgp.pt/baco/</uri>
<uri>/WEB-INF/tlds/baco.tld</uri>
<tag>
<name>isModuleOff</name>
<tagclass>pt.estgp.estgweb.web.tags.IsModuleOffTag</tagclass>
/branches/v3/impl/conf/WEB-INF/tlds/struts-nested.tld
1,16 → 1,10
<?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>nested</shortname>
<uri>http://struts.apache.org/tags-nested</uri>
<uri>/WEB-INF/tlds/struts-nested.tld</uri>
<tag>
<name>nest</name>
<tagclass>org.apache.struts.taglib.nested.NestedPropertyTag</tagclass>
/branches/v3/impl/conf/WEB-INF/tlds/struts-html.tld
1,17 → 1,10
<?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
 
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>html</shortname>
<uri>http://struts.apache.org/tags-html</uri>
<uri>/WEB-INF/tlds/struts-html.tld</uri>
<tag>
<name>base</name>
<tagclass>org.apache.struts.taglib.html.BaseTag</tagclass>
/branches/v3/impl/conf/WEB-INF/tlds/struts-bean.tld
1,17 → 1,10
<?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
 
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>bean</shortname>
<uri>http://struts.apache.org/tags-bean</uri>
<uri>/WEB-INF/tlds/struts-bean.tld</uri>
<tag>
<name>cookie</name>
<tagclass>org.apache.struts.taglib.bean.CookieTag</tagclass>
/branches/v3/impl/conf/WEB-INF/web.xml
582,6 → 582,9
 
<!--TLDS-->
<jsp-config>
 
 
 
<taglib>
<taglib-uri>/WEB-INF/tlds/jomm.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/jomm.tld</taglib-location>
/branches/v3/impl/src/java/jomm/utils/FilesUtils.java
1,6 → 1,11
package jomm.utils;
 
import org.apache.log4j.Logger;
 
import java.io.*;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLDecoder;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.util.zip.ZipEntry;
14,8 → 19,11
*/
public class FilesUtils
{
private static final Logger logger = Logger.getLogger(FilesUtils.class);
 
public static String getExtension(String filename)
{
 
String extension = "";
if(filename == null)
return extension;
230,6 → 238,47
return false;
}
 
/**
* Relative path without /
* @param path
* @return
*/
public static File getFileFromRelativeContextClassLoaderPath(String path)
{
File f;
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
 
URL fileUrl = classLoader.getResource(path);
 
 
try {
try {
f = new File(fileUrl.toURI());
System.out.println(f.toString());
System.out.println(f.getAbsolutePath());
return f;
} catch (URISyntaxException ex) {
logger.error(ex,ex);
return null;
} catch (IllegalArgumentException ex) {
 
 
try {
System.out.println("Decoding from fileUrl.getFile");
f = new File(URLDecoder.decode(fileUrl.getFile(), "UTF-8"));
System.out.println(f.getAbsolutePath());
return f;
} catch (Exception ex2) {
logger.error(ex2,ex2);
}
}
}catch (Throwable e) {
throw new IllegalArgumentException("The properties file "
+ fileUrl.toExternalForm() + " could not be loaded.", e);
}
return null;
}
 
public static void main(String[] args) throws Exception {
System.out.println(getMD5Checksum(new File("/Volumes/Home/jorgemachado/Documents/FileZilla_3.24.0_macosx-x86.app.tar.bz2")));
 
/branches/v3/impl/src/java/jomm/utils/PdfUtils.java
57,7 → 57,9
private static Map<String, Templates> templates = new Hashtable<String, Templates>();
 
private static Transformer getTransformer(String xsltFile, boolean cache) throws TransformerConfigurationException, IOException {
Templates tpl = null;
if(xsltFile.startsWith("/"))
xsltFile = xsltFile.substring(1);
Templates tpl = null;
if (cache)
tpl = templates.get(xsltFile);
if (tpl == null) {
67,7 → 69,19
if(xsltFile.indexOf("http://")>=0 || xsltFile.indexOf("ftp://")>=0 || xsltFile.indexOf("https://")>= 0)
xsltSource = new StreamSource(new File(url.getPath()));
else
xsltSource = new StreamSource(new File( url.getPath().replace("%20"," ")));
 
 
{
//PRIMEIRA VERSAO QUE FUNCIONA NO TOMCAT
//BASTA MUDAR AQUI AS CHAMADAS ESTAO BEM
//xsltSource = new StreamSource(new File( url.getPath().replace("%20"," ")));
System.out.println(xsltFile);
//xsltSource = new StreamSource(PdfUtils.class.getResourceAsStream(xsltFile));
//É necessário o caminho como um ficheiro para poder haver includes entre XSL's
//if(xsltFile.startsWith("/"))
// xsltFile = xsltFile.substring(1);
xsltSource = new StreamSource(FilesUtils.getFileFromRelativeContextClassLoaderPath(xsltFile));
}
tpl = transFact.newTemplates(xsltSource);
templates.put(xsltFile, tpl);
}
/branches/v3/impl/src/java/pt/estgp/estgweb/services/courseunits/CreateCourseUnitXML.java
304,7 → 304,7
FileOutputStream out = new FileOutputStream(path);
Map<String,Object> params = new HashMap<String,Object>();
params.put("site", Globals.SITE_URL);
PdfUtils.createPdfFromXml(new DOMSource(dd), "pt/estgp/estgweb/services/courseunits/courseunitsummaries.fo.xsl", out, params);
PdfUtils.createPdfFromXml(new DOMSource(dd), "/pt/estgp/estgweb/services/courseunits/courseunitsummaries.fo.xsl", out, params);
out.flush();
out.close();
return path;
/branches/v3/impl/src/java/pt/estgp/estgweb/domain/CourseUnitProgramImpl.java
869,7 → 869,7
// FileOutputStream teste = new FileOutputStream(path);
// Map<String,Object> params = new HashMap<String,Object>();
// params.put("site", Globals.SITE_URL);
// PdfUtils.createPdfFromXml(new DOMSource(Dom4jUtil.toW3c(responseDoc)), "pt/estgp/estgweb/services/courseunits/courseunitprogram.fo.xsl", teste,params);
// PdfUtils.createPdfFromXml(new DOMSource(Dom4jUtil.toW3c(responseDoc)), "/pt/estgp/estgweb/services/courseunits/courseunitprogram.fo.xsl", teste,params);
// teste.flush();
// teste.close();
//
/branches/v3/impl/src/java/pt/estgp/estgweb/domain/utils/ReloadablePropertyMessageResources.java
7,6 → 7,7
import java.io.File;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.Locale;
import java.util.concurrent.ConcurrentHashMap;
 
202,10 → 203,24
}
 
try {
f = new File(fileUrl.toURI());
} catch (URISyntaxException e) {
throw new IllegalArgumentException("The properties file "
+ fileUrl.toExternalForm() + " could not be loaded.", e);
try {
f = new File(fileUrl.toURI());
} catch (URISyntaxException ex) {
logger.error(ex,ex);
} catch (IllegalArgumentException ex) {
 
 
try {
System.out.println("Decoding from fileUrl.getFile");
f = new File(URLDecoder.decode(fileUrl.getFile(), "UTF-8"));
System.out.println(f.getAbsolutePath());
} catch (Exception ex2) {
logger.error(ex2,ex2);
}
}
}catch (Throwable e) {
throw new IllegalArgumentException("The properties file "
+ fileUrl.toExternalForm() + " could not be loaded.", e);
}
fileMap.putIfAbsent(filename, f);
}
/branches/v3/impl/src/web/layout/themes/estg/footer.jsp
126,7 → 126,7
<footer class="footer">
 
<p class="text-muted">Copyright © <a href="http://www.estgp.pt">ESTG</a>.</p>
<p class="text-muted">Powered by BACO v3 - 2016.</p>
<p class="text-muted">Powered by BACO v4 - 2017.</p>
 
</footer>
 
/branches/v3/impl/src/web/layout/themes/estg/headerPublicNew.jsp
1,6 → 1,6
<%@ page import="pt.estgp.estgweb.utils.Globals" %>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
/branches/v3/impl/src/web/layout/themes/ipp/footer.jsp
10,7 → 10,7
 
<footer class="footer">
<div class="container">
<p class="text-muted">Powered by plataforma IPP-PAE - 2016</b>.</p>
<p class="text-muted">Powered by plataforma IPP-PAE - 2017</b>.</p>
</div>
</footer>
 
/branches/v3/impl/build.xml
391,11 → 391,11
 
<target name="war" depends="build.war">
<delete file="${dist.dir}/${tomcat.war.file}"/>
<jar destfile="${dist.dir}/${tomcat.war.file}">
<war destfile="${dist.dir}/${tomcat.war.file}">
<fileset dir="${build.dir.war}">
<include name="**/*" />
</fileset>
</jar>
</war>
</target>
 
<target name="war.jasper" depends="build.war,jasper">