Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 54 → Rev 55

/impl/conf/app.properties
97,6 → 97,12
url.stat.ignore.extension.8=.swf
 
url.stat.ignore.prefix.1=/urlstat
url.stat.ignore.prefix.2=/public/
url.stat.ignore.prefix.3=/admin/
url.stat.ignore.prefix.4=/user/
url.stat.ignore.prefix.5=/css/
url.stat.ignore.prefix.6=/js/
url.stat.ignore.prefix.7=/auth/
 
#See java.text.SimpleDateFormat
urlstat.chart.week.days=EEE dd-MMM
/impl/src/java/pt/estgp/estgweb/services/urlstat/UrlStatService.java
39,7 → 39,7
{
String relativePath = entry.getKey();
UrlStatFilter.IntegerContainer ic = entry.getValue();
 
UrlStatImpl urlStat = (UrlStatImpl) DaoFactory.getUrlStatDaoImpl().loadOrNullLockUpgrade(relativePath);
if(urlStat == null)
{
/impl/src/java/pt/estgp/estgweb/services/urlstat/ChartBuilderService.java
105,7 → 105,7
 
private String build(HttpServletRequest request, String messageTitle, List<String> relativePaths, Date startDate, Date endDate,ChartTypeEnum type)
{
String location = linkToFileName(relativePaths,startDate,endDate,type.getScale());
String location = linkToFileNameEncode(relativePaths,startDate,endDate,type.getScale(),true);
File img = new File(Globals.TMP_DIR + location);
if(img.exists() && ((System.currentTimeMillis() - img.lastModified()) < LINK_CHART_EXPIRE_INTERVAL))
{
195,7 → 195,7
String dates = sp.format(startDate) + "_UNTIL_" + sp.format(endDate) + "_" + seriesScaleEnum.getType();
String path;
if(encode)
path = URIUtil.encodeAll(relativePathName.replaceAll("/","_"),"ISO-8859-1");
path = URIUtil.encodePath(relativePathName.replaceAll("/","_"),"ISO-8859-1");
else
path = relativePathName.replaceAll("/","_");
return LINK_CHART_TMP_DIR + "/" + path + "_" + dates + ".png";
219,7 → 219,7
// UrlStatService.main(null);
AbstractDao.getCurrentSession().beginTransaction();
List<String> relativePaths = new ArrayList<String>();
relativePaths.add("/Welcome.do");
relativePaths.add("/public/announcements/getFlashNews.jsp?sid=0.9998549583612295");
// relativePaths.add("/teste2");
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.weekDays));
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.monthDays));