Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1 → Rev 29

/log.txt
New file
0,0 → 1,5
Estão feitos os templates base para o pedro começar a fazer as paginas á vontade.
Foi criado dois tipos diferentes de templates:
 
*templatePortal-template mais especifico para as páginas que vão ter listas de links para outras páginas
*templatePage-template genérico com o qual o pedro têm vários objectos para poder contruir grande parte dos sites da escola
/impl/estgweb.iml
File deleted
/impl/estgweb.iws
File deleted
/impl/local.properties
File deleted
/impl/estgweb.ipr
File deleted
/impl/conf/language/MessageResourcesUrlStat.properties
New file
0,0 → 1,23
################################################################################
#
# Link Analysis MESSAGE RESOURCES
#
################################################################################
#chart messages
url.stat.series.title=Acessos
url.stat.access.clicks=Número Acessos
url.stat.days=Dias
 
#chart type
urlstat.chart.week.days=Acessos nos últimos 7 dias
urlstat.chart.month.days=Acessos nos últimos 30 dias
urlstat.chart.trimestre.days=Acessos nos últimos 90 dias
urlstat.chart.semestre.days=Acessos nos últimos 175 dias
urlstat.chart.year.days=Accessos nos últimos 365 dias
urlstat.chart.trimestre.months=Acessos nos últimos 3 meses
urlstat.chart.semestre.months=Acessos nos últimos 6 meses
urlstat.chart.year.months=Accessos nos últimos 12 meses
urlstat.chart.two.years.months=Acessos nos últimos 24 meses
 
#web
url.stat.page=Estísticas de acesso a este sítio
/impl/conf/language/MessageResources.properties
86,7 → 86,6
 
 
#Menus
 
site.title=Escola Superior de Tecnologia e Gestão
administration=Administração
superuser=Super Utilizador
96,10 → 95,12
logout=Sair
submit.announcement=Colocar Anúncio
services=Serviços
announcements=Anúncios
announcements=Ultimas Notícias
courses=Cursos
mainAnnouncements=Destaques
staff.header=Informação para funcionários docentes e não docentes
staff=Docentes
 
 
#Mensagens Status
authentication.ok=Benvindo Fulano
logout.ok=Caro {0}, obrigado por usar o nosso serviço.
112,9 → 113,9
 
 
#Cursos
 
course.aa=Acessoria e Administração
 
 
 
 
 
/impl/conf/WEB-INF/struts/tiles-events.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd">
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
/impl/conf/WEB-INF/struts/struts-courseunits.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<!--<!DOCTYPE struts-config PUBLIC-->
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"-->
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">-->
 
<struts-config>
 
/impl/conf/WEB-INF/struts/struts-default.xml
41,6 → 41,7
<action path="/Welcome" forward="page.welcome"/>
<action path="/StartAuthentication" forward="page.authentication"/>
<action path="/Logout" forward="/authenticate.do?dispatch=logout"/>
<action path="/StaffPage" forward="page.staff"/>
 
<!-- Errors -->
<action path="/errorNoCookies" forward="page.no.cookies"/>
95,7 → 96,8
/WEB-INF/struts/tiles-events.xml,
/WEB-INF/struts/tiles-ftpclient.xml,
/WEB-INF/struts/tiles-processworkflow.xml,
/WEB-INF/struts/tiles-searchusers.xml"/>
/WEB-INF/struts/tiles-searchusers.xml,
/WEB-INF/struts/tiles-urlstat.xml"/>
</plug-in>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
/impl/conf/WEB-INF/struts/tiles-processworkflow.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd">
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
/impl/conf/WEB-INF/struts/struts-searchusers.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<!--<!DOCTYPE struts-config PUBLIC-->
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"-->
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">-->
 
<struts-config>
 
/impl/conf/WEB-INF/struts/validation.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">
<!--<!DOCTYPE form-validation PUBLIC-->
<!--"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"-->
<!--"http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">-->
 
 
<form-validation>
/impl/conf/WEB-INF/struts/struts-banners.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<!--<!DOCTYPE struts-config PUBLIC-->
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"-->
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">-->
 
<struts-config>
 
/impl/conf/WEB-INF/struts/struts-ftpclient.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<!--<!DOCTYPE struts-config PUBLIC-->
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"-->
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">-->
 
<struts-config>
 
/impl/conf/WEB-INF/struts/tiles-announcements.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd">
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
/impl/conf/WEB-INF/struts/struts-urlstat.xml
New file
0,0 → 1,30
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
 
<struts-config>
 
<form-beans>
<form-bean type="pt.estgp.estgweb.web.form.urlstat.UrlStatForm" name="UrlStatForm"/>
</form-beans>
 
<global-exceptions>
 
</global-exceptions>
 
<global-forwards>
 
</global-forwards>
 
 
<action-mappings>
<action path="/urlstat/startUrlStat" forward="page.urlstat"/>
<action path="/urlstat/urlStat"
scope="request"
type="pt.estgp.estgweb.web.controllers.urlstat.UrlStatController"
name="UrlStatForm">
</action>
</action-mappings>
</struts-config>
/impl/conf/WEB-INF/struts/tiles-courseunits.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd">
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
/impl/conf/WEB-INF/struts/tiles-default.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd">
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
14,7 → 14,7
<put name="header" value="/layout/header.jsp"/>
<put name="topnav" value="/layout/topnavempty.jsp" />
<put name="footer" value="/layout/footer.jsp" />
<put name="navigationMenu" value="/layout/navigationMenu.jsp"/>
<put name="navigationTop" value="/layout/navigationTop.jsp"/>
</definition>
 
<definition name="base.simple.definition" path="/layout/siteSimpleLayout.jsp">
101,7 → 101,12
<put name="title" value="ESTG" />
<put name="body" value="/public/index.jsp" />
</definition>
<definition name="page.staff" extends="base.layout1">
<put name="title" value="ESTG" />
<put name="body" value="/public/staff/index.jsp" />
</definition>
 
 
<!-- Autenticacao -->
<definition name="page.authentication" extends="base.layout1">
<put name="title" value="Authentication" />
/impl/conf/WEB-INF/struts/tiles-searchusers.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd">
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
/impl/conf/WEB-INF/struts/struts-events.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<!--<!DOCTYPE struts-config PUBLIC-->
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"-->
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">-->
 
<struts-config>
 
/impl/conf/WEB-INF/struts/tiles-banners.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd">
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
/impl/conf/WEB-INF/struts/tiles-ftpclient.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8" ?>
 
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://struts.apache.org/dtds/tiles-config_1_1.dtd">
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
/impl/conf/WEB-INF/struts/struts-processworkflow.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<!--<!DOCTYPE struts-config PUBLIC-->
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"-->
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">-->
 
<struts-config>
 
/impl/conf/WEB-INF/struts/tiles-urlstat.xml
New file
0,0 → 1,14
<?xml version="1.0" encoding="UTF-8" ?>
 
<!--<!DOCTYPE tiles-definitions PUBLIC-->
<!--"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"-->
<!--"http://struts.apache.org/dtds/tiles-config_1_1.dtd">-->
 
<tiles-definitions>
 
<definition name="page.urlstat" extends="base.layout1">
<put name="body" value="/public/urlstat/index.jsp"/>
</definition>
 
</tiles-definitions>
/impl/conf/WEB-INF/struts/validator-rules.xml
1,6 → 1,6
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
<!--<!DOCTYPE form-validation PUBLIC-->
<!--"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"-->
<!--"http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">-->
<!--
 
This file contains the default Struts Validator pluggable validator
/impl/conf/WEB-INF/struts/struts-announcements.xml
1,8 → 1,8
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<!--<!DOCTYPE struts-config PUBLIC-->
<!--"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"-->
<!--"http://struts.apache.org/dtds/struts-config_1_3.dtd">-->
 
<struts-config>
 
/impl/conf/WEB-INF/tlds/estgweb.tld
30,4 → 30,50
<name>isAdmin</name>
<tagclass>pt.estgp.estgweb.web.tags.IsAdminTag</tagclass>
</tag>
<tag>
<name>isAdmin</name>
<tagclass>pt.estgp.estgweb.web.tags.IsAdminTag</tagclass>
</tag>
<tag>
<name>pageUrlStat</name>
<tagclass>pt.estgp.estgweb.web.tags.PageUrlStatTag</tagclass>
<attribute>
<name>attributes</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<name>chartPageUrlStat</name>
<tagclass>pt.estgp.estgweb.web.tags.ChartPageUrlStatTag</tagclass>
<attribute>
<name>chartType</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>altKey</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>attributes</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<!--<tag>-->
<!--<name>urlStat</name>-->
<!--<tagclass>pt.estgp.estgweb.web.tags.UrlStatTag</tagclass>-->
<!--<attribute>-->
<!--<name>url</name>-->
<!--<required>true</required>-->
<!--<rtexprvalue>true</rtexprvalue>-->
<!--</attribute>-->
<!--<attribute>-->
<!--<name>attributes</name>-->
<!--<required>false</required>-->
<!--<rtexprvalue>false</rtexprvalue>-->
<!--</attribute>-->
<!--</tag>-->
</taglib>
/impl/conf/WEB-INF/web.xml
25,11 → 25,19
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter>
<filter-name>UrlStatFilter</filter-name>
<filter-class>pt.estgp.estgweb.web.filters.UrlStatFilter</filter-class>
</filter>
<filter>
<filter-name>RelativePathFilter</filter-name>
<filter-class>pt.estgp.estgweb.web.filters.RelativePathFilter</filter-class>
</filter>
 
<filter-mapping>
<filter-name>Set-Character-Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
 
<filter-mapping>
<filter-name>UserSessionFilter</filter-name>
<url-pattern>/*</url-pattern>
38,10 → 46,18
<filter-name>UserFilter</filter-name>
<url-pattern>/user/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>RelativePathFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--<filter-mapping>-->
<!--<filter-name>AdminFilter</filter-name>-->
<!--<url-pattern>/admin/*</url-pattern>-->
<!--<filter-name>UrlStatFilter</filter-name>-->
<!--<url-pattern>/*</url-pattern>-->
<!--</filter-mapping>-->
<filter-mapping>
<filter-name>AdminFilter</filter-name>
<url-pattern>/admin/*</url-pattern>
</filter-mapping>
<!---->
<!--SERVLETS-->
<servlet>
57,7 → 73,8
/WEB-INF/struts/struts-events.xml,
/WEB-INF/struts/struts-ftpclient.xml,
/WEB-INF/struts/struts-processworkflow.xml,
/WEB-INF/struts/struts-searchusers.xml
/WEB-INF/struts/struts-searchusers.xml,
/WEB-INF/struts/struts-urlstat.xml
</param-value>
</init-param>
<init-param>
78,18 → 95,22
<servlet-name>WebProxy</servlet-name>
<servlet-class>pt.estgp.estgweb.web.WebProxy</servlet-class>
</servlet>
<!--<servlet>-->
<!--<servlet-name>HTTPProxy</servlet-name>-->
<!--<servlet-class>pt.estgp.estgweb.web.TmpStream</servlet-class>-->
<!--</servlet>-->
<!--<servlet>-->
<!--<servlet-name>FTPProxy</servlet-name>-->
<!--<servlet-class>pt.estgp.estgweb.web.FTPProxy</servlet-class>-->
<!--</servlet>-->
<servlet>
<servlet-name>HTTPProxy</servlet-name>
<servlet-class>pt.estgp.estgweb.web.HTTPProxy</servlet-class>
<servlet-name>LayoutProxy</servlet-name>
<servlet-class>pt.estgp.estgweb.web.LayoutProxy</servlet-class>
</servlet>
<servlet>
<servlet-name>FTPProxy</servlet-name>
<servlet-class>pt.estgp.estgweb.web.FTPProxy</servlet-class>
<servlet-name>tmpStream</servlet-name>
<servlet-class>pt.estgp.estgweb.web.TmpStream</servlet-class>
</servlet>
<servlet>
<servlet-name>LayoutProxy</servlet-name>
<servlet-class>pt.estgp.estgweb.web.LayoutProxy</servlet-class>
</servlet>
 
<!--MAPPINGS-->
<servlet-mapping>
100,18 → 121,22
<servlet-name>WebProxy</servlet-name>
<url-pattern>/WebProxy</url-pattern>
</servlet-mapping>
<!--<servlet-mapping>-->
<!--<servlet-name>HTTPProxy</servlet-name>-->
<!--<url-pattern>/HTTPProxy</url-pattern>-->
<!--</servlet-mapping>-->
<!--<servlet-mapping>-->
<!--<servlet-name>FTPProxy</servlet-name>-->
<!--<url-pattern>/FTPProxy</url-pattern>-->
<!--</servlet-mapping>-->
<servlet-mapping>
<servlet-name>HTTPProxy</servlet-name>
<url-pattern>/HTTPProxy</url-pattern>
<servlet-name>LayoutProxy</servlet-name>
<url-pattern>/proxy/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>FTPProxy</servlet-name>
<url-pattern>/FTPProxy</url-pattern>
<servlet-name>tmpStream</servlet-name>
<url-pattern>/tmpStream/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LayoutProxy</servlet-name>
<url-pattern>/proxy/*</url-pattern>
</servlet-mapping>
 
<!--START FILES-->
<welcome-file-list>
162,7 → 187,6
 
<!--TLDS-->
<jsp-config>
 
<taglib>
<taglib-uri>/WEB-INF/jomm.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/jomm.tld</taglib-location>
/impl/conf/mime.types
New file
0,0 → 1,439
# File extension -> MIME type map.
# MIME type Extension
#
# Text version here <mime.types>
#
# Generated by gvim <gvimrc.html> :runtime syntax/2html.vim
#
 
application/activexdocument vbd
application/andrew-inset ez
application/applefile
application/astound asd asn asz
application/atomicmail
application/batch-SMTP
application/beep+xml
application/cprplayer pqi
application/datawindow psr
application/dca-rft
application/dec-dx
application/dsptype tsp
application/dvcs
application/fastman lcc
application/fml fml ofml
application/font-tdpfr pfr # TrueDoc Portable Font Resource
application/freeloader frl
application/ghostview
application/hep hep # Hummingbird Host Explorer Profiles
application/http
application/hyperstudio stk
application/listenup ptlk
application/lit lit
application/lotus-123 123 wk wks # Lotus 123
application/mac-binhex40 hqx # Macintosh binhexed archives
application/mathematica nb
application/mbedlet mbd
application/mirage mfp
application/msm msm
application/msword doc dot # Microsoft Word
application/n2p n2p
application/octet-stream ani bat com exe dll cur dbf sjf # Binary File
application/octet-stream-bin seq
application/oda oda
application/olescript axs
application/pagemaker pm5 pt5 # PageMaker
application/parityfec
application/pcphoto zpa
application/pdf pdf # Adobe Acrobat
application/pkcs10
application/pkcs7-mime
application/pkcs7-signature
application/pkix-cert
application/pkix-crl
application/pkixcmp
application/postscript ai eps ps # Postscript File
application/presentations shw
application/quest qrt
application/remote-printing
application/riscos
application/rtc rtc
application/sgml-open-catalog cat
application/sieve
application/slate
application/smil smi smil sml
application/studiom smp
application/tajima dst
application/talker talk
application/timbuktu tbt
application/toolbook tbk # Toolbook
application/vemmi
application/vnd.cups-postscript
application/vnd.cups-raster
application/vnd.cups-raw
application/vnd.hp-HPGL
application/vnd.hp-PCL pcl
application/vnd.hp-PCLXL
application/vnd.mif mi mif
application/vnd.mozilla.xul+xml
application/vnd.ms-access mda mdb mde mdf # MS Access
application/vnd.ms-excel xla xlb xlc xlm xls xlt xlw # Microsoft Excel
application/vnd.ms-powerpoint pot pps ppt ppz # Microsoft PowerPoint Slideshow
application/vnd.ms-project mpc mpt mpx mpw mpp # MS Project
application/vnd.ms-tnef
application/vnd.ms-works
application/vnd.palm
application/vnd.powerbuilder6 pbd
application/vnd.powerbuilder6-s
application/vnd.powerbuilder7
application/vnd.powerbuilder7-s
application/vnd.powerbuilder75
application/vnd.powerbuilder75-s
application/vnd.stardivision.calc sdc
application/vnd.stardivision.chart sds
application/vnd.stardivision.draw sda
application/vnd.stardivision.impress sdd
application/vnd.stardivision.impress-packed sdp
application/vnd.stardivision.mail smd
application/vnd.stardivision.math smf
application/vnd.stardivision.writer sdw vor
application/vnd.stardivision.writer-global sgl
application/vnd.svd
application/vnd.wap.sic
application/vnd.wap.slc
application/vnd.wap.wbxml wbxml
application/vnd.wap.wmlc wmlc
application/vnd.wap.wmlscriptc wmlsc
application/vocaltec-media-desc vmd
application/vocaltec-media-file vmf
application/vpa vpa
application/wordperfect wp # WordPerfect
application/wordperfect5.1 wp5 # WordPerfect Version 5.1
application/wordperfect6.1 wp6 # WordPerfect Version 6.1
application/wordperfectd wpd # WordPerfect
application/x-CorelXARA web xar
application/x-DemoShield wid
application/x-InstallFromTheWeb rrf
application/x-InstallShield wis
application/x-NET-Install ins
application/x-Parable-Thing tmv
application/x-applix aw
application/x-arj arj
application/x-asap asp
application/x-authorware-bin aab
application/x-authorware-map aam aas
application/x-autocad dwg dxf svf
application/x-bcpio bcpio
application/x-bzip2 bz2
application/x-cdlink vcd
application/x-chat chat
application/x-chess-pgn pgn
application/x-cnc cnc
application/x-coda coda page
application/x-compress Z
application/x-connector con
application/x-core
application/x-cpio cpio
application/x-cprplayer pqf
application/x-crossword puz
application/x-csh csh # C-Shell Program
application/x-cu-seeme cu csm
application/x-cult3d-object co
application/x-debian-package deb
application/x-director dcr dir dxr swa # Director File
application/x-dms dms
application/x-doom wad
application/x-dreamcast-vms vms
application/x-dreamcast-vms-info vmi
application/x-dvi dvi # TeX dvi Format
application/x-dwf dwf # AutoCAD
application/x-earthtime etc
application/x-envoy evy
application/x-executable
application/x-expandedbook ebk
application/x-fmr fmr
application/x-font pfa pfb gsf pcf pcf.Z ttf TTF # Font File
application/x-fr fr
application/x-futuresplash spl # Macromedia Flash
application/x-gnumeric gnumeric
application/x-gtar gtar taz tgz tar.gz tar.bz2 # Tar+GZip or BZip2 file
application/x-gzip gz
application/x-hdf hdf # NCSA HDF
application/x-hsp-erf erf
application/x-httpd-imap map
application/x-httpd-php php pht phtml
application/x-httpd-php-source phps
application/x-httpd-php3 php3
application/x-httpd-php3-preprocessed php3p
application/x-httpd-php4 php4
application/x-ica ica # WinFrames
application/x-icq uin
application/x-ipix ipx
application/x-ipscript ips
application/x-java-applet
application/x-java-archive jar
application/x-java-bean
application/x-java-jnlp-file jnlp
application/x-java-serialized-object ser
application/x-java-vm class
application/x-javascript js # Javascript
application/x-kchart chrt
application/x-kdelnk
application/x-killustrator kil
application/x-koan skd skm skp skt
application/x-kpresenter kpr kpt
application/x-kspread ksp
application/x-kword kwd kwt
application/x-latex latex # Latex File
application/x-lha lha
application/x-lzh lzh
application/x-lzx lzx
application/x-macbinary bin
application/x-maker book fb fbdoc fm frame frm maker
application/x-mocha moc mocha
application/x-mpire mpl mpire
application/x-ms-wmd wmd
application/x-ms-wmz wmz
application/x-msaddr adr
application/x-mscardfile crd
application/x-msi msi
application/x-msmediaview m13 m14
application/x-msmoney mny
application/x-mspublisher pub
application/x-msschedule scd
application/x-msterminal trm
application/x-mswallet wlt
application/x-mswrite wri
application/x-net120NM cnf
application/x-netcdf cdf nc
application/x-netfpx npx
application/x-nokia-9000-communicator-add-on-software aos
application/x-ns-proxy-autoconfig pac proxy
application/x-nschat nsc
application/x-object o
application/x-ogg ogg
application/x-oz-application oza
application/x-perl perl pl pm
application/x-pgp-plugin pgp
application/x-pkcs7-crl crl
application/x-quicktimeplayer qtl # Quicktime
application/x-redhat-package-manager rpm
application/x-rx
application/x-salsa slc
application/x-sh sh # Shell Program
application/x-shar shar
application/x-shockwave-flash swf swfl # Macromedia Shockwave file
application/x-sprite spr sprite
application/x-spss sav spp sbs sps spo # SPSS
application/x-stuffit sit # Macintosh Stuff-It
application/x-supercard sca
application/x-sv4cpio sv4cpio
application/x-sv4crc sv4crc
application/x-tar tar # UNIX Tape Archive
application/x-tcl tcl tk # TCL Programming Language
application/x-tex tex ltx sty cls # Tex/LaTeX
application/x-tex-gf gf
application/x-tex-pk pk
application/x-texinfo texi texinfo # TexInfo
application/x-timbuktu tbp
application/x-tkined tki tkined
application/x-tlk tlk
application/x-trash ~ % bak old sik
application/x-troff roff t tr # Troff file
application/x-troff-man man # Troff with MAN macros
application/x-troff-me me # Troff with ME macros
application/x-troff-ms ms # Troff with MS macros
application/x-up-alert alt
application/x-up-cacheop che
application/x-ustar ustar # Ustar file
application/x-wais-source src # WAIS Sources
application/x-wingz wz
application/x-wordpro lwp
application/x-x509-ca-cert cacert crt
application/x-x509-email-cert ecert email
application/x-x509-server-cert scert servercert
application/x-x509-user-cert ucert usercert
application/x-xfig fig
application/x400-bp
application/xhtml+xml xhtml
application/xml xml
application/xml-dtd dtd
application/xml-external-parsed-entity
application/zip zip # ZIP Compressed File
audio/basic au snd voc VOC # Audio Sound File
audio/echospeech es esl
audio/imelody imy
audio/mp4a-latm
audio/mpa-robust
audio/mpeg mp2 mpa mpega mpg mpga # MP2 Sound File
audio/mpeg3 mp3 # MP3 Sound File
audio/mpegurl m3u m3url # MP3 File List
audio/prs.sid sid
audio/tsplayer tsi
audio/voxware vox
audio/x-aiff aif aifc aiff faif # AIFF Sound File
audio/x-dspeech cht dus
audio/x-epac pae
audio/x-gsm gsm gsd
audio/x-midi kar mid midi # MIDI Sound File
audio/x-mod it m15 mod mtm s3m stm ult uni xm
audio/x-ms-wax wax
audio/x-ms-wma wma
audio/x-pn-realaudio ra ram rm # RealAudio Sound File
audio/x-qt-stream stream
audio/x-rmf rmf
audio/x-scpls pls
audio/x-twinvq vqf vql
audio/x-twinvq-plugin vqe
audio/x-wav WAV wav # WAV Sound File
audio/x-wtx wtx
image/bmp bmp
image/cgm cgm
image/cis-cod cod
image/cpi cpi
image/fif fif
image/g3fax
image/gif GIF gif # GIF image file
image/ief ief # Image Exchange
image/ifs ifs
image/jpeg JPEG JPG jpe jpeg jpg # JPG image file
image/naplps
image/pcx PCX pcx
image/png png # Portable Network Graphics
image/rip rip
image/svg+xml svg svgz
image/svh svh
image/tiff TIF TIFF tif tiff # TIFF image file
image/vasa mcf
image/vnd.nok-oplogo-color nokia-op-logo
image/vnd.svf
image/vnd.wap.wbmp wbmp
image/vnd.xiff xif
image/wavelet wi
image/x-clp clp CLP
image/x-cmu-raster ras
image/x-cmx cmx
image/x-coreldraw cdr
image/x-coreldrawpattern pat
image/x-coreldrawtemplate cdt
image/x-corelphotopaint cpt
image/x-djvu djv djvu
image/x-emf emf EMF
image/x-etf etf
image/x-fpx fpx
image/x-freehand fh5 fh4 fhc
image/x-halo-cut cut
image/x-icon ico
image/x-iw44 iw4 iw44
image/x-jng jng
image/x-jps jps
image/x-mgx-dsf dsf
image/x-photo-cd pcd
image/x-portable-anymap pnm
image/x-portable-bitmap pbm
image/x-portable-graymap pgm
image/x-portable-pixmap ppm
image/x-quicktime qti
image/x-rgb rgb # RGB Image File
image/x-rush uff
image/x-wmf wmf W32 MetaFile
image/x-xbitmap xbm # X-bitmap Image File
image/x-xpixmap xpm # X-pixmap Image File
image/x-xwindowdump xwd
inode/blockdevice
inode/chardevice
inode/directory
inode/directory-locked
inode/fifo
inode/socket
message/delivery-status
message/disposition-notification
message/external-body
message/http
message/news
message/partial
message/rfc822
message/s-http
multipart/alternative
multipart/byteranges
multipart/digest
multipart/encrypted
multipart/form-data
multipart/header-set
multipart/mixed dig
multipart/parallel
multipart/related
multipart/report
multipart/signed
multipart/voice-message
multipart/x-mixed-replace push
plugin/wanimate wan waf
text/ccs ccs
text/comma-separated-values csv
text/css css # Cascading Style Sheet
text/directory
text/dss dss
text/enriched
text/html HTM HTML htm html # HTML Document
text/lsp lsp
text/mathml mml
text/parsnegar-document pgr
text/plain TXT asc cgi diff text txt # Plain Text File
text/rfc822-headers
text/richtext rtx # Rich Text File
text/rtf rtf # Rich Text Format
text/tab-separated-values tsv
text/vnd.wap.wml wml
text/vnd.wap.wmlscript wmls
text/x-c++hdr h++ hpp hxx hh
text/x-c++src c++ cpp cxx cc
text/x-chdr h
text/x-crontab
text/x-csrc c
text/x-hdml hdml
text/x-java java
text/x-makefile
text/x-pascal p pas
text/x-server-parsed-html shtml
text/x-setext etx
text/x-sgml sgm sgml # SGML Document
text/x-speech spc
text/x-vcalendar vcs
text/x-vcard vcf
text/x-vmel mel
text/xml xml xsl
text/xml-external-parsed-entity
urdu/urdu98 u98
video/animaflex afl
video/gl gl
video/isivideo fvi
video/mp4v-es
video/mpeg MPEG MPG mpe mpeg mpg # MPEG Movie File
video/quicktime mov qt # Quicktime Movie File
video/vnd.mpegurl mxu
video/vnd.vivo viv vivo
video/wavelet wv
video/x-anim anim anim5 anim3 anim7
video/x-dl dl
video/x-flc flc
video/x-fli fli
video/x-iff iff
video/x-mng mng
video/x-mpeg2
video/x-ms-asf asf asx # Windows Media File
video/x-ms-wm wm
video/x-ms-wmv wmv
video/x-ms-wmx wmx
video/x-ms-wvx wvx
video/x-msvideo avi vob # AVI Movie File
video/x-rad-screenplay avx
video/x-sgi-movie movi movie mv # SGI Movie File
video/x-sunvideo vcr
video/x-videogram vgm vgx xdr
video/x-videogram-plugin vgp
workbook/formulaone vts vtts
x-conference/x-cooltalk ice
x-world/x-3dmf 3dmf 3dm qd3d qd3
x-world/x-svr svr
x-world/x-vrml vrm vrml wrl wrz
x-world/x-vrt vrt
 
/impl/conf/app.properties
1,18 → 1,26
 
tmp.dir=@tmp.dir@
use.ldap=false
system.language=pt
#Session Settings
user.session.timeout.minutes=15
 
email.server=mail.estgp.pt
email.user=
email.password=
email.from=jmachado@estgp.pt
email.templates.dir=@email.templates.dir@
##################################################
##Proxy Servers
#If is an HTTP Server needs encoding config if FTP needs user pass config
server.ionline=ftp://www.global.estgp.pt
 
ionline.pass=baco
ionline.user=Baco_web
 
server.estgp=http://www.estgp.pt
server.estgp=http://www.estgp.pt/testes/nova_web
estgp.encoding=UTF-8
 
 
#Kinds of roles
################################################
## Kinds of roles
user.admin=admin
user.super=all
user.role.0=all
33,29 → 41,56
user.role.15=erasmusCouncil
user.role.16=courseCoordinator
 
######################################################
#########################################################################
#
# Modules
#
######################################################
#########################################################################
 
###############
#########################################################################
# Announcements
#
 
announcements.automatic.validation.role.1=all
announcements.automatic.validation.role.2=admin
announcements.automatic.validation.role.3=ci
announcements.automatic.validation.role.4=administrativeCouncil
 
announcements.max.visible=5
announcements.max.visible=10
 
announcements.type.0=news
announcements.type.1=top.flash.news
announcements.type.2=bottom.flash.news
 
#########################################################################
# Link Analysis
#
url.stat.tmp.dir=/linkchart
url.stat.image.expire.interval.time.minutes=15
 
url.stat.ignore.extension.1=.js
url.stat.ignore.extension.2=.css
url.stat.ignore.extension.3=.jpg
url.stat.ignore.extension.4=.gif
url.stat.ignore.extension.5=.png
url.stat.ignore.extension.6=.tif
url.stat.ignore.extension.7=.bmp
url.stat.ignore.extension.8=.swf
 
url.stat.ignore.prefix.1=/urlstat
 
#See java.text.SimpleDateFormat
urlstat.chart.week.days=EEE dd-MMM
urlstat.chart.month.days=EEE dd-MMM
urlstat.chart.trimestre.days=dd-MMM-yy
urlstat.chart.semestre.days=MMM-yy
urlstat.chart.year.days=MMM-yy
urlstat.chart.trimestre.months=MMM-yy
urlstat.chart.semestre.months=MMM-yy
urlstat.chart.year.months=MMM-yy
urlstat.chart.two.years.months=MMM-yy
 
 
 
 
 
 
/impl/conf/template/email/sendPageFriend_pt.txt
New file
0,0 → 1,13
#Email to send to a friend
Olá caro amigo
 
O Seu amigo {0} sugere-lhe que visite este sítio em linha
 
{1}
 
Com os Melhores cumprimentos
 
---------------------------------------------
Escola Superior de Tecnologia e Gestão
Instituto Politécnico de Portalegre
http://www.estgp.pt
/impl/conf/template/email/sendPageFriend_en.txt
New file
0,0 → 1,13
#Email to send to a friend
Dear friend
 
Your friend {0} suggest to visit our web site
 
{1}
 
Best Regards
 
---------------------------------------------
Escola Superior de Tecnologia e Gestão
Instituto Politécnico de Portalegre
http://www.estgp.pt
/impl/conf/berserk/sd.xml
1,126 → 1,147
<serviceDefinitions>
<!--Users-->
<service>
<name>Authenticate</name>
<implementationClass>pt.estgp.estgweb.services.authenticate.AuthenticateService</implementationClass>
<description>Authenticates a User</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
</filterChains>
</service>
<name>Authenticate</name>
<implementationClass>pt.estgp.estgweb.services.authenticate.AuthenticateService</implementationClass>
<description>Authenticates a User</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
</filterChains>
</service>
<service>
<name>Logout</name>
<implementationClass>pt.estgp.estgweb.services.authenticate.LogoutService</implementationClass>
<description>Logout a User</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
</filterChains>
</service>
<name>Logout</name>
<implementationClass>pt.estgp.estgweb.services.authenticate.LogoutService</implementationClass>
<description>Logout a User</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
</filterChains>
</service>
<service>
<name>CreateUser</name>
<implementationClass>pt.estgp.estgweb.services.users.CreateUserService</implementationClass>
<description>Create an User</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<name>CreateUser</name>
<implementationClass>pt.estgp.estgweb.services.users.CreateUserService</implementationClass>
<description>Create an User</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
</filterChains>
</service>
</service>
<service>
<name>LoadUserSession</name>
<implementationClass>pt.estgp.estgweb.services.users.LoadUserSessionService</implementationClass>
<description>Load an User Session</description>
<isTransactional>true</isTransactional>
<name>LoadUserSession</name>
<implementationClass>pt.estgp.estgweb.services.users.LoadUserSessionService</implementationClass>
<description>Load an User Session</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
</filterChains>
</service>
<service>
<name>UpdateUserSession</name>
<implementationClass>pt.estgp.estgweb.services.users.UpdateUserSessionService</implementationClass>
<description>Load an User Session</description>
<isTransactional>true</isTransactional>
<name>UpdateUserSession</name>
<implementationClass>pt.estgp.estgweb.services.users.UpdateUserSessionService</implementationClass>
<description>Load an User Session</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
</filterChains>
</service>
 
 
<!--URL Statistics-->
<service>
<name>UpdateUrlStatistics</name>
<implementationClass>pt.estgp.estgweb.services.urlstat.UrlStatService</implementationClass>
<description>Update URL clicks count</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
</filterChains>
</service>
<service>
<name>BuildChartGetPath</name>
<implementationClass>pt.estgp.estgweb.services.urlstat.ChartBuilderService</implementationClass>
<description>Creates a chart for a given list of relativepaths and return relativeTmpPath</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
</filterChains>
</service>
<service>
<name>LoadUrlStatService</name>
<implementationClass>pt.estgp.estgweb.services.urlstat.LoadUrlStatService</implementationClass>
<description>loads a relative URL Stat</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
</filterChains>
</service>
 
 
 
 
<!--Announcements-->
<service>
<name>CreateAnnouncement</name>
<implementationClass>pt.estgp.estgweb.services.announcements.CreateAnnouncementService</implementationClass>
<description>Create an Announcement</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<name>CreateAnnouncement</name>
<implementationClass>pt.estgp.estgweb.services.announcements.CreateAnnouncementService</implementationClass>
<description>Create an Announcement</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<chain name="AuthenticatedUsers"/>
 
 
 
 
 
 
 
 
</filterChains>
</service>
</service>
<service>
<name>EditAnnouncement</name>
<implementationClass>pt.estgp.estgweb.services.announcements.EditAnnouncementService</implementationClass>
<description>Edit an Announcement</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<name>EditAnnouncement</name>
<implementationClass>pt.estgp.estgweb.services.announcements.EditAnnouncementService</implementationClass>
<description>Edit an Announcement</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<!--<chain name="Admins"/>-->
<chain name="OwnersEdit"/>
<!--<chain name="ContextObjectTimer"/>-->
<!--<chain name="ContextStaticTimerExample"/>-->
</filterChains>
</service>
</service>
<service>
<name>LoadAnnouncementView</name>
<implementationClass>pt.estgp.estgweb.services.announcements.LoadAnnouncementService</implementationClass>
<description>Load an Announcement view</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<name>LoadAnnouncementView</name>
<implementationClass>pt.estgp.estgweb.services.announcements.LoadAnnouncementService</implementationClass>
<description>Load an Announcement view</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<!--<chain name="Admins"/>-->
<chain name="TargetRolesAnnouncement"/>
</filterChains>
</service>
</service>
<service>
<name>LoadEditAnnouncement</name>
<implementationClass>pt.estgp.estgweb.services.announcements.LoadAnnouncementService</implementationClass>
<description>Load an Announcement view</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<name>LoadEditAnnouncement</name>
<implementationClass>pt.estgp.estgweb.services.announcements.LoadAnnouncementService</implementationClass>
<description>Load an Announcement view</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<!--<chain name="Admins"/>-->
<chain name="OwnersLoadAnnouncement"/>
</filterChains>
</service>
</service>
<service>
<name>LoadTargetMaxAnnouncements</name>
<implementationClass>pt.estgp.estgweb.services.announcements.LoadTargetMaxAnnouncementsService</implementationClass>
<description>Load an Announcement views to show in list</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
<name>LoadTargetMaxAnnouncements</name>
<implementationClass>pt.estgp.estgweb.services.announcements.LoadTargetMaxAnnouncementsService</implementationClass>
<description>Load an Announcement views to show in list</description>
<isTransactional>true</isTransactional>
<filterChains>
<chain name="Logger"/>
<chain name="Session"/>
</filterChains>
</service>
</service>
 
</serviceDefinitions>
/impl/conf/berserk/fcd.xml
22,7 → 22,7
</filterChain>
<filterChain>
<name>Admins</name>
<expression>AuthenticatedUsers &amp;&amp; RoleUsers("student","admin","all")</expression>
<expression>AuthenticatedUsers &amp;&amp; RoleUsers("admin")</expression>
<description>Admins Control Chain</description>
<invocationTiming>1</invocationTiming>
<filterClass>pt.estgp.estgweb.filters.chains.AdminControlFilter</filterClass>
/impl/src/java/Test.java
File deleted
/impl/src/java/jomm/utils/MessageResources.java
2,6 → 2,8
 
import org.apache.struts.Globals;
import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.MessageResourcesFactory;
import org.apache.log4j.Logger;
 
import javax.servlet.http.HttpServletRequest;
 
11,13 → 13,19
*/
public class MessageResources
{
 
private static final Logger logger = Logger.getLogger(MessageResources.class);
private static org.apache.struts.util.MessageResources instance;
public static org.apache.struts.util.MessageResources getInstance(HttpServletRequest request)
{
if(instance == null)
instance = (org.apache.struts.util.MessageResources) request.getAttribute(Globals.MESSAGES_KEY);
if(instance == null)
{
logger.warn("Using Test Message Resources");
instance = MessageResourcesFactory.createFactory().createResources("MessageResources");
}
return instance;
}
 
/impl/src/java/jomm/utils/MyCalendar.java
59,11 → 59,11
* @param year the value used to set the YEAR time field in the calendar.
* @param month the value used to set the MONTH time field in the calendar.
* Month value is 0-based. e.g., 0 for January.
* @param date the value used to set the DATE time field in the calendar.
* @param day the value used to set the DATE time field in the calendar.
*/
public MyCalendar(int year, int month, int date)
public MyCalendar(int year, int month, int day)
{
super(year, month, date);
super(year, month - 1, day);
}
 
/**
72,16 → 72,16
* @param year the value used to set the YEAR time field in the calendar.
* @param month the value used to set the MONTH time field in the calendar.
* Month value is 0-based. e.g., 0 for January.
* @param date the value used to set the DATE time field in the calendar.
* @param day the value used to set the DATE time field in the calendar.
* @param hour the value used to set the HOUR_OF_DAY time field
* in the calendar.
* @param minute the value used to set the MINUTE time field
* in the calendar.
*/
public MyCalendar(int year, int month, int date, int hour,
public MyCalendar(int year, int month, int day, int hour,
int minute)
{
super(year, month, date, hour, minute);
super(year, month - 1, day, hour, minute);
}
 
/**
90,7 → 90,7
* @param year the value used to set the YEAR time field in the calendar.
* @param month the value used to set the MONTH time field in the calendar.
* Month value is 0-based. e.g., 0 for January.
* @param date the value used to set the DATE time field in the calendar.
* @param day the value used to set the DATE time field in the calendar.
* @param hour the value used to set the HOUR_OF_DAY time field
* in the calendar.
* @param minute the value used to set the MINUTE time field
98,10 → 98,10
* @param second the value used to set the SECOND time field
* in the calendar.
*/
public MyCalendar(int year, int month, int date, int hour,
public MyCalendar(int year, int month, int day, int hour,
int minute, int second)
{
super(year, month, date, hour, minute, second);
super(year, month - 1, day, hour, minute, second);
}
 
public int getDay()
/impl/src/java/jomm/utils/DatesUtils.java
New file
0,0 → 1,61
package jomm.utils;
 
import java.util.Date;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 15:04:18
* @see jomm.utils
*/
public class DatesUtils
{
 
/**
* @param untilYear until Year
* @param untilMonth until Month
* @param untilDay until Day
* @param days to go back
* @return Return the start date calculating the go back days in choosed until date
*/
public static Date getStartDate(int untilYear, int untilMonth, int untilDay, int days)
{
MyCalendar c = new MyCalendar(untilYear,untilMonth, untilDay);
Date endDate = c.getTime();
return new Date(c.getTimeInMillis() - ((long)days * 24 * 60 * 60 * 1000));
}
 
/**
*
* @param untilYear until Year
* @param untilMonth until Month
* @param months to go back
* @return the start date going back m months. The returned date allays is placed in first day of the month
*/
public static Date getStartDate(int untilYear, int untilMonth, int months)
{
MyCalendar c = new MyCalendar(untilYear,untilMonth, 1);
int dif = untilMonth - months;
if(dif == 0)
{
return new MyCalendar(untilYear,1,1).getTime();
}
else if(dif > 0)
{
return new MyCalendar(untilYear,untilMonth-dif,1).getTime();
}
else
{
int div = dif / 12;
int rest = dif % 12;
if(rest < 0)
rest *= -1;
if(div < 0)
div *= -1;
int year = untilYear - 1 - div;
int month = 12 - rest;
return new MyCalendar(year,month,1).getTime();
}
}
 
}
/impl/src/java/jomm/utils/MimeTypeGuesser.java
New file
0,0 → 1,40
package jomm.utils;
 
 
import javax.activation.MimetypesFileTypeMap;
import java.io.File;
 
/**
* @author Jorge Machado
* @date 26/Fev/2008
* @time 12:46:16
* @see jomm.utils
*/
public class MimeTypeGuesser
{
private MimetypesFileTypeMap typeMap;
private static MimeTypeGuesser instance;
 
private MimeTypeGuesser()
{
typeMap = new MimetypesFileTypeMap(Thread.currentThread().getContextClassLoader().getResourceAsStream("/jomm/utils/mime.types"));
}
 
public static synchronized MimeTypeGuesser getInstance()
{
if (instance == null) {
instance = new MimeTypeGuesser();
}
return instance;
}
 
public String guessMimeType(String file)
{
return guessMimeType(new File(file));
}
 
public String guessMimeType(File file)
{
return typeMap.getContentType(file);
}
}
/impl/src/java/jomm/utils/TemplateUtils.java
New file
0,0 → 1,87
package jomm.utils;
 
import pt.estgp.estgweb.utils.*;
 
import java.io.IOException;
import java.io.BufferedReader;
import java.io.StringReader;
import java.io.InputStreamReader;
import java.util.HashMap;
 
import org.apache.log4j.Logger;
 
/**
* @author Jorge Machado
* @date 20/Mar/2008
* @time 18:37:09
* @see jomm.utils
*/
public class TemplateUtils
{
private static final Logger logger = Logger.getLogger(TemplateUtils.class);
 
private static HashMap templates = null;
 
/**
* Check if file content is already in Cache
* See:
*
* #getNoCommentText method
* @param file to get from class loader
* @return file content
*/
public static synchronized String getOrLoadTemplate(String file)
{
if(templates == null)
templates = new HashMap();
 
String temp = (String) templates.get(file);
if(temp == null)
{
try{
temp = getNoCommentText(file);
//temp = temp.
templates.put(file, temp);
}
catch(Exception e)
{
logger.fatal(e);
return null;
}
}
return temp;
 
}
 
/**
* Reads a file from class loader and get all text in UTF-8 ignoring lines starting with #
* @param file to read
* @return a String with file content
* @throws IOException on error opening file
*/
public static String getNoCommentText(String file) throws IOException
{
// Read in template
BufferedReader reader = new BufferedReader(new InputStreamReader(TemplateUtils.class.getResourceAsStream(file),"UTF-8"));
StringBuffer contentBuffer = new StringBuffer();
 
boolean more = true;
 
while (more)
{
String line = reader.readLine();
 
if (line==null)
{
more = false;
}
else if(!line.startsWith("#"))
{
// Add non-comment lines to the content
contentBuffer.append(line);
contentBuffer.append("\n");
}
}
return contentBuffer.toString();
}
}
/impl/src/java/jomm/dao/impl/AbstractDao.java
1,22 → 1,22
package jomm.dao.impl;
 
 
import jomm.dao.DaoException;
import jomm.dao.IDomainObjectDao;
import jomm.dao.utils.HibernateUtils;
import org.hibernate.*;
import org.hibernate.criterion.CriteriaSpecification;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Order;
import static org.hibernate.criterion.Restrictions.eq;
import pt.estgp.estgweb.domain.DomainObject;
 
import java.io.Serializable;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;
import java.sql.SQLException;
 
import jomm.dao.IDomainObjectDao;
import jomm.dao.DaoException;
import jomm.dao.utils.HibernateUtils;
import pt.estgp.estgweb.domain.DomainObject;
 
 
/**
* This class will not be overwritten once it has been created. This is the
* superclass of all DAOs.
281,12 → 281,83
{
return (CLAZZ) getCurrentSession().load(getReferenceClass(), dbKey);
}
catch (HibernateException e) {
catch (HibernateException e)
{
throw new DaoException(e);
}
}
 
/**
* Used by the base DAO classes but here for your modification Load object
* matching the given key and return it.
*
* @SuppressWarnings("unchecked")
*/
public final CLAZZ getOrNull(Serializable dbKey) {
try
{
return (CLAZZ) getCurrentSession().get(getReferenceClass(), dbKey);
}
catch(ObjectNotFoundException e)
{
return null;
}
catch (HibernateException e)
{
throw new DaoException(e);
}
}
 
/**
* Used by the base DAO classes but here for your modification Load object
* matching the given key and return it.
*
* @SuppressWarnings("unchecked")
*/
public final CLAZZ loadOrNull(Serializable dbKey) {
try
{
CLAZZ obj = (CLAZZ) getCurrentSession().load(getReferenceClass(), dbKey);
obj.toString();
return obj;
}
catch(ObjectNotFoundException e)
{
return null;
}
catch (HibernateException e)
{
throw new DaoException(e);
}
}
 
public CLAZZ loadOrNullLockUpgrade(Serializable dbKey)
{
return loadOrNullLockWrite("id",dbKey);
}
/**
* Used by the base DAO classes but here for your modification Load object
* matching the given key and return it.
*
* @SuppressWarnings("unchecked")
*/
public CLAZZ loadOrNullLockWrite(String field, Serializable dbKey)
{
try
{
return (CLAZZ) createCriteria().add(eq(field,dbKey)).uniqueResult();
}
catch(ObjectNotFoundException e)
{
return null;
}
catch (HibernateException e)
{
throw new DaoException(e);
}
}
 
/**
* Remove this instance from the system cache.
*
* <P>Changes to the instance will not be synchronized with the database.
/impl/src/java/jomm/web/utils/TestHttpSession.java
New file
0,0 → 1,116
package jomm.web.utils;
 
 
 
import jomm.utils.BytesUtils;
 
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionContext;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
 
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 11:23:45
* @see jomm.web.utils
*/
public class TestHttpSession implements HttpSession
{
 
private Date start = new Date();
private String id = BytesUtils.generateHexKey();
private Date lastAccess = new Date();
private HashMap attributes = new HashMap();
 
private void updateAccess(){
lastAccess = new Date();
}
 
public long getCreationTime() {
updateAccess();
return start.getTime();
}
 
public String getId() {
updateAccess();
return id;
}
 
public long getLastAccessedTime() {
updateAccess();
return lastAccess.getTime();
}
 
public ServletContext getServletContext() {
updateAccess();
return null;}
 
public void setMaxInactiveInterval(int i) {updateAccess();}
 
public int getMaxInactiveInterval() {updateAccess();return 0;}
 
public HttpSessionContext getSessionContext() {updateAccess();return null;}
 
public Object getAttribute(String s) {
updateAccess();
return attributes.get(s);
}
 
public Object getValue(String s) {
updateAccess();
return getAttribute(s);
}
 
public Enumeration getAttributeNames() {
updateAccess();
return new TestEnumeration(attributes.keySet());
}
 
public String[] getValueNames() {
updateAccess();
String[] values = new String[attributes.size()];
Iterator iter = attributes.entrySet().iterator();
int i = 0;
while (iter.hasNext()) {
Object o = iter.next();
values[i] = o.toString();
i++;
}
return values;
}
 
public void setAttribute(String s, Object o) {
updateAccess();
attributes.put(s,o);
}
 
public void putValue(String s, Object o) {
updateAccess();
attributes.put(s,o);
}
 
public void removeAttribute(String s) {
attributes.remove(s);
}
 
public void removeValue(String s) {
updateAccess();
attributes.remove(s);
}
 
public void invalidate() {
updateAccess();
attributes = new HashMap();
}
 
public boolean isNew() {
updateAccess();
return false;
}
 
}
/impl/src/java/jomm/web/utils/TestEnumeration.java
New file
0,0 → 1,34
package jomm.web.utils;
 
import java.util.Collection;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Enumeration;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 11:24:39
* @see jomm.web.utils
*/
public class TestEnumeration implements Enumeration
{
Collection elements;
Iterator iter;
 
public TestEnumeration(Collection col)
{
elements = new ArrayList(col);
iter = elements.iterator();
}
 
public boolean hasMoreElements()
{
return iter.hasNext();
}
 
public Object nextElement()
{
return iter.next();
}
}
/impl/src/java/jomm/web/utils/TestHttpServletRequest.java
New file
0,0 → 1,256
package jomm.web.utils;
 
import javax.servlet.http.HttpSession;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.ServletInputStream;
import javax.servlet.RequestDispatcher;
import java.util.*;
import java.security.Principal;
import java.io.UnsupportedEncodingException;
import java.io.IOException;
import java.io.BufferedReader;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 11:22:50
* @see jomm.web.utils
*/
public class TestHttpServletRequest implements HttpServletRequest
{
 
private HashMap attributes = new HashMap();
private HashMap parameters = new HashMap();
HttpSession session = new TestHttpSession();
public String getAuthType() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
 
public Cookie[] getCookies() {
return new Cookie[0]; //To change body of implemented methods use File | Settings | File Templates.
}
 
public long getDateHeader(String s) {
return 0; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getHeader(String s) {
return ""; //To change body of implemented methods use File | Settings | File Templates.
}
 
public Enumeration getHeaders(String s) {
return new TestEnumeration(new HashSet()); //To change body of implemented methods use File | Settings | File Templates.
}
 
public Enumeration getHeaderNames() {
return new TestEnumeration(new HashSet()); //To change body of implemented methods use File | Settings | File Templates.
}
 
public int getIntHeader(String s) {
return 0; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getMethod() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getPathInfo() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getPathTranslated() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getContextPath() {
return ""; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getQueryString() {
return ""; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getRemoteUser() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
 
public boolean isUserInRole(String s) {
return false; //To change body of implemented methods use File | Settings | File Templates.
}
 
public Principal getUserPrincipal() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getRequestedSessionId() {
return getSession().getId(); //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getRequestURI() {
return "";
}
 
public StringBuffer getRequestURL() {
return new StringBuffer("");
}
 
public String getServletPath() {
return "";
}
 
public HttpSession getSession(boolean b) {
return session;
}
 
public HttpSession getSession() {
return session;
}
 
public boolean isRequestedSessionIdValid() {
return false;
}
 
public boolean isRequestedSessionIdFromCookie() {
return false;
}
 
public boolean isRequestedSessionIdFromURL() {
return false;
}
 
public boolean isRequestedSessionIdFromUrl() {
return false;
}
 
 
public Object getAttribute(String s) {
return attributes.get(s);
}
 
 
public Enumeration getAttributeNames() {
return new TestEnumeration(attributes.keySet());
}
 
 
public void setAttribute(String s, Object o) {
 
attributes.put(s,o);
}
 
 
public void removeAttribute(String s) {
attributes.remove(s);
}
 
 
 
 
 
public String getCharacterEncoding() {
return "UTF-8";
}
 
public void setCharacterEncoding(String s) throws UnsupportedEncodingException {
 
}
 
public int getContentLength() {
return 0;
}
 
public String getContentType() {
return null;
}
 
public ServletInputStream getInputStream() throws IOException {
return null;
}
 
public String getParameter(String s) {
return (String) parameters.get(s);
}
 
public void setParameter(String key,String value){
parameters.put(key,value);
}
public Enumeration getParameterNames() {
return new TestEnumeration(new HashSet());
}
 
public String[] getParameterValues(String s) {
return new String[0];
}
 
public Map getParameterMap() {
return new HashMap();
}
 
public String getProtocol() {
return null;
}
 
public String getScheme() {
return null;
}
 
public String getServerName() {
return null;
}
 
public int getServerPort() {
return 0;
}
 
public BufferedReader getReader() throws IOException {
return null;
}
 
public String getRemoteAddr() {
return "local";
}
 
public String getRemoteHost() {
return "local";
}
 
 
 
public Locale getLocale()
{
return new Locale("pt");
}
 
public Enumeration getLocales() {
return new TestEnumeration(new HashSet());
}
 
public boolean isSecure() {
return true;
}
 
public RequestDispatcher getRequestDispatcher(String s) {
return null;
}
 
public String getRealPath(String s) {
return "local";
}
 
public int getRemotePort() {
return 0; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getLocalName() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
 
public String getLocalAddr() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
 
public int getLocalPort() {
return 0; //To change body of implemented methods use File | Settings | File Templates.
}
}
/impl/src/java/openldap/Test.java
New file
0,0 → 1,46
package openldap;
 
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import openldap.LdapManagerFactory;
 
public class Test
{
public static void main(String[] args) throws Exception
{
//System.out.println(LdapManagerFactory.getLdapManager().login("a8824","21286"));
HashMap map = LdapManagerFactory.getLdapManager().getUserInfo("a8822");
Set s = map.entrySet();
Iterator iter = s.iterator();
/* while(iter.hasNext())
{
Map.Entry e = (Entry) iter.next();
System.out.println(e.getKey() + ":" + e.getValue());
}
map = LdapManagerFactory.getLdapManager().getUserInfo("a8822");
s = map.entrySet();
iter = s.iterator();*/
int iterNumber=0;
String[] messageBrokenDot=null;
String[] spliters={",","="};
 
while(iter.hasNext())
{
Map.Entry e = (Entry) iter.next();
if(iterNumber==3)
{
messageBrokenDot=e.getValue().toString().split(spliters[0]);
}
iterNumber++;
//System.out.println(e.getKey() + ":" + e.getValue());
}
for (int i = 0 ; i < iterNumber ; i++) {
// System.out.println("->" + messageBrokenDot[i].split(spliters[1]));
}
 
}
}
/impl/src/java/pt/estgp/estgweb/utils/ConfigProperties.java
47,6 → 47,17
return getInstance().getShort(property);
}
 
/**
* Get property and convert it to boolean
*
* @param property to get and convert
* @return float value
*/
public static boolean getBooleanProperty(String property)
{
return getInstance().getBoolean(property);
}
 
/**
* Get property and convert it to int
*
/impl/src/java/pt/estgp/estgweb/utils/Email.java
New file
0,0 → 1,101
package pt.estgp.estgweb.utils;
 
import jomm.utils.TemplateUtils;
 
import javax.mail.*;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.InternetAddress;
import java.util.Properties;
import java.util.List;
import java.util.ArrayList;
import java.text.MessageFormat;
 
import pt.estgp.estgweb.Globals;
 
/**
* @author Jorge Machado
* @date 20/Mar/2008
* @time 18:32:21
* @see pt.estgp.estgweb.utils
*/
public class Email
{
public static String EMAIL_TEMPLATES_PATH = "/template/email";
 
private String subject;
private List<String> recipients;
private String from;
private String emailTemplateName;
private List<String> arguments;
 
 
public Email(String subject, List<String> recipients, String from, String mailTemplateName, List<String> arguments)
{
this.subject = subject;
this.recipients = recipients;
this.from = from;
this.emailTemplateName = mailTemplateName;
this.arguments = arguments;
}
 
/**
* Sends the email.
*
* @throws javax.mail.MessagingException if there was a problem sending the mail.
*/
public void send()
throws MessagingException
{
 
// Set up properties for mail session
Properties props = System.getProperties();
props.put("mail.smtp.host", Globals.EMAIL_SERVER_HOST);
 
// Get session
Session session = Session.getDefaultInstance(props, null);
 
// Create message
MimeMessage message = new MimeMessage(session);
 
// Set the recipients of the message
for (String recipient : recipients) {
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(recipient));
}
String content = TemplateUtils.getOrLoadTemplate(EMAIL_TEMPLATES_PATH + "/" + emailTemplateName);
// Format the mail message
String fullMessage = MessageFormat.format(content, arguments.toArray());
 
message.setFrom(new InternetAddress(from));
message.setSubject(subject);
message.setText(fullMessage);
 
// if (replyTo != null)
// {
// Address[] replyToAddr = new Address[1];
// replyToAddr[0] = new InternetAddress(replyTo);
// message.setReplyTo(replyToAddr);
// }
System.out.println(fullMessage);
Transport.send(message);
}
 
public static void main(String[]args)
{
List<String> recipients = new ArrayList<String>();
recipients.add("jmachado@estgp.pt");
 
List<String> arguments = new ArrayList<String>();
arguments.add("João Pedro");
arguments.add("http://www.estgp.pt/teste");
Email email = new Email("assunto de teste",recipients,Globals.SYSTEM_EMAIL_BOX,"sendPageFriend_en.txt",arguments);
try {
email.send();
}
catch (MessagingException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
 
}
/impl/src/java/pt/estgp/estgweb/utils/RoleManager.java
26,6 → 26,8
 
public static boolean hasRole(User u, List requiredRoles)
{
if(u == null)
return false;
for(Object role: requiredRoles)
{
if(hasRole(u,(String) role))
35,6 → 37,8
}
public static boolean hasRole(User u, String requiredRole)
{
if(u == null)
return false;
if(u.getRoles() == null || u.getRoles().length() == 0)
return false;
 
/impl/src/java/pt/estgp/estgweb/Globals.java
2,6 → 2,8
 
import pt.estgp.estgweb.utils.ConfigProperties;
 
import java.util.List;
 
/**
* @author Jorge Machado
* @date 28/Fev/2008
10,7 → 12,13
*/
public class Globals
{
 
public static final String ACTUAL_RELATIVE_PATH = "ACTUAL_RELATIVE_PATH";
public static final String ADMIN_ROLE = ConfigProperties.getProperty("user.admin");
public static final String SUPER_USER_ROLE = ConfigProperties.getProperty("user.super");
public static final String USER_SESSION_KEY = "USER_SESSION_KEY";
public static final List<String> AUTOMATIC_VALIDATION_ROLES = ConfigProperties.getListValues("announcements.automatic.validation.role");
public static final String TMP_DIR = ConfigProperties.getProperty("tmp.dir");
public static final String EMAIL_SERVER_HOST = ConfigProperties.getProperty("email.server");
public static final String SYSTEM_EMAIL_BOX = ConfigProperties.getProperty("email.from");
}
/impl/src/java/pt/estgp/estgweb/services/email/SendUrl2FriendService.java
New file
0,0 → 1,17
package pt.estgp.estgweb.services.email;
 
import java.util.List;
 
/**
* @author Jorge Machado
* @date 20/Mar/2008
* @time 18:31:00
* @see pt.estgp.estgweb.services.email
*/
public class SendUrl2FriendService
{
public boolean sendEmail(String url, String from, List<String> recipients)
{
return false;
}
}
/impl/src/java/pt/estgp/estgweb/services/announcements/CreateAnnouncementService.java
6,8 → 6,11
import pt.estgp.estgweb.domain.views.AnnouncementView;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.utils.ConfigProperties;
import pt.estgp.estgweb.utils.RoleManager;
import pt.estgp.estgweb.Globals;
 
import java.util.Date;
import java.util.List;
 
import org.apache.log4j.Logger;
 
38,6 → 41,12
announcement.setTargetRoles(ALL_ROLE);
announcement.setOwner(userSession.getUser());
announcement.setSaveDate(new Date());
 
//Se for de validacao automatica ha de aparecer a combobox na web page e o user é que escolhe
//se não pomos false
if(!RoleManager.hasRole(userSession.getUser(),Globals.AUTOMATIC_VALIDATION_ROLES))
announcement.setStatus(false);
 
DaoFactory.getAnnouncementDaoImpl().save(announcement);
logger.info("Creating announcement:" + announcement.getId());
return new AnnouncementView(announcement);
/impl/src/java/pt/estgp/estgweb/services/announcements/EditAnnouncementService.java
2,10 → 2,12
 
import pt.utl.ist.berserk.logic.serviceManager.IService;
import pt.estgp.estgweb.utils.ConfigProperties;
import pt.estgp.estgweb.utils.RoleManager;
import pt.estgp.estgweb.domain.Announcement;
import pt.estgp.estgweb.domain.UserSession;
import pt.estgp.estgweb.domain.views.AnnouncementView;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.Globals;
import org.apache.log4j.Logger;
 
/*
37,6 → 39,12
 
if(objectView.getTargetRoles() == null || objectView.getTargetRoles().size() == 0)
announcement.setTargetRoles(ALL_ROLE);
 
//Se for de validacao automatica ha de aparecer a combobox na web page e o user é que escolhe
//se não pomos false
if(!RoleManager.hasRole(userSession.getUser(), Globals.AUTOMATIC_VALIDATION_ROLES))
announcement.setStatus(false);
 
logger.info("Updating announcement:" + announcement.getId());
return new AnnouncementView(announcement);
}
/impl/src/java/pt/estgp/estgweb/services/authenticate/AuthenticateService.java
3,11 → 3,18
import org.apache.log4j.Logger;
import pt.estgp.estgweb.domain.User;
import pt.estgp.estgweb.domain.UserSession;
import pt.estgp.estgweb.domain.DomainObjectFactory;
import pt.estgp.estgweb.domain.UserImpl;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.services.expceptions.ServiceException;
import pt.estgp.estgweb.utils.ConfigProperties;
import pt.utl.ist.berserk.logic.serviceManager.IService;
import openldap.ILdapManager;
import openldap.LdapManagerFactory;
 
import java.util.HashMap;
 
 
/*
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt
*
26,22 → 33,61
{
private static final Logger logger = Logger.getLogger(AuthenticateService.class);
 
public void run(String username, String password, UserSession userSession) throws ServiceException
private static final boolean USE_LDAP = ConfigProperties.getBooleanProperty("use.ldap");
 
ILdapManager ldapManager = LdapManagerFactory.getLdapManager();
 
public User run(String username, String password, UserSession userSession) throws ServiceException
{
if(userSession.getUser() != null)
throw new AuthenticateException(AuthenticateException.ALREADY_AUTHENTICATED);
 
User u = DaoFactory.getUserDaoImpl().loadByUsernameAndPassword(username,password);
boolean go = false;
if(USE_LDAP)
go = ldapManager.login(username,password);
 
User u = null;
if(!go)
{
u = DaoFactory.getUserDaoImpl().loadByUsernameAndPassword(username,password);
if(u == null)
{
logger.warn("user:" + username + " fail password");
throw new AuthenticateException(AuthenticateException.FAIL_AUTHENTICATION);
}
logger.warn("user:" + username + " fail LDAP but pass local authentication");
}
else
try
{
u = DaoFactory.getUserDaoImpl().loadByUsername(username);
}
catch(Throwable e){/*dont exist*/}
 
if(u == null)
{
logger.warn("user:" + username + " fail password");
throw new AuthenticateException(AuthenticateException.FAIL_AUTHENTICATION);
u = getUserInfo(username);
}
logger.warn("user:" + username + " authenticated");
userSession.setName(u.getName());
userSession.setUsername(u.getUsername());
userSession.setUser(u);
DaoFactory.getUserSessionDaoImpl().reattach(userSession);
return u;
}
 
//todo completar isto
private User getUserInfo(String username)
{
HashMap map = ldapManager.getUserInfo(username);
UserImpl u = DomainObjectFactory.createUserImpl();
u.setUsername(username);
u.setEmail((String) map.get("email"));
u.setName((String) map.get("name")); //isto esta mal e so para exemplificar depois tem de se ver isto bem
u.setNewUser(true);
DaoFactory.getUserDaoImpl().save(u);
return u;
}
}
 
 
/impl/src/java/pt/estgp/estgweb/services/urlstat/LoadUrlStatService.java
New file
0,0 → 1,30
package pt.estgp.estgweb.services.urlstat;
 
import org.apache.log4j.Logger;
import pt.estgp.estgweb.domain.UrlStat;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.services.expceptions.ServiceException;
import pt.utl.ist.berserk.logic.serviceManager.IService;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 6:55:38
* @see pt.estgp.estgweb.services.urlstat
*/
public class LoadUrlStatService implements IService
{
private static final Logger logger = Logger.getLogger(LoadUrlStatService.class);
 
/**
* Saves a group of clicks in database
* @throws pt.estgp.estgweb.services.expceptions.ServiceException on error
* @param relativePath to search
* @return urlStat
*/
public UrlStat run(String relativePath) throws ServiceException
{
return DaoFactory.getUrlStatDaoImpl().loadOrNull(relativePath);
}
 
}
/impl/src/java/pt/estgp/estgweb/services/urlstat/UrlStatService.java
New file
0,0 → 1,130
package pt.estgp.estgweb.services.urlstat;
 
import pt.utl.ist.berserk.logic.serviceManager.IService;
import pt.estgp.estgweb.services.expceptions.ServiceException;
import pt.estgp.estgweb.domain.*;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.web.filters.UrlStatFilter;
import org.apache.log4j.Logger;
 
import java.util.*;
 
import jomm.dao.impl.AbstractDao;
import jomm.utils.MyCalendar;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 6:55:38
* @see pt.estgp.estgweb.services.urlstat
*/
public class UrlStatService implements IService
{
private static final Logger logger = Logger.getLogger(UrlStatService.class);
 
/**
* Saves a group of clicks in database
* @param map with link clicks
* @param year of group
* @param month of group
* @param day of group
* @throws ServiceException on error
*/
public void run(HashMap<String, UrlStatFilter.IntegerContainer> map, Integer year, Integer month, Integer day) throws ServiceException
{
if(map.size() == 0)
return;
Set<Map.Entry<String,UrlStatFilter.IntegerContainer>> set = map.entrySet();
for(Map.Entry<String,UrlStatFilter.IntegerContainer> entry: set)
{
String relativePath = entry.getKey();
UrlStatFilter.IntegerContainer ic = entry.getValue();
 
UrlStatImpl urlStat = (UrlStatImpl) DaoFactory.getUrlStatDaoImpl().loadOrNullLockUpgrade(relativePath);
if(urlStat == null)
{
logger.info("url:" + relativePath + " does not exist... creating");
urlStat = DomainObjectFactory.createUrlStatImpl();
urlStat.setRelativePath(relativePath);
urlStat.setStatus(false);
DaoFactory.getUrlStatDaoImpl().save(urlStat);
}
 
UrlStatYearId urlStatYearId = new UrlStatYearId(year,urlStat);
UrlStatYearImpl urlStatYear = (UrlStatYearImpl) DaoFactory.getUrlStatYearDaoImpl().loadOrNullLockUpgrade(urlStatYearId);
if(urlStatYear == null)
{
logger.info("url:" + relativePath + " first year call does not exist... creating");
urlStatYear = DomainObjectFactory.createUrlStatYearImpl();
urlStatYear.setId(urlStatYearId);
urlStat.addYear(urlStatYear);
DaoFactory.getUrlStatYearDaoImpl().save(urlStatYear);
DaoFactory.getUrlStatDaoImpl().reattach(urlStat);
}
 
UrlStatMonthId urlStatMonthId = new UrlStatMonthId(month,urlStatYear);
UrlStatMonthImpl urlStatMonth = (UrlStatMonthImpl) DaoFactory.getUrlStatMonthDaoImpl().loadOrNullLockUpgrade(urlStatMonthId);
if(urlStatMonth == null)
{
logger.info("url:" + relativePath + " first month call does not exist... creating");
urlStatMonth = DomainObjectFactory.createUrlStatMonthImpl();
urlStatMonth.setId(urlStatMonthId);
urlStatMonth.setDate(new MyCalendar(year,month,1).getTime());
urlStatYear.addMonth(urlStatMonth);
DaoFactory.getUrlStatMonthDaoImpl().save(urlStatMonth);
DaoFactory.getUrlStatYearDaoImpl().reattach(urlStatYear);
}
UrlStatDayImpl urlStatDay = (UrlStatDayImpl) DaoFactory.getUrlStatDayDaoImpl().loadOrNullLockUpgrade(new UrlStatDayId(day, urlStatMonth));
if(urlStatDay == null)
{
logger.info("url:" + relativePath + " first day call does not exist... creating");
urlStatDay = DomainObjectFactory.createUrlStatDayImpl();
urlStatDay.setId(new UrlStatDayId(day,urlStatMonth));
urlStatDay.setDate(new MyCalendar(year,month,day).getTime());
urlStatMonth.addDay(urlStatDay);
DaoFactory.getUrlStatDayDaoImpl().save(urlStatDay);
}
 
urlStat.setTotalClicks(urlStat.getTotalClicks() + ic.getCount());
urlStatDay.setTotalClicks(urlStatDay.getTotalClicks() + ic.getCount());
urlStatMonth.setTotalClicks(urlStatMonth.getTotalClicks() + ic.getCount());
urlStatYear.setTotalClicks(urlStatYear.getTotalClicks() + ic.getCount());
}
}
 
/**
* Simple method to create links clicks from year 2003 until now
* @param args --
* @throws ServiceException --
*/
public static void main(String[] args) throws ServiceException
{
AbstractDao.getCurrentSession().beginTransaction();
HashMap<String,UrlStatFilter.IntegerContainer> map = new HashMap<String,UrlStatFilter.IntegerContainer>();
UrlStatFilter.IntegerContainer ic = new UrlStatFilter.IntegerContainer(3);
map.put("/proxy/layout4/estgp/escola/EstruturaOrganizativa/CCientifico.asp",ic);
MyCalendar now = new MyCalendar();
MyCalendar c = new MyCalendar(2003,1,1,11,11,11);
Random r = new Random(now.getTimeInMillis());
UrlStatService service = new UrlStatService();
int commit = 0;
do
{
ic.setI(r.nextInt(200));
service.run(map,c.getYear(),c.getMonth(),c.getDay());
c.setTimeInMillis(c.getTimeInMillis() + (24 * 60 * 60 * 1000));
 
if(commit++ > 100)
{
commit = 0;
AbstractDao.getCurrentSession().getTransaction().commit();
AbstractDao.getCurrentSession().beginTransaction();
}
}
while(!(c.getYear() == now.getYear() && c.getMonth() == now.getMonth() && c.getDay() == now.getDay()));
ic.setI(r.nextInt(200));
service.run(map,c.getYear(),c.getMonth(),c.getDay());
c.setTimeInMillis(c.getTimeInMillis() + (24 * 60 * 60 * 1000));
AbstractDao.getCurrentSession().getTransaction().commit();
}
}
/impl/src/java/pt/estgp/estgweb/services/urlstat/TimeSeriesScaleEnum.java
New file
0,0 → 1,36
package pt.estgp.estgweb.services.urlstat;
 
import org.jfree.data.time.Day;
import org.jfree.data.time.Month;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 6:55:38
* @see pt.estgp.estgweb.services.urlstat
*/
public enum TimeSeriesScaleEnum
{
months("months", Month.class),
days("days", Day.class);
 
 
String type;
Class regularTimePeriodClass;
 
TimeSeriesScaleEnum(String type, Class regularTimePeriodClass)
{
this.type = type;
this.regularTimePeriodClass = regularTimePeriodClass;
}
 
public String getType()
{
return type;
}
 
public Class getRegularTimePeriodClass()
{
return regularTimePeriodClass;
}
}
/impl/src/java/pt/estgp/estgweb/services/urlstat/ChartTypeEnum.java
New file
0,0 → 1,71
package pt.estgp.estgweb.services.urlstat;
 
import pt.estgp.estgweb.utils.ConfigProperties;
 
import java.text.SimpleDateFormat;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 6:55:38
* @see pt.estgp.estgweb.services.urlstat
*/
public enum ChartTypeEnum
{
weekDays("urlstat.chart.week.days",TimeSeriesScaleEnum.days),
monthDays("urlstat.chart.month.days",TimeSeriesScaleEnum.days),
trimestreDays("urlstat.chart.trimestre.days",TimeSeriesScaleEnum.days),
semestreDays("urlstat.chart.semestre.days",TimeSeriesScaleEnum.days),
yearDays("urlstat.chart.year.days",TimeSeriesScaleEnum.days),
trimestreMonths("urlstat.chart.trimestre.months",TimeSeriesScaleEnum.months),
semestreMonths("urlstat.chart.semestre.months",TimeSeriesScaleEnum.months),
yearMonths("urlstat.chart.year.months",TimeSeriesScaleEnum.months),
twoYearsMonths("urlstat.chart.two.years.months",TimeSeriesScaleEnum.months);
 
private String messageKey;
private TimeSeriesScaleEnum scale;
private SimpleDateFormat simpleDateFormat;
 
private ChartTypeEnum(String messageKey, TimeSeriesScaleEnum scaleEnum)
{
this.messageKey = messageKey;
this.scale = scaleEnum;
this.simpleDateFormat = new SimpleDateFormat(ConfigProperties.getProperty(messageKey));
 
}
 
public String getMessageKey()
{
return messageKey;
}
 
public TimeSeriesScaleEnum getScale()
{
return scale;
}
 
public SimpleDateFormat getSimpleDateFormat()
{
return simpleDateFormat;
}
 
public static ChartTypeEnum getInstance(String messageKey)
{
for(ChartTypeEnum g: values())
{
if(g.getMessageKey().equals(messageKey))
return g;
}
return null;
}
 
public static ChartTypeEnum parse(String type)
{
for(ChartTypeEnum chartTypeEnum: values())
{
if(chartTypeEnum.getMessageKey().equals(type))
return chartTypeEnum;
}
return null;
}
}
/impl/src/java/pt/estgp/estgweb/services/urlstat/ChartBuilderService.java
New file
0,0 → 1,236
package pt.estgp.estgweb.services.urlstat;
 
import jomm.utils.MessageResources;
import jomm.utils.MyCalendar;
import org.apache.log4j.Logger;
import org.apache.commons.httpclient.util.URIUtil;
import org.apache.commons.httpclient.URIException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.DateAxis;
import org.jfree.chart.plot.XYPlot;
import org.jfree.data.time.Day;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;
import org.jfree.data.time.Month;
import pt.estgp.estgweb.domain.UrlStat;
import pt.estgp.estgweb.domain.UrlStatDay;
import pt.estgp.estgweb.domain.UrlStatMonth;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.services.expceptions.ServiceException;
import pt.estgp.estgweb.utils.ConfigProperties;
import pt.estgp.estgweb.Globals;
import jomm.utils.DatesUtils;
import jomm.dao.impl.AbstractDao;
import jomm.web.utils.TestHttpServletRequest;
import pt.utl.ist.berserk.logic.serviceManager.IService;
 
import javax.servlet.http.HttpServletRequest;
import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.text.SimpleDateFormat;
 
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 6:55:38
* @see pt.estgp.estgweb.services.urlstat
*/
public class ChartBuilderService implements IService
{
private static final Logger logger = Logger.getLogger(ChartBuilderService.class);
 
public static final long LINK_CHART_EXPIRE_INTERVAL = ConfigProperties.getIntProperty("url.stat.image.expire.interval.time.minutes") * 60 * 1000;
public static final String LINK_CHART_TMP_DIR = ConfigProperties.getProperty("url.stat.tmp.dir");
 
/**
* Return file image location
*
* @param relativePaths to analysis
* @param request to get user language
* @param type of chart
* @return image location
* @throws ServiceException error executing
 
*/
public String run(HttpServletRequest request, List<String> relativePaths, ChartTypeEnum type) throws ServiceException
{
MyCalendar c = new MyCalendar();
int day = c.getDay();
int month = c.getMonth();
int year = c.getYear();
if(type == ChartTypeEnum.weekDays)
return build(request,type.getMessageKey(), relativePaths, year,month,day,7,type);
else if(type == ChartTypeEnum.monthDays)
return build(request,type.getMessageKey(), relativePaths, year,month,day,31,type);
else if(type == ChartTypeEnum.trimestreDays)
return build(request,type.getMessageKey(), relativePaths, year,month,day,90,type);
else if(type == ChartTypeEnum.semestreDays)
return build(request,type.getMessageKey(), relativePaths, year,month,day,180,type);
else if(type == ChartTypeEnum.yearDays)
return build(request,type.getMessageKey(), relativePaths, year,month,day,365,type);
else if(type == ChartTypeEnum.trimestreMonths)
return build(request,type.getMessageKey(), relativePaths, year,month,3,type);
else if(type == ChartTypeEnum.semestreMonths)
return build(request,type.getMessageKey(), relativePaths, year,month,6,type);
else if(type == ChartTypeEnum.yearMonths)
return build(request,type.getMessageKey(), relativePaths, year,month,12,type);
else if(type == ChartTypeEnum.twoYearsMonths)
return build(request,type.getMessageKey(), relativePaths, year,month,24,type);
return null;
}
 
 
private String build(HttpServletRequest request, String messageTitle, List<String> relativePaths, int untilYear, int untilMonth, int untilDay, int days, ChartTypeEnum type)
{
Date startDate = DatesUtils.getStartDate(untilYear,untilMonth,untilDay,days);
MyCalendar c = new MyCalendar(untilYear,untilMonth, untilDay);
Date endDate = c.getTime();
return build(request,messageTitle,relativePaths,startDate,endDate,type);
}
 
private String build(HttpServletRequest request, String messageTitle, List<String> relativePaths, int untilYear, int untilMonth, int months,ChartTypeEnum type)
{
Date startDate = DatesUtils.getStartDate(untilYear,untilMonth,months);
MyCalendar c = new MyCalendar(untilYear,untilMonth, 1);
Date endDate = c.getTime();
return build(request,messageTitle,relativePaths,startDate,endDate,type);
}
 
private String build(HttpServletRequest request, String messageTitle, List<String> relativePaths, Date startDate, Date endDate,ChartTypeEnum type)
{
String location = linkToFileName(relativePaths,startDate,endDate,type.getScale());
File img = new File(Globals.TMP_DIR + location);
if(img.exists() && ((System.currentTimeMillis() - img.lastModified()) < LINK_CHART_EXPIRE_INTERVAL))
{
return location;
}
img.getParentFile().mkdirs();
 
TimeSeriesCollection dataset = new TimeSeriesCollection();
for(String relativePath: relativePaths)
{
UrlStat urlStat = DaoFactory.getUrlStatDaoImpl().loadOrNull(relativePath);
if(urlStat != null)
{
TimeSeries s = new TimeSeries(urlStat.getName(), type.getScale().getRegularTimePeriodClass());
if(type.getScale() == TimeSeriesScaleEnum.days)
{
List<UrlStatDay> urlStatDays = DaoFactory.getUrlStatDayDaoImpl().loadDays(relativePath,startDate,endDate);
for(UrlStatDay urlStatDay: urlStatDays)
{
s.add(new Day(
urlStatDay.getDate()),
urlStatDay.getTotalClicks());
}
}
else if(type.getScale() == TimeSeriesScaleEnum.months)
{
List<UrlStatMonth> urlStatMonths = DaoFactory.getUrlStatMonthDaoImpl().loadByMonth(relativePath,startDate,endDate);
for(UrlStatMonth urlStatMonth: urlStatMonths)
{
s.add(new Month(
urlStatMonth.getDate()),
urlStatMonth.getTotalClicks());
}
}
dataset.addSeries(s);
}
}
// dataset.setDomainIsPointsInTime(true);
 
 
JFreeChart chart = ChartFactory.createTimeSeriesChart(
MessageResources.getMessage(request,messageTitle),
MessageResources.getMessage(request,"url.stat.days"),
MessageResources.getMessage(request,"url.stat.access.clicks"),
dataset,
true,
true,
false
);
chart.setBackgroundImage(null);
XYPlot plot = (XYPlot) chart.getPlot();
DateAxis axis = (DateAxis) plot.getDomainAxis();
axis.setDateFormatOverride(type.getSimpleDateFormat());
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setDomainGridlinesVisible(true);
plot.setRangeGridlinePaint(Color.white);
try
{
ChartUtilities.saveChartAsPNG(img, chart, 800, 300);
return location;
}
catch (IOException e)
{
logger.error(e,e);
}
return null;
}
 
 
 
private static String linkToFileName(List<String> relativePaths, Date startDate, Date endDate, TimeSeriesScaleEnum seriesScaleEnum)
{
return linkToFileNameEncode(relativePaths,startDate,endDate,seriesScaleEnum,false);
}
 
private static String linkToFileNameEncode(List<String> relativePaths, Date startDate, Date endDate, TimeSeriesScaleEnum seriesScaleEnum,boolean encode)
{
try
{
String relativePathName = "";
for(String relativePath: relativePaths)
{
relativePathName += relativePath + "_";
}
SimpleDateFormat sp = new SimpleDateFormat("yyyy_MM_dd");
String dates = sp.format(startDate) + "_UNTIL_" + sp.format(endDate) + "_" + seriesScaleEnum.getType();
String path;
if(encode)
path = URIUtil.encodeAll(relativePathName.replaceAll("/","_"),"ISO-8859-1");
else
path = relativePathName.replaceAll("/","_");
return LINK_CHART_TMP_DIR + "/" + path + "_" + dates + ".png";
}
catch (URIException e)
{
logger.fatal(e,e);
return null;
}
}
 
 
/**
* Simple test to create link clicks from 2003 until now (PS: call first: UrlStatService.main) and generate charts of all types
* @param args
* @throws ServiceException
*/
 
public static void main(String[] args) throws ServiceException
{
// UrlStatService.main(null);
AbstractDao.getCurrentSession().beginTransaction();
List<String> relativePaths = new ArrayList<String>();
relativePaths.add("/Welcome.do");
// 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));
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.trimestreDays));
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.semestreDays));
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.yearDays));
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.trimestreMonths));
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.semestreMonths));
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.yearMonths));
System.out.println(new ChartBuilderService().run(new TestHttpServletRequest(),relativePaths, ChartTypeEnum.twoYearsMonths));
AbstractDao.getCurrentSession().getTransaction().commit();
}
 
}
/impl/src/java/pt/estgp/estgweb/domain/UserImpl.java
15,6 → 15,17
public class UserImpl extends User
{
 
private boolean newUser = false;
 
 
public boolean isNewUser() {
return newUser;
}
 
public void setNewUser(boolean newUser) {
this.newUser = newUser;
}
 
/**
* check if user is in some group
* @param g to check
/impl/src/java/pt/estgp/estgweb/domain/UrlStatYearImpl.java
New file
0,0 → 1,46
package pt.estgp.estgweb.domain;
 
import java.io.Serializable;
import java.util.HashSet;
import java.util.Date;
 
/**
* @author Jorge Machado
* @date 14/Mar/2008
* @time 9:50:32
* @see pt.estgp.estgweb.domain
*/
public class UrlStatYearImpl extends UrlStatYear
{
 
public UrlStatYearImpl()
{
setTotalClicks(0);
setSaveDate(new Date());
// setMonth1Clicks(0);
// setMonth2Clicks(0);
// setMonth3Clicks(0);
// setMonth4Clicks(0);
// setMonth5Clicks(0);
// setMonth6Clicks(0);
// setMonth7Clicks(0);
// setMonth8Clicks(0);
// setMonth9Clicks(0);
// setMonth10Clicks(0);
// setMonth11Clicks(0);
// setMonth12Clicks(0);
}
 
public Serializable getSerializable()
{
return getId();
}
 
public void addMonth(UrlStatMonth urlStatMonth)
{
if(getMonths() == null)
setMonths(new HashSet<UrlStatMonth>());
getMonths().add(urlStatMonth);
}
 
}
/impl/src/java/pt/estgp/estgweb/domain/UrlStatDayImpl.java
New file
0,0 → 1,25
package pt.estgp.estgweb.domain;
 
import java.io.Serializable;
import java.util.HashSet;
import java.util.Date;
 
/**
* @author Jorge Machado
* @date 14/Mar/2008
* @time 9:50:43
* @see pt.estgp.estgweb.domain
*/
public class UrlStatDayImpl extends UrlStatDay
{
public UrlStatDayImpl()
{
setSaveDate(new Date());
setTotalClicks(0);
}
 
public Serializable getSerializable()
{
return getId();
}
}
/impl/src/java/pt/estgp/estgweb/domain/UrlStatImpl.java
New file
0,0 → 1,40
package pt.estgp.estgweb.domain;
 
import java.io.Serializable;
import java.util.HashSet;
import java.util.Date;
 
/**
* @author Jorge Machado
* @date 14/Mar/2008
* @time 9:50:22
* @see pt.estgp.estgweb.domain
*/
public class UrlStatImpl extends UrlStat
{
 
public UrlStatImpl()
{
setTotalClicks(0);
setSaveDate(new Date());
}
 
public Serializable getSerializable()
{
return getRelativePath();
}
 
public void addYear(UrlStatYear urlStatYear)
{
if(getYears() == null)
setYears(new HashSet<UrlStatYear>());
getYears().add(urlStatYear);
}
 
public String getName()
{
if(super.getName() == null)
return getRelativePath();
return super.getName();
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/UrlStatDayDaoImpl.java
New file
0,0 → 1,40
package pt.estgp.estgweb.domain.dao.impl;
 
import pt.estgp.estgweb.domain.UrlStatDay;
 
import java.util.Date;
import java.util.List;
import static org.hibernate.criterion.Restrictions.*;
import org.hibernate.criterion.Order;
 
/**
* @author Jorge Machado
* @date 28/Fev/2008
* @time 2:51:06
* @see pt.estgp.estgweb.domain.dao.impl
*/
public class UrlStatDayDaoImpl extends UrlStatDayDao
{
public static UrlStatDayDaoImpl getInstance()
{
if (myInstance == null)
myInstance = new UrlStatDayDaoImpl();
return (UrlStatDayDaoImpl) myInstance;
}
 
/**
* load all dates between startDate and endDate
*
* @param startDate from date
* @param endDate to date
* @return list of UrlStatDay
*/
public List<UrlStatDay> loadDays(String relativePath, Date startDate, Date endDate)
{
return createCriteria()
.add(eq("id.urlStatMonth.id.urlStatYear.id.urlStat.relativePath",relativePath))
.add(or(gt("date",startDate),eq("date",startDate)))
.add(or(lt("date",endDate),eq("date",endDate))).addOrder(Order.asc("date")).list();
}
 
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/UrlStatDaoImpl.java
New file
0,0 → 1,25
package pt.estgp.estgweb.domain.dao.impl;
 
import pt.estgp.estgweb.domain.User;
 
import java.util.List;
 
import org.hibernate.HibernateException;
import org.hibernate.criterion.Restrictions;
import jomm.dao.DaoException;
 
/**
* @author Jorge Machado
* @date 28/Fev/2008
* @time 2:51:06
* @see pt.estgp.estgweb.domain.dao.impl
*/
public class UrlStatDaoImpl extends UrlStatDao
{
public static UrlStatDaoImpl getInstance()
{
if (myInstance == null)
myInstance = new UrlStatDaoImpl();
return (UrlStatDaoImpl) myInstance;
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/UrlStatYearDaoImpl.java
New file
0,0 → 1,17
package pt.estgp.estgweb.domain.dao.impl;
 
/**
* @author Jorge Machado
* @date 28/Fev/2008
* @time 2:51:06
* @see pt.estgp.estgweb.domain.dao.impl
*/
public class UrlStatYearDaoImpl extends UrlStatYearDao
{
public static UrlStatYearDaoImpl getInstance()
{
if (myInstance == null)
myInstance = new UrlStatYearDaoImpl();
return (UrlStatYearDaoImpl) myInstance;
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/UrlStatMonthDaoImpl.java
New file
0,0 → 1,33
package pt.estgp.estgweb.domain.dao.impl;
 
import org.hibernate.criterion.Order;
import static org.hibernate.criterion.Restrictions.*;
import pt.estgp.estgweb.domain.UrlStatMonth;
 
import java.util.Date;
import java.util.List;
 
/**
* @author Jorge Machado
* @date 28/Fev/2008
* @time 2:51:06
* @see pt.estgp.estgweb.domain.dao.impl
*/
public class UrlStatMonthDaoImpl extends UrlStatMonthDao
{
public static UrlStatMonthDaoImpl getInstance()
{
if (myInstance == null)
myInstance = new UrlStatMonthDaoImpl();
return (UrlStatMonthDaoImpl) myInstance;
}
 
 
public List<UrlStatMonth> loadByMonth(String relativePath, Date startDate, Date endDate)
{
return createCriteria()
.add(eq("id.urlStatYear.id.urlStat.relativePath",relativePath))
.add(or(gt("date",startDate),eq("date",startDate)))
.add(or(lt("date",endDate),eq("date",endDate))).addOrder(Order.asc("date")).list();
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/DaoFactory.java
44,4 → 44,24
{
return UserSessionDaoImpl.getInstance();
}
 
public static UrlStatDaoImpl getUrlStatDaoImpl()
{
return UrlStatDaoImpl.getInstance();
}
 
public static UrlStatYearDaoImpl getUrlStatYearDaoImpl()
{
return UrlStatYearDaoImpl.getInstance();
}
 
public static UrlStatMonthDaoImpl getUrlStatMonthDaoImpl()
{
return UrlStatMonthDaoImpl.getInstance();
}
 
public static UrlStatDayDaoImpl getUrlStatDayDaoImpl()
{
return UrlStatDayDaoImpl.getInstance();
}
}
/impl/src/java/pt/estgp/estgweb/domain/UrlStatMonthImpl.java
New file
0,0 → 1,63
package pt.estgp.estgweb.domain;
 
import java.io.Serializable;
import java.util.HashSet;
import java.util.Date;
 
/**
* @author Jorge Machado
* @date 14/Mar/2008
* @time 9:50:43
* @see pt.estgp.estgweb.domain
*/
public class UrlStatMonthImpl extends UrlStatMonth
{
public UrlStatMonthImpl()
{
setTotalClicks(0);
setSaveDate(new Date());
// setDay1(0);
// setDay2(0);
// setDay3(0);
// setDay4(0);
// setDay5(0);
// setDay6(0);
// setDay7(0);
// setDay8(0);
// setDay9(0);
// setDay10(0);
// setDay11(0);
// setDay12(0);
// setDay13(0);
// setDay14(0);
// setDay15(0);
// setDay16(0);
// setDay17(0);
// setDay18(0);
// setDay19(0);
// setDay20(0);
// setDay21(0);
// setDay22(0);
// setDay23(0);
// setDay24(0);
// setDay25(0);
// setDay26(0);
// setDay27(0);
// setDay28(0);
// setDay29(0);
// setDay30(0);
// setDay31(0);
}
public Serializable getSerializable()
{
return getId();
}
 
public void addDay(UrlStatDay urlStatDay)
{
if(getDays() == null)
setDays(new HashSet<UrlStatDay>());
getDays().add(urlStatDay);
}
}
/impl/src/java/pt/estgp/estgweb/domain/DomainObjectFactory.java
7,7 → 7,7
* @see pt.estgp.estgweb.domain
*/
public class DomainObjectFactory {
 
public static AnnouncementImpl createAnnouncementImpl()
{
return new AnnouncementImpl();
52,4 → 52,24
{
return new UserSessionImpl();
}
 
public static UrlStatImpl createUrlStatImpl()
{
return new UrlStatImpl();
}
 
public static UrlStatYearImpl createUrlStatYearImpl()
{
return new UrlStatYearImpl();
}
 
public static UrlStatMonthImpl createUrlStatMonthImpl()
{
return new UrlStatMonthImpl();
}
 
public static UrlStatDayImpl createUrlStatDayImpl()
{
return new UrlStatDayImpl();
}
}
/impl/src/java/pt/estgp/estgweb/filters/filters/ContextStaticTimer.java
1,23 → 1,15
package pt.estgp.estgweb.filters.filters;
 
import pt.estgp.estgweb.filters.chains.OwnerControlFilter;
import pt.estgp.estgweb.filters.exceptions.NeedAuthenticationException;
import pt.estgp.estgweb.filters.exceptions.AccessDeniedOperationException;
import pt.estgp.estgweb.domain.UserSession;
import pt.estgp.estgweb.domain.IOwned;
import pt.estgp.estgweb.Globals;
import jomm.utils.MyCalendar;
import org.apache.log4j.Logger;
import pt.estgp.estgweb.services.expceptions.ServiceParameterException;
import pt.utl.ist.berserk.ServiceRequest;
import pt.utl.ist.berserk.ServiceResponse;
import pt.utl.ist.berserk.logic.filterManager.FilterParameters;
import pt.utl.ist.berserk.logic.filterManager.exceptions.FilterException;
import org.apache.log4j.Logger;
 
import java.util.Date;
import java.util.Calendar;
import java.util.Date;
 
import jomm.utils.MyCalendar;
 
public class ContextStaticTimer extends ContextTimer
 
{
44,7 → 36,7
{
String[] dateFields = fields[0].split("-");
year = Integer.parseInt(dateFields[0]);
month = Integer.parseInt(dateFields[1]) - 1;
month = Integer.parseInt(dateFields[1]);
day = Integer.parseInt(dateFields[2]);
}
catch(Throwable e)
89,7 → 81,7
{
String[] dateFields = fields[0].split("-");
year = Integer.parseInt(dateFields[0]);
month = Integer.parseInt(dateFields[1]) - 1;
month = Integer.parseInt(dateFields[1]);
day = Integer.parseInt(dateFields[2]);
}
catch(Throwable e)
/impl/src/java/pt/estgp/estgweb/web/WebProxy.java
37,6 → 37,7
String path = (String) request.getAttribute("path");
String server = (String) request.getAttribute("server");
String useOutputStream = (String) request.getAttribute("useOutputStream");
String encoding = (String) request.getAttribute("encoding");
logger.info("server:" + server);
logger.info("path:" + path);
if(path != null)
66,7 → 67,7
{
while((readedBytes = stream.read(buf)) > 0)
{
String s = new String(buf,0,readedBytes,"ISO-8859-1");
String s = new String(buf,0,readedBytes,encoding);
response.getWriter().write(s);
}
}
/impl/src/java/pt/estgp/estgweb/web/utils/DatesUtils.java
34,7 → 34,7
String year = date[0];
String month = date[1];
String day = date[2];
Calendar c = new MyCalendar(Integer.parseInt(year),Integer.parseInt(month)-1,Integer.parseInt(day));
Calendar c = new MyCalendar(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day));
return c.getTime();
}
catch(Throwable e)
/impl/src/java/pt/estgp/estgweb/web/LayoutController.java
49,6 → 49,8
String server = ConfigProperties.getProperty("server." + serverParameter);
 
 
 
 
if(serverParameter== null || server == null || server.length()==0 || path == null || layout == null)
throw new FileNotFoundException("url not found for server:" + server + " and path:" + path);
 
73,6 → 75,8
}
else if(path.endsWith("html") || path.endsWith("htm") || path.endsWith("shtml") || path.endsWith("asp") || path.endsWith("jsp") || path.endsWith("aspx") || path.endsWith("/"))
{
String encoding = ConfigProperties.getProperty(serverParameter + ".encoding");
request.setAttribute("encoding",encoding);
return mapping.findForward(layout);
}
else
/impl/src/java/pt/estgp/estgweb/web/form/urlstat/UrlStatForm.java
New file
0,0 → 1,68
package pt.estgp.estgweb.web.form.urlstat;
 
import pt.estgp.estgweb.web.form.ApplicationForm;
 
import java.util.List;
import java.util.ArrayList;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 16:06:12
* @see pt.estgp.estgweb.web.form.urlstat
*/
public class UrlStatForm extends ApplicationForm
{
 
private String chartType;
private List<RelativePath> relativePaths;
 
 
public UrlStatForm()
{
this.relativePaths = new ArrayList<RelativePath>();
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
this.relativePaths.add(new RelativePath());
}
 
public String getChartType()
{
return chartType;
}
 
public void setChartType(String chartType)
{
this.chartType = chartType;
}
 
public List<RelativePath> getRelativePaths()
{
return relativePaths;
}
 
public List<String> getRelativePathsStrs()
{
if(relativePaths == null)
return null;
List<String> relativePaths = new ArrayList<String>();
for(RelativePath relativePath:this.relativePaths)
{
if(relativePath.getValue() != null && relativePath.getValue().length() > 0)
relativePaths.add(relativePath.getValue());
}
return relativePaths;
}
 
public void setRelativePaths(List<RelativePath> relativePaths)
{
this.relativePaths = relativePaths;
}
}
/impl/src/java/pt/estgp/estgweb/web/form/urlstat/RelativePath.java
New file
0,0 → 1,22
package pt.estgp.estgweb.web.form.urlstat;
 
/**
* @author Jorge Machado
* @date 15/Mar/2008
* @time 17:24:22
* @see pt.estgp.estgweb.web.form.urlstat
*/
public class RelativePath
{
private String value;
 
public String getValue()
{
return value;
}
 
public void setValue(String value)
{
this.value = value;
}
}
/impl/src/java/pt/estgp/estgweb/web/controllers/urlstat/UrlStatController.java
New file
0,0 → 1,54
package pt.estgp.estgweb.web.controllers.urlstat;
 
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import pt.estgp.estgweb.services.urlstat.ChartTypeEnum;
import pt.estgp.estgweb.web.controllers.ApplicationController;
import pt.estgp.estgweb.web.exceptions.NoCookiesException;
import pt.estgp.estgweb.web.form.urlstat.UrlStatForm;
import pt.estgp.estgweb.web.utils.RequestUtils;
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager;
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager;
 
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
 
/**
* @author Jorge Machado
* @date 26/Fev/2008
* @time 18:01:54
* @see pt.estgp.estgweb.web
*/
public class UrlStatController extends ApplicationController
{
 
private static final Logger logger = Logger.getLogger(UrlStatController.class);
 
public ActionForward execute(ActionMapping mapping,
ActionForm form ,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
try
{
UrlStatForm urlStatForm = (UrlStatForm) form;
IServiceManager sm = ServiceManager.getInstance();
Object[] args = new Object[]{request, urlStatForm.getRelativePathsStrs(), ChartTypeEnum.parse(urlStatForm.getChartType())};
String tmpLocation = (String) sm.execute(RequestUtils.getRequester(request),"BuildChartGetPath",args);
request.getRequestDispatcher("/tmpStream" + tmpLocation).forward(request,response);
return null;
}
catch (Throwable e)
{
if(e instanceof NoCookiesException)
return mapping.findForward("errorNoCookies");
logger.fatal(e,e);
}
return mapping.findForward("error500");
}
}
/impl/src/java/pt/estgp/estgweb/web/filters/UrlStatFilter.java
New file
0,0 → 1,213
package pt.estgp.estgweb.web.filters;
 
import org.apache.log4j.Logger;
 
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Date;
import java.util.Calendar;
import java.util.List;
 
import pt.estgp.estgweb.domain.UserSessionImpl;
import pt.estgp.estgweb.domain.UserImpl;
import pt.estgp.estgweb.domain.UserSession;
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.utils.ConfigProperties;
import pt.estgp.estgweb.web.utils.RequestUtils;
import pt.estgp.estgweb.web.exceptions.NoCookiesException;
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager;
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager;
import pt.utl.ist.berserk.logic.serviceManager.exceptions.ServiceManagerException;
import pt.utl.ist.berserk.logic.filterManager.exceptions.*;
import jomm.utils.MyCalendar;
 
/**
*
* @author Jorge Machado
*/
 
public class UrlStatFilter implements Filter
{
 
private static Logger logger = Logger.getLogger(UrlStatFilter.class);
 
public static List<String> ignoreEstensions = ConfigProperties.getListValues("url.stat.ignore.extension");
public static List<String> ignorePrefixs = ConfigProperties.getListValues("url.stat.ignore.prefix");
public static MyCalendar myCalendar = new MyCalendar();
public static int day = myCalendar.getDay();
public static int month = myCalendar.getMonth();
public static int year = myCalendar.getYear();
 
public static final int MAX_MAP_SYZE = 4;
 
public static final long SAVE_INTERVAL = 30 * 60 * 1000;
 
public static long lastUpdate = new Date().getTime();
 
public static HashMap<String, IntegerContainer> urlStat = new HashMap<String,IntegerContainer>();
 
public UrlStatFilter()
{
}
 
public void init(FilterConfig config)
{
 
}
 
/**
*
* @param request The servlet request we are processing
* @param chain The filter chain we are processing
*
* @exception java.io.IOException if an input/output error occurs
* @exception javax.servlet.ServletException if a servlet error occurs
*/
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException
{
 
HttpServletRequest hrequest = (HttpServletRequest) request;
UserSessionImpl userSession = (UserSessionImpl) request.getAttribute(Globals.USER_SESSION_KEY);
MyCalendar c = new MyCalendar();
int nowDay = c.getDay();
if(nowDay != day || (c.getTimeInMillis() - lastUpdate > SAVE_INTERVAL))
{
try
{
updateStats(hrequest, c.getTimeInMillis());
}
catch (Throwable e)
{
logger.error(e,e);
((HttpServletResponse)response).sendError(500);
}
}
 
day = nowDay;
month = c.getMonth();
year = c.getYear();
 
String relativePath = hrequest.getServletPath();
if(relativePath == null)
relativePath = "";
 
if(hrequest.getPathInfo() != null && hrequest.getPathInfo().length() > 0)
{
relativePath += hrequest.getPathInfo();
}
 
for(String ignore: ignoreEstensions)
{
if(relativePath.endsWith(ignore))
{
chain.doFilter(request,response);
return;
}
}
 
if(hrequest.getQueryString() != null && hrequest.getQueryString().length() > 0)
relativePath += "?" + hrequest.getQueryString();
 
for(String ignore: ignorePrefixs)
{
if(relativePath.startsWith(ignore))
{
chain.doFilter(request,response);
return;
}
}
if(userSession != null)
{
if(userSession.get(relativePath) != null)
{
chain.doFilter(request,response);
return;
}
userSession.put(relativePath,"");
try
{
userSession.serialize(hrequest);
}
catch (Throwable e)
{
logger.error(e,e);
((HttpServletResponse)response).sendError(500);
return;
}
}
logger.info("accessing " + relativePath);
IntegerContainer count = urlStat.get(relativePath);
 
if(count == null)
{
try
{
createUrl(hrequest,c.getTimeInMillis(),relativePath);
}
catch (Throwable e)
{
logger.error(e,e);
((HttpServletResponse)response).sendError(500);
}
}
else
{
count.inc();
}
chain.doFilter(request,response);
}
 
public static synchronized void updateStats(HttpServletRequest request, long nowMiliseconds) throws Throwable, InvalidFilterException, ServiceManagerException, InvalidFilterExpressionException, IncompatibleFilterException, FilterRetrieveException, NoCookiesException
{
 
lastUpdate = nowMiliseconds;
IServiceManager sm = ServiceManager.getInstance();
Object[] args = new Object[]{urlStat,year,month,day};
sm.execute(RequestUtils.getRequester(request),"UpdateUrlStatistics",args);
urlStat.clear();
urlStat = null;
urlStat = new HashMap<String,IntegerContainer>();
}
 
public static synchronized void createUrl(HttpServletRequest request, long nowMiliseconds, String relativePath) throws Throwable, ClassNotIFilterException, ServiceManagerException, InvalidFilterExpressionException, IncompatibleFilterException, FilterRetrieveException, NoCookiesException
{
if(urlStat.size() >= MAX_MAP_SYZE)
updateStats(request,nowMiliseconds);
urlStat.put(relativePath, new IntegerContainer(1));
}
 
public void destroy()
{
// Nothing
}
 
public static class IntegerContainer
{
int i;
 
public void setI(int i) {
this.i = i;
}
 
public IntegerContainer(int i)
{
this.i = i;
}
 
public void inc()
{
i++;
}
 
public int getCount()
{
return i;
}
}
 
}
/impl/src/java/pt/estgp/estgweb/web/filters/UserSessionFilter.java
66,7 → 66,7
return;
}
}
if(userSession.getLanguage()!=null)
if(userSession.getLanguage() != null)
{
((HttpServletRequest)request).setAttribute(org.apache.struts.Globals.LOCALE_KEY, new Locale(userSession.getLanguage()));
((HttpServletRequest)request).getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, new Locale(userSession.getLanguage()));
/impl/src/java/pt/estgp/estgweb/web/filters/RelativePathFilter.java
New file
0,0 → 1,58
package pt.estgp.estgweb.web.filters;
 
import org.apache.log4j.Logger;
import pt.estgp.estgweb.Globals;
 
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
 
/**
*
* @author Jorge Machado
*/
 
public class RelativePathFilter implements Filter {
 
public RelativePathFilter()
{
}
 
public void init(FilterConfig config)
{
 
}
 
/**
*
* @param request The servlet request we are processing
* @param chain The filter chain we are processing
*
* @exception java.io.IOException if an input/output error occurs
* @exception javax.servlet.ServletException if a servlet error occurs
*/
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException
{
HttpServletRequest hrequest = (HttpServletRequest) request;
String relativePath = hrequest.getServletPath();
if(relativePath == null)
relativePath = "";
 
if(hrequest.getPathInfo() != null && hrequest.getPathInfo().length() > 0)
{
relativePath += hrequest.getPathInfo();
}
 
if(hrequest.getQueryString() != null && hrequest.getQueryString().length() > 0)
relativePath += "?" + hrequest.getQueryString();
 
hrequest.setAttribute(Globals.ACTUAL_RELATIVE_PATH,relativePath);
chain.doFilter(request,response);
}
 
public void destroy()
{
// Nothing
}
}
/impl/src/java/pt/estgp/estgweb/web/TmpStream.java
New file
0,0 → 1,78
package pt.estgp.estgweb.web;
 
import org.apache.log4j.Logger;
import org.apache.commons.httpclient.util.URIUtil;
 
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import java.io.*;
import java.net.URL;
import java.net.URLConnection;
 
import pt.estgp.estgweb.Globals;
import jomm.utils.MimeTypeGuesser;
 
/**
* @author Jorge Machado
* @date 26/Fev/2008
* @time 12:46:16
* @see pt.estgp.estgweb.web
*/
public class TmpStream extends HttpServlet
{
 
private static final Logger logger = Logger.getLogger(TmpStream.class);
 
/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
String path = request.getPathInfo();
File f = new File(Globals.TMP_DIR + path);
String mimeType = MimeTypeGuesser.getInstance().guessMimeType(f);
response.setContentType(mimeType);
response.setContentLength((int) f.length());
logger.info("Opening tmp file:" + f.getAbsolutePath() + " with mime-type:" + mimeType);
InputStream stream = new FileInputStream(new File(Globals.TMP_DIR + path));
byte[] buf = new byte[1024];
int readedBytes;
OutputStream os = response.getOutputStream();
while((readedBytes = stream.read(buf)) > 0)
{
os.write(buf,0,readedBytes);
}
os.close();
stream.close();
}
 
 
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
 
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
 
/** Returns a short description of the servlet.
*/
public String getServletInfo() {
return "Proxy Servlet to get pages form static web page servers";
}
// </editor-fold>
}
/impl/src/java/pt/estgp/estgweb/web/tags/IsAdminTag.java
12,7 → 12,7
 
public class IsAdminTag extends BodyTagSupport {
 
private static Logger logger = Logger.getLogger(IsAdminTag.class);
private static final Logger logger = Logger.getLogger(IsAdminTag.class);
 
 
public int doStartTag() throws JspException {
/impl/src/java/pt/estgp/estgweb/web/tags/IsSuperUserTag.java
12,7 → 12,7
 
public class IsSuperUserTag extends BodyTagSupport {
 
private static Logger logger = Logger.getLogger(IsSuperUserTag.class);
private static final Logger logger = Logger.getLogger(IsSuperUserTag.class);
 
public int doStartTag() throws JspException {
return EVAL_BODY_TAG;
/impl/src/java/pt/estgp/estgweb/web/tags/PageUrlStatTag.java
New file
0,0 → 1,82
package pt.estgp.estgweb.web.tags;
 
import org.apache.log4j.Logger;
import org.apache.commons.httpclient.util.URIUtil;
import org.apache.commons.httpclient.URIException;
 
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.http.HttpServletRequest;
 
import pt.estgp.estgweb.domain.UserSessionImpl;
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.web.filters.UrlStatFilter;
 
public class PageUrlStatTag extends BodyTagSupport
{
 
private static final Logger logger = Logger.getLogger(PageUrlStatTag.class);
 
private String attributes;
 
public String getAttributes()
{
return attributes;
}
 
public void setAttributes(String attributes)
{
this.attributes = attributes;
}
 
public int doStartTag() throws JspException
{
return EVAL_BODY_TAG;
}
public int doEndTag() throws JspException
{
HttpServletRequest hrequest = (HttpServletRequest) pageContext.getRequest();
String relativePath = (String) hrequest.getAttribute(Globals.ACTUAL_RELATIVE_PATH);
 
for(String ignore: UrlStatFilter.ignorePrefixs)
{
if(relativePath.startsWith(ignore))
{
return EVAL_PAGE;
}
}
 
try
{
if(attributes == null)
attributes = "";
 
String url = "<a " + attributes + " href=\"" + hrequest.getContextPath() + "/urlstat/startUrlStat.do?relativePaths[0].value=" + URIUtil.encodePath(relativePath,"ISO-8859-1") + "\">";
String endUrl = "</a>";
String toPage = bodyContent.getString().trim();
JspWriter writer = pageContext.getOut();
try
{
writer.write(url + toPage + endUrl);
}
catch(Exception e)
{
logger.error(e,e);
throw new JspException(e);
}
}
catch (URIException e)
{
logger.error(e,e);
throw new JspException(e);
}
 
 
 
// Continue processing this page
return EVAL_PAGE;
}
 
 
}
/impl/src/java/pt/estgp/estgweb/web/tags/ChartPageUrlStatTag.java
New file
0,0 → 1,86
package pt.estgp.estgweb.web.tags;
 
import org.apache.log4j.Logger;
import org.apache.commons.httpclient.util.URIUtil;
import org.apache.commons.httpclient.URIException;
 
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.http.HttpServletRequest;
 
import pt.estgp.estgweb.Globals;
 
import java.util.Enumeration;
 
import jomm.utils.MessageResources;
 
public class ChartPageUrlStatTag extends TagSupport
{
 
private static final Logger logger = Logger.getLogger(ChartPageUrlStatTag.class);
 
private String attributes;
 
private String chartType;
 
private String altKey;
 
public String getAltKey()
{
return altKey;
}
 
public void setAltKey(String altKey)
{
this.altKey = altKey;
}
 
public String getAttributes()
{
return attributes;
}
 
public String getChartType()
{
return chartType;
}
 
public void setChartType(String chartType)
{
this.chartType = chartType;
}
 
public void setAttributes(String attributes)
{
this.attributes = attributes;
}
 
public int doStartTag() throws JspException
{
HttpServletRequest hrequest = (HttpServletRequest) pageContext.getRequest();
String queryStr = hrequest.getQueryString();
 
if(attributes == null)
attributes = "";
String alt = "";
if(altKey != null)
alt = MessageResources.getMessage(hrequest,altKey);
 
String img = "<img " + attributes + " alt=\"" + alt + "\" src=\"" + hrequest.getContextPath() + "/urlstat/urlStat.do?chartType=" + chartType + "&" + queryStr + "\">";
 
JspWriter writer = pageContext.getOut();
try
{
writer.write(img);
}
catch(Exception e)
{
logger.error(e,e);
throw new JspException(e);
}
 
return (SKIP_BODY);
}
}
/impl/src/java/pt/estgp/estgweb/web/tags/HasRoleTag.java
14,7 → 14,7
 
public class HasRoleTag extends BodyTagSupport {
 
private static Logger logger = Logger.getLogger(HasRoleTag.class);
private static final Logger logger = Logger.getLogger(HasRoleTag.class);
 
 
private String role;
/impl/src/java/pt/estgp/estgweb/web/tags/IsAuthenticatedTag.java
12,7 → 12,7
 
public class IsAuthenticatedTag extends BodyTagSupport {
 
private static Logger logger = Logger.getLogger(IsAuthenticatedTag.class);
private static final Logger logger = Logger.getLogger(IsAuthenticatedTag.class);
 
public int doStartTag() throws JspException {
return EVAL_BODY_TAG;
/impl/src/java/pt/estgp/estgweb/web/tags/IsNotAuthenticatedTag.java
11,7 → 11,7
 
public class IsNotAuthenticatedTag extends BodyTagSupport {
 
private static Logger logger = Logger.getLogger(IsNotAuthenticatedTag.class);
private static final Logger logger = Logger.getLogger(IsNotAuthenticatedTag.class);
 
public int doStartTag() throws JspException {
return EVAL_BODY_TAG;
/impl/src/java/pt/utl/ist/berserk/logic/serviceManager/delegateGenerator/ServiceDelegate.java
119,7 → 119,7
}
 
/**
* @param string
 
* @param method
*/
private void generateBody(String serviceName, MethodDeclaration method)
/impl/src/doc/Proposta de ProjectoBACO.doc
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/impl/src/doc/planoTrabalho.xls
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/impl/src/hbm/pt/estgp/estgweb/domain/UrlStatDay.hbm.xml
New file
0,0 → 1,26
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
<hibernate-mapping>
<class name="pt.estgp.estgweb.domain.UrlStatDay" table="urlstatday" abstract="true">
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta>
<meta attribute="scope-class">public abstract</meta>
<composite-id name="id" class="pt.estgp.estgweb.domain.UrlStatDayId">
<meta attribute="scope-class">public</meta>
<key-property name="day" type="integer" column="day"/>
<key-many-to-one name="urlStatMonth" class="pt.estgp.estgweb.domain.UrlStatMonth">
<column name="month"/>
<column name="year"/>
<column name="relativePath"/>
</key-many-to-one>
</composite-id>
<discriminator column="discrimitator"/>
<timestamp name="updateDate" unsaved-value="null"/>
<property name="saveDate" type="timestamp"/>
<property name="date" type="date"/>
<property name="totalClicks" type="integer"/>
<subclass name="pt.estgp.estgweb.domain.UrlStatDayImpl" discriminator-value="UrlStatDayImpl"/>
</class>
</hibernate-mapping>
/impl/src/hbm/pt/estgp/estgweb/domain/UrlStat.hbm.xml
New file
0,0 → 1,26
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
<hibernate-mapping>
<class name="pt.estgp.estgweb.domain.UrlStat" table="urlstat" abstract="true">
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta>
<meta attribute="scope-class">public abstract</meta>
<id name="relativePath" type="string">
<generator class="assigned"/>
</id>
<discriminator column="discrimitator"/>
<timestamp name="updateDate" unsaved-value="null"/>
<property name="saveDate" type="timestamp"/>
<property name="name" type="string"/>
<property name="description" type="text"/>
<property name="totalClicks" type="integer"/>
<property name="status" type="boolean"/>
<set name="years" order-by="year asc" lazy="true" cascade="all">
<key column="relativePathId"/>
<one-to-many class="pt.estgp.estgweb.domain.UrlStatYear"/>
</set>
<subclass name="pt.estgp.estgweb.domain.UrlStatImpl" discriminator-value="UrlStatImpl"/>
</class>
</hibernate-mapping>
/impl/src/hbm/pt/estgp/estgweb/domain/UrlStatYear.hbm.xml
New file
0,0 → 1,28
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
<hibernate-mapping>
<class name="pt.estgp.estgweb.domain.UrlStatYear" table="urlstatyear" abstract="true">
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta>
<meta attribute="scope-class">public abstract</meta>
<composite-id name="id" class="pt.estgp.estgweb.domain.UrlStatYearId">
<meta attribute="scope-class">public</meta>
<key-property name="year" type="integer" column="year"/>
<key-many-to-one name="urlStat" class="pt.estgp.estgweb.domain.UrlStat" column="relativePath"/>
</composite-id>
<discriminator column="discrimitator"/>
<timestamp name="updateDate" unsaved-value="null"/>
<property name="saveDate" type="timestamp"/>
<property name="totalClicks" type="integer"/>
<set name="months" order-by="month asc" lazy="true" cascade="all">
<key>
<column name="year"/>
<column name="relativePath"/>
</key>
<one-to-many class="pt.estgp.estgweb.domain.UrlStatMonth"/>
</set>
<subclass name="pt.estgp.estgweb.domain.UrlStatYearImpl" discriminator-value="UrlStatYearImpl"/>
</class>
</hibernate-mapping>
/impl/src/hbm/pt/estgp/estgweb/domain/UrlStatMonth.hbm.xml
New file
0,0 → 1,33
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
<hibernate-mapping>
<class name="pt.estgp.estgweb.domain.UrlStatMonth" table="urlstatmonth" abstract="true">
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta>
<meta attribute="scope-class">public abstract</meta>
<composite-id name="id" class="pt.estgp.estgweb.domain.UrlStatMonthId">
<meta attribute="scope-class">public</meta>
<key-property name="month" type="integer" column="month"/>
<key-many-to-one name="urlStatYear" class="pt.estgp.estgweb.domain.UrlStatYear">
<column name="year"/>
<column name="relativePath"/>
</key-many-to-one>
</composite-id>
<discriminator column="discrimitator"/>
<timestamp name="updateDate" unsaved-value="null"/>
<property name="saveDate" type="timestamp"/>
<property name="date" type="date"/>
<property name="totalClicks" type="integer"/>
<set name="days" order-by="day asc" lazy="true" cascade="all">
<key>
<column name="month"/>
<column name="year"/>
<column name="relativePath"/>
</key>
<one-to-many class="pt.estgp.estgweb.domain.UrlStatDay"/>
</set>
<subclass name="pt.estgp.estgweb.domain.UrlStatMonthImpl" discriminator-value="UrlStatMonthImpl"/>
</class>
</hibernate-mapping>
/impl/src/web/imgs/Thumbs.db
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/impl/src/web/imgs/minichart.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/impl/src/web/css/style.css
1,221 → 1,295
<STYLE>
BODY
/*********** Site Struture *************/
BODY *
{
PADDING-RIGHT: 0;
FONT-FAMILY: Helvetica;
FONT-SIZE:1em;
}
 
#body
{
width:950px;
margin-left: auto;
margin-right: auto;
}
 
#header
{
LEFT: 0;
WIDTH: 100%;
BACKGROUND-COLOR: white
}
 
/*#page
{
LEFT: 0;
WIDTH: 100%
} */
 
TD#leftPage
{
VERTICAL-ALIGN: top;
WIDTH: 160px;
text-align:left;
}
 
#leftPagePosition
{
CLEAR: left;
LEFT: 0;
FLOAT: left;
PADDING-BOTTOM: 20px;
PADDING-TOP: 30px;
}
 
TD#rightPage{
VERTICAL-ALIGN: top;
WIDTH: 160px;
}
 
#rightPagePosition
{
CLEAR: left;
LEFT: 0;
FLOAT: left;
PADDING-BOTTOM: 20px;
}
 
#footer
{
HEIGHT: 50px;
PADDING-TOP: 5px;
}
 
#footerStructure TABLE
{
BORDER-RIGHT: 0;
BORDER-TOP: 0;
MARGIN-TOP: 0;
PADDING-LEFT: 0;
PADDING-BOTTOM: 0;
MARGIN-LEFT: auto;
RIGHT: 0;
LEFT: 0;
MARGIN: 0;
BORDER-LEFT: 0;
MARGIN-RIGHT: auto;
WIDTH: 100%;
PADDING-TOP: 0;
BORDER-BOTTOM: 0;
TOP: 0;
border-spacing: 0
}
#footerStructure TABLE TD
{
VERTICAL-ALIGN: top
}
 
BODY *
TABLE .indexPage
{
FONT-FAMILY: Helvetica;
FONT-SIZE:1em;
width:100%;
}
/****************************Text Size*************************************************/
 
th
h1
{
font-size:14pt;
}
h2
{
font-size:12pt;
}
 
/*************************************************************************************/
 
/*****************************Portal Page Template************************************/
.portal
{
}
 
A
.header h1
{
COLOR: #793B0D
font-size:20px;
color:#FFFFFF;
background-color:#8EC73F;
padding-left:10px;
padding-right:10px;
}
 
H1
.portalContent
{
padding-left:10px;
}
 
H2
.block P
{
BORDER-RIGHT: blue 1px solid;
PADDING-RIGHT: 4px;
BORDER-TOP: blue 1px solid;
PADDING-LEFT: 4px;
FONT-WEIGHT: normal;
PADDING-BOTTOM: 2px;
MARGIN: 0;
BORDER-LEFT: blue 1px solid;
COLOR: black;
BOTTOM: 0;
PADDING-TOP: 2px;
BORDER-BOTTOM: blue 1px solid;
TEXT-ALIGN: justify
font-weight:bold;
}
H3
 
.block UL
{
BORDER-LEFT-COLOR: #1170a2;
BORDER-BOTTOM-COLOR: #1170a2;
COLOR: black;
BORDER-TOP-COLOR: #1170a2;
BORDER-RIGHT-COLOR: #1170a2
LIST-STYLE-TYPE: none;
padding:0;
}
H4
 
.block a:link
{
BORDER-LEFT-COLOR: #1170a2;
BORDER-BOTTOM-COLOR: #1170a2;
COLOR: black;
BORDER-TOP-COLOR: #1170a2;
BORDER-RIGHT-COLOR: #1170a2
color:#4d4d4d;
text-decoration:none;
}
H3
 
.block a:visited
{
BORDER-RIGHT: 1px solid;
PADDING-RIGHT: 4px;
BORDER-TOP: 1px solid;
PADDING-LEFT: 4px;
FONT-WEIGHT: normal;
PADDING-BOTTOM: 0;
MARGIN: 0;
BORDER-LEFT: 1px solid;
BOTTOM: 0;
PADDING-TOP: 0;
BORDER-BOTTOM: 1px solid;
TEXT-ALIGN: justify
color:#4d4d4d;
text-decoration:none;
}
H4
 
.block a:hover
{
BORDER-RIGHT: 1px solid;
PADDING-RIGHT: 4px;
BORDER-TOP: 1px solid;
PADDING-LEFT: 4px;
FONT-WEIGHT: normal;
PADDING-BOTTOM: 0;
MARGIN: 0;
BORDER-LEFT: 1px solid;
BOTTOM: 0;
PADDING-TOP: 0;
BORDER-BOTTOM: 1px solid;
TEXT-ALIGN: justify
color:#8EC73F;
text-decoration:underline;
}
H5
/**********************************************************************************/
 
/****************************** Standard Page Template ***************************/
.page,.pageText
{
BORDER-RIGHT: 1px solid;
PADDING-RIGHT: 4px;
BORDER-TOP: 1px solid;
PADDING-LEFT: 4px;
FONT-WEIGHT: normal;
PADDING-BOTTOM: 0;
MARGIN: 0;
BORDER-LEFT: 1px solid;
BOTTOM: 0;
PADDING-TOP: 0;
BORDER-BOTTOM: 1px solid;
TEXT-ALIGN: justify
font-size :11.5pt;
}
H1
 
.page P
{
FONT-SIZE: 20px
}
H2
 
.page h1,.pageHeader h1
{
FONT-SIZE: 17px
font-size:15pt;
}
H3
 
.page h2,.sectionTitle h2
{
FONT-SIZE: 15px
font-size:13pt;
font-weight:bold;
}
H4
 
.page h3,.sectionTitle h3
{
FONT-SIZE: 14px
font-size:10pt;
font-weight:bold;
color:#000000;
}
H5
 
.pageHeader h1
{
FONT-SIZE: 13px
color:#FFFFFF;
background-color:#8EC73F;
padding-left:10px;
padding-right:10px;
}
 
FORM
.portalContent
{
PADDING-RIGHT: 0;
PADDING-LEFT: 0;
PADDING-BOTTOM: 0;
MARGIN: 0;
PADDING-TOP: 0
}
 
.pageBlock a:hover
{
color:#8EC73F;
text-decoration :underline;
}
 
TD#title
.pageColumnTableSolid
{
PADDING-LEFT: 0.5em;
FONT-SIZE: 21px;
FONT-FAMILY: "Arial", sans-serif;
VERTICAL-ALIGN: middle;
TEXT-ALIGN: left
border:#000000 solid 1px;
}
UL
 
.listClean UL /*Lista sem nada*/
{
PADDING-LEFT: 1.5em;
MARGIN-LEFT: 0;
LIST-STYLE-TYPE: none;
padding:0;
}
LI
 
.listCircleWhite UL/*Lista circulo branco*/
{
LIST-STYLE-TYPE: circle;
}
 
/* header */
#header
.listDecimal UL/*Lista decimal*/
{
LEFT: 0;
WIDTH: 100%;
BORDER-BOTTOM: #E6731D 3px solid;
BACKGROUND-COLOR: white
LIST-STYLE-TYPE: decimal;
}
 
}
#header #title
.listDisc UL/*Lista circulo preto*/
{
COLOR: black
LIST-STYLE-TYPE: disc;
}
#header TABLE
 
.listSquare UL/*Lista quadrado preto*/
{
BORDER-RIGHT: 0;
BORDER-TOP: 0;
RIGHT: 0;
LEFT: 0;
BORDER-LEFT: 0;
WIDTH: 100%;
PADDING-TOP: 0;
BORDER-BOTTOM: 0;
TOP: 0;
border-spacing: 0
LIST-STYLE-TYPE: square;
}
#header TABLE TD
 
.pageSection
{
}
 
.sectionTitle h2
{
VERTICAL-ALIGN: middle;
TEXT-ALIGN: left
color:#000000;
}
#header IMG
 
.pageText,.pageBlock a,.pageBlock a:visited
{
BORDER-RIGHT: 0;
BORDER-TOP: 0;
BORDER-LEFT: 0;
BORDER-BOTTOM: 0
color:#4d4d4d;
text-decoration:none;
}
#header #title
/*********************************************************************************/
 
/*****************************Left Menu Style************************************/
 
#leftMenuModule LI A:link
{
PADDING-RIGHT: 0;
FONT-SIZE: 14px;
DISPLAY: block;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0;
BOTTOM: 10px;
PADDING-TOP: 0;
HEIGHT: 1%;
}
#header H1
 
#leftMenuModule LI A:visited
{
FLOAT: left;
PADDING-RIGHT: 0;
DISPLAY: block;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0;
FONT: 20px "bitstream vera sans", "Lucida Grande", "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif
PADDING-TOP: 0;
HEIGHT: 1%;
FONT-SIZE: 14px;
}
/* /header */
#bigtable
 
#leftMenuModule P
{
LEFT: 0;
WIDTH: 100%
COLOR:#8EC73F;
MARGIN: 0;
PADDING-LEFT: 5px ;
FONT-SIZE: 14px;
}
 
/* topnav */
#leftMenuModule UL
{
PADDING-RIGHT: 0;
PADDING-LEFT: 0;
MARGIN: 0;
WIDTH: 155px;
LINE-HEIGHT: 1.5em;
}
 
#leftMenuModule LI
{
COLOR:#8EC73F;
FONT-SIZE: 14px;
LIST-STYLE-TYPE: none;
}
/**********************************************************************************/
 
/****************** topnav **********************
 
#topnav
{
BACKGROUND-COLOR: #FDE1CD;
250,242 → 324,319
MARGIN: 0;
PADDING-TOP: 0
}
/* /topnav */
*****************************************************************************************/
 
/* latnav */
/************************************** Content Structure ********************************/
 
TD#latnav_containerLeft,TD#latnav_containerRight
#content1,#content2,#content3,#content4
{
BACKGROUND-COLOR: #F3B689;
BORDER-RIGHT-COLOR: #ccc;
LEFT: 0;
RIGHT: 0;
WIDTH: 100%;
BORDER-LEFT-COLOR: #002244;
BORDER-BOTTOM-COLOR: #002244;
BORDER-TOP-COLOR: #002244;
BORDER-RIGHT-COLOR: #002244;
BORDER-RIGHT: 1px solid;
BORDER-TOP: 1px solid;
PADDING-BOTTOM: 10px;
VERTICAL-ALIGN: top;
WIDTH: 160px;
BORDER-LEFT: 1px solid;
BORDER-BOTTOM: 1px solid
}
#latnavLeft,#latnavRight
 
 
/*****************************************************************************************/
 
/************************************* Footer Modules ***********************************/
 
#license UL
{
CLEAR: left;
LEFT: 0;
FLOAT: left;
PADDING-BOTTOM: 20px;
FONT: 11px/20px "bitstream vera sans", "Lucida Grande", "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif
}
#latnavLeft P,#latnavRight P
{
COLOR: #4D4D4D;
PADDING-RIGHT: 0;
PADDING-LEFT: 0;
FONT-SIZE: 12px;
BORDER-BOTTOM-COLOR: #003366;
COLOR: #793B0D;
PADDING-RIGHT: 0;
PADDING-LEFT: 5px;
PADDING-BOTTOM: 0;
TEXT-ALIGN: center;
MARGIN: 0;
WIDTH: 97%;
PADDING-TOP: 0;
BORDER-BOTTOM: 2px solid
LIST-STYLE-TYPE: none;
}
 
#latnavLeft UL,#latnavRight UL
#footer #organizations
{
COLOR: black;
PADDING-RIGHT: 0;
PADDING-LEFT: 0;
PADDING-BOTTOM: 10px;
MARGIN: 0;
WIDTH: 155px;
LINE-HEIGHT: 1.5em;
PADDING-TOP: 0;
LIST-STYLE-TYPE: none
}
 
#latnavLeft LI,#latnavRight LI
#footer #sponsors
{
PADDING-RIGHT: 0;
DISPLAY: inline;
PADDING-LEFT: 0;
PADDING-BOTTOM: 0;
MARGIN: 0;
PADDING-TOP: 0
}
#latnavLeft LI A:link,#latnavRight LI A:link
 
/**************************************************************************************/
 
/******************************** Bar Module Color ************************************/
TD #topBar
{
BORDER-BOTTOM-COLOR: #003366;
COLOR: #793B0D;
PADDING-RIGHT: 0;
DISPLAY: block;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0;
PADDING-TOP: 0;
BORDER-BOTTOM: 1px solid;
HEIGHT: 1%;
TEXT-DECORATION: none
font-weight:bold;
color:white;
background-color:#8EC73F;
padding-left:10px;
FONT-SIZE: 18px
}
#latnavLeft LI A:hover,#latnavRight LI A:hover
/**************************************************************************************/
 
/******************************** Background Color ************************************/
/*Gray background*/
#backOne
{
COLOR: #793B0D;
BACKGROUND-COLOR: #ffffcc
background-color:#4D4D4D;
}
#latnavLeft LI A:visited,#latnavRight LI A:visited
/**************************************************************************************/
 
/********************************* Link Types Color************************************/
 
/*Gray to green */
#linkTypeOne LI A:link
{
PADDING-RIGHT: 0;
DISPLAY: block;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0;
PADDING-TOP: 0;
BORDER-BOTTOM: 1px solid;
HEIGHT: 1%;
TEXT-DECORATION: none
COLOR:#4D4D4D;
TEXT-DECORATION: none;
}
#latnavLeft A,#latnavRight A
 
#linkTypeOne UL LI A:hover
{
PADDING-LEFT: 5px
COLOR:#8EC73F;
TEXT-DECORATION: none;
}
/* /latnav */
 
/* Content */
#content
#linkTypeOne LI A:visited
{
BORDER-LEFT-COLOR: #002244;
BORDER-BOTTOM-COLOR: #002244;
COLOR: black;
BORDER-TOP-COLOR: #002244;
BACKGROUND-COLOR: white;
BORDER-RIGHT-COLOR: #002244
COLOR:#4D4D4D;
TEXT-DECORATION: none;
}
 
#contentBoard
/*Gray to green underline*/
.linkTypeTwo li a:hover
{
BORDER-COLLAPSE: collapse
text-decoration: underline;
color:#8EC73F;
list-style:none;
}
#contentBoard
 
.linkTypeTwo a:link
{
PADDING-RIGHT: 0.5em;
PADDING-LEFT: 0.5em;
PADDING-BOTTOM: 0.5em;
PADDING-TOP: 0.5em
text-decoration: none;
color:#4D4D4D;
list-style:none;
}
#content
 
.linkTypeTwo a:visited
{
BORDER-RIGHT: 1px solid;
PADDING-RIGHT: 10px;
BORDER-TOP: 1px solid;
PADDING-LEFT: 10px;
RIGHT: 0;
LEFT: 0;
PADDING-BOTTOM: 10px;
VERTICAL-ALIGN: top;
BORDER-LEFT: 1px solid;
PADDING-TOP: 10px;
BORDER-BOTTOM: 1px solid
text-decoration: none;
color:#4D4D4D;
list-style:none;
}
#content P
 
/*Green to green underline*/
.linkTypeThree a:hover
{
PADDING-TOP: 10px;
TEXT-ALIGN: justify
text-decoration: underline;
color:#8EC73F;
list-style:none;
}
/* /Content */
 
/* Footer */
.linkTypeThree a:link
{
text-decoration: none;
color:#8EC73F;
list-style:none;
}
 
* HTML #footer
.linkTypeThree a:visited
{
HEIGHT: 50px;
text-decoration: none;
color:#4D4D4D;
list-style:none;
}
#footer
 
/*Gray underline to green underline*/
#linkTypeFour A:link
{
COLOR: black;
BORDER-TOP-COLOR: black;
BACKGROUND-COLOR: white;
BORDER-TOP: 2px solid;
PADDING-LEFT: 5px;
FONT-SIZE: 0.9em;
LEFT: 0;
PADDING-TOP: 5px;
HEIGHT: 50px;
COLOR:#4D4D4D;
list-style:none;
}
#footer IMG
 
#linkTypeFour A:hover
{
BORDER-RIGHT: 0;
BORDER-TOP: 0;
BORDER-LEFT: 0;
BORDER-BOTTOM: 0;
HEIGHT: 60px;
list-style:none;
COLOR:#8EC73F;
}
#footer #license UL
 
#linkTypeFour A:visited
{
CLEAR: both;
PADDING-RIGHT: 0;
PADDING-LEFT: 0;
FONT-SIZE: 0.8em;
PADDING-BOTTOM: 0;
MARGIN: 0;
LIST-STYLE-TYPE: none;
TEXT-ALIGN: center
list-style:none;
COLOR:#4D4D4D;
}
#footer #organizations
 
/*White to White underline*/
.linkTypeFive a:hover
{
text-decoration: underline;
color:#FFFFFF;
list-style:none;
}
#footer #sponsors
 
.linkTypeFive a:link
{
text-decoration: none;
color:#FFFFFF;
list-style:none;
}
#footer TABLE
 
.linkTypeFive a:visited
{
BORDER-RIGHT: 0;
BORDER-TOP: 0;
RIGHT: 0;
LEFT: 0;
MARGIN: 0;
BORDER-LEFT: 0;
WIDTH: 100%;
PADDING-TOP: 0;
BORDER-BOTTOM: 0;
TOP: 0;
border-spacing: 0
text-decoration: none;
color:#FFFFFF;
list-style:none;
}
#footer TABLE TD
 
/*Gray*/
.linkTypeSix a:hover
{
VERTICAL-ALIGN: top
color:#4D4D4D;
list-style:none;
}
/* /Fotter */
 
/*BOXES*/
.linkTypeSix a:link
{
text-decoration: none;
color:#4D4D4D;
list-style:none;
}
 
.box
.linkTypeSix a:visited
{
border:0;
margin:0;
padding:0;
text-decoration: none;
color:#4D4D4D;
list-style:none;
}
.box th
 
/*Green*/
.linkTypeSeven a:hover
{
color:#8EC73F;
list-style:none;
}
 
margin:0;
padding-left:10px;
padding-top:3px;
padding-bottom:3px;
padding-right:15px;
color:#793B0D;
background-color: #FFD8BB;
border: 1px solid #793B0D;
font-weight: bold;
.linkTypeSeven a:link
{
text-decoration: none;
color:#8EC73F;
list-style:none;
}
 
.linkTypeSeven a:visited
{
text-decoration: none;
color:#8EC73F;
list-style:none;
}
.box td
 
/*White*/
.linkTypeHeight a:hover
{
margin:0;
padding-left:15px;
color:#FFFFFF;
list-style:none;
}
 
.linkTypeHeight a:link
{
text-decoration: none;
color:#FFFFFF;
list-style:none;
}
 
.linkTypeHeight a:visited
{
text-decoration: none;
color:#FFFFFF;
list-style:none;
}
 
/*Gray Underline*/
.linkTypeNine a:hover
{
text-decoration: underline;
color:#4D4D4D;
list-style:none;
}
 
.linkTypeNine a:link
{
text-decoration: underline;
color:#4D4D4D;
list-style:none;
}
 
.linkTypeNine a:visited
{
text-decoration: underline;
color:#4D4D4D;
list-style:none;
}
 
/*Green Underline*/
.linkTypeTen a:hover
{
text-decoration: underline;
color:#8EC73F;
list-style:none;
}
 
.linkTypeTen a:link
{
text-decoration: underline;
color:#8EC73F;
list-style:none;
}
 
.linkTypeTen a:visited
{
text-decoration: underline;
color:#8EC73F;
list-style:none;
}
 
/**************************************************************************************/
 
/*************************Staff Links Structure***************************************/
.staffLinks P
{
font-weight :bold;
}
/*************************************************************************************/
 
/************************Announcements Structure*********************************/
 
.lastAnnouncementsModule td
{
padding-top:3px;
padding-bottom:3px;
padding-right:15px;
color:#793B0D;
background-color: #FFD8BB;
border: 1px solid #793B0D;
text-align: left;
}
.box td ul
.lastAnnouncementsModule td ul
{
list-style:none;
padding:0;
padding-left:5px;
WIDTH: 155px;
}
 
.padLeft10
{
padding-left:10px;
}
.topSpace
{
padding-Top :10px;
}
/**********************************************************************************/
 
.form , .boxHorizontal
{
648,5 → 799,141
color:lightblue;
}
 
/********************************************** Navigation Menu ********************************/
ul.menubar{
margin: 0px;
padding: 0px;
background-color: #FFFFFF; /* IE6 Bug */
font-size: 100%;
 
}
.submenu
{
font: bold 16px sans;
}
 
.menu
{
font: normal 14px sans;
}
 
ul.menubar .submenu{
margin: 0px;
padding: 0px;
list-style: none;
background-color: #FFFFFF;
float:left;
}
 
ul.menubar ul.menu{
display: none;
position: absolute;
margin: 0px;
}
 
ul.menubar a{
padding: 5px;
display:block;
text-decoration: none;
color: #4D4D4D;
padding: 5px;
}
 
ul.menubar a:hover{
padding: 5px;
display:block;
text-decoration: none;
color: #4D4D4D;
padding: 5px;
}
 
.menu a:hover{
padding: 5px;
display:block;
/* border-left: none;
border-right: none;
border-top: none;
border-bottom: none; */
padding: 5px;
}
 
ul.menu, ul.menu ul{
margin: 0;
padding: 2px;
/* border-left: 1px solid #ccc;
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
border-right: 1px solid #ccc; */
background-color: #FFFFFF; /* IE6 Bug */
}
 
ul.menu li{
position: relative;
list-style: none;
/*border: 0px;*/
background-color: #4D4D4D;
width:250px;
}
 
ul.menu li a{
display: block;
text-decoration: none;
/* border-bottom: 0px;*/
/*color: #4D4D4D;*/
/* background-color: #FFFFFF; */
color: #4d4d4d;
background-color: #CCCCCC;
padding: 5px 10px 5px 5px;
}
 
/*
.shadow UL{
background-color: #666;
color: inherit;
position: relative;
padding-left:1px;
padding-top :0px;
padding-bottom:2px;
padding-right:2px;
}
*/
.shadow UL
{
background :transparent;
width:250px;
color: inherit;
}
 
ul.menu li sup{
font-weight:bold;
font-size:7px;
color: red;
}
 
/* Fix IE. Hide from IE Mac \*/
* html ul.menu li { float: left; height: 1%; }
* html ul.menu li a { height: 1%; }
/* End */
 
ul.menu ul{
position: absolute;
display: none;
left: 149px; /* Set 1px less than menu width */
top: 0px;
}
 
ul.menu li.submenu ul
{
display: none;
} /* Hide sub-menus initially */
 
ul.menu li a:hover
{
background-color: #8EC73F;
color: #FFFFFF;
text-decoration :underline;
}
 
/***********************************************************************************************/
 
</STYLE>
/impl/src/web/layout/navigationMenu.jsp
File deleted
\ No newline at end of file
/impl/src/web/layout/header.jsp
9,43 → 9,10
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<%
String lang = request.getParameter("language");
if (lang != null)
{
UserSessionImpl userSession = (UserSessionImpl) UserSessionProxy.loadUserSession(request);
request.setAttribute(pt.estgp.estgweb.Globals.USER_SESSION_KEY,userSession);
Locale l = new Locale(lang);
userSession.put(Globals.LOCALE_KEY, l);
try
{
userSession.serialize(request);
}
catch (Throwable throwable)
{
throwable.printStackTrace();
((HttpServletResponse)response).sendError(500);
}
request.getSession().setAttribute(Globals.LOCALE_KEY, l);
}
%>
 
<table width="100%">
<tr>
<td>
<!--<a href="http://www.estgp.com" border="0">--><img src="<%=request.getContextPath()%>/imgs/top.jpg"/><!--</a>-->
<img src="<%=request.getContextPath()%>/imgs/top.jpg"/>
</td>
<!-- <td>
<h1><bean:message key="site.title"/></h1>
</td>
<td>
<div class="small" align="right" style="padding-right:6px">
<logic:present name="USER_SESSION_KEY">
<logic:present name="USER_SESSION_KEY" property="username">
<bean:write name="USER_SESSION_KEY" property="username"/>
</logic:present>
</logic:present>
</div>
</td>-->
</tr>
</table>
/impl/src/web/layout/navigationRight.jsp
5,8 → 5,7
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<div id="latnavRight">
<p>Avisos</p>
<div id="rightPagePosition">
<jsp:include page="/public/announcements/announcements.jsp"/>
 
/impl/src/web/layout/footer.jsp
6,6 → 6,7
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
 
<div id="footerStructure">
<table>
<tr>
<td width="33%">
14,7 → 15,7
</td>
<td align="center" width="33%">
<div id="license">
<ul>
<ul id="linkTypeFour">
<li>Copyright © <a href="http://www.estgp.com">ESTG</a> 2008</li>
<!--<li>Contact ESTG Webmaster at (webmaster [AT] estgp [DOT] pt)</li>-->
</ul>
25,4 → 26,5
</div>
</td>
</tr>
</table>
</table>
</div>
/impl/src/web/layout/layout1.jsp
9,26 → 9,49
<head>
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/> <%=request.getParameter("title")%></title>
<jsp:include page="/layout/scripts.jsp"/>
<script type="text/javascript">
function horizontal() {
 
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li");
 
for (var i=0; i< navItems.length; i++) {
if(navItems[i].className == "submenu")
{
if(navItems[i].getElementsByTagName('ul')[0] != null)
{
navItems[i].onmouseover=function() {
this.getElementsByTagName('ul')[0].style.display="block";}
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";}
}
}
}
 
}
</script>
</head>
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0">
<div id="header">
<tiles:insert attribute="header"/>
<tiles:insert attribute="navigationMenu"/>
</div>
<table id="bigtable">
<tr>
<td id="latnav_containerLeft">
<tiles:insert attribute="navigation" />
</td>
<td id="content">
<tiles:insert attribute="topnav"/>
<tiles:insert attribute="body" />
</td>
</tr>
</table>
<div id="footer">
<tiles:insert attribute="footer"/>
</div>
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();">
<div id="body">
<div id="header">
<tiles:insert attribute="header"/>
</div>
<table >
<tr>
<td colspan="2"><tiles:insert attribute="navigationTop"/></td>
</tr>
<tr>
<td id="leftPage">
<tiles:insert attribute="navigation" />
</td>
<td>
<tiles:insert attribute="topnav"/>
<tiles:insert attribute="body" />
</td>
</tr>
</table>
<div id="footer">
<tiles:insert attribute="footer"/>
</div>
</div>
</body>
</html:html>
 
/impl/src/web/layout/layout2.jsp
9,23 → 9,46
<head>
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/></title>
<jsp:include page="/layout/scripts.jsp"/>
<script type="text/javascript">
function horizontal() {
 
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li");
 
for (var i=0; i< navItems.length; i++) {
if(navItems[i].className == "submenu")
{
if(navItems[i].getElementsByTagName('ul')[0] != null)
{
navItems[i].onmouseover=function() {
this.getElementsByTagName('ul')[0].style.display="block";}
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";}
}
}
}
 
}
</script>
</head>
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0">
<div id="header">
<tiles:insert attribute="header"/>
<tiles:insert attribute="navigationMenu"/>
</div>
<table id="bigtable">
<tr>
<td id="content">
<tiles:insert attribute="topnav"/>
<tiles:insert attribute="body" />
</td>
</tr>
</table>
<div id="footer">
<tiles:insert attribute="footer"/>
</div>
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();">
<div id="body">
<div id="header">
<tiles:insert attribute="header"/>
</div>
<table id="page">
<tr>
<td><tiles:insert attribute="navigationTop"/></td>
</tr>
<tr>
<td id="content2">
<tiles:insert attribute="topnav"/>
<tiles:insert attribute="body" />
</td>
</tr>
</table>
<div id="footer">
<tiles:insert attribute="footer"/>
</div>
</div>
</body>
</html:html>
 
/impl/src/web/layout/navigationLeftMenu.jsp
New file
0,0 → 1,38
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 14/Mar/2008
Time: 16:50:15
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
 
<div id="leftMenuModule">
<div id="linkTypeOne">
<ul>
<li>
<a href="http://www.estgp.pt/Alunos/HomeAlunos.asp">Alunos</a>
</li>
<li>
<html:link action="/StaffPage"><bean:message key="staff"/></html:link>
</li>
<li>
<a href="http://www.estgp.pt/Alunos/HomeAlunos.asp">Futuros Alunos</a>
</li>
<li>
<a href="http://www.estgp.pt/Alunos/HomeAlunos.asp">Antigos Alunos</a>
</li>
<li>
<a href="http://www.estgp.pt/Alunos/HomeAlunos.asp">Alunos Internacionais</a>
</li>
<li>
<a href="http://www.estgp.pt/Alunos/HomeAlunos.asp">Comunicação Social</a>
</li>
</ul>
</div>
</div>
/impl/src/web/layout/layout3.jsp
9,26 → 9,49
<head>
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/></title>
<jsp:include page="/layout/scripts.jsp"/>
<script type="text/javascript">
function horizontal() {
 
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li");
 
for (var i=0; i< navItems.length; i++) {
if(navItems[i].className == "submenu")
{
if(navItems[i].getElementsByTagName('ul')[0] != null)
{
navItems[i].onmouseover=function() {
this.getElementsByTagName('ul')[0].style.display="block";}
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";}
}
}
}
 
}
</script>
</head>
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0">
<div id="header">
<tiles:insert attribute="header"/>
<tiles:insert attribute="navigationMenu"/>
</div>
<table id="bigtable">
<tr>
<td id="content">
<tiles:insert attribute="topnav"/>
<tiles:insert attribute="body" />
</td>
<td id="latnav_containerRight">
<tiles:insert attribute="navigation" />
</td>
</tr>
</table>
<div id="footer">
<tiles:insert attribute="footer"/>
</div>
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();">
<div id="body">
<div id="header">
<tiles:insert attribute="header"/>
</div>
<table id="page">
<tr>
<td colspan="2"><tiles:insert attribute="navigationTop"/></td>
</tr>
<tr>
<td id="content3">
<tiles:insert attribute="topnav"/>
<tiles:insert attribute="body" />
</td>
<td id="rightPage">
<tiles:insert attribute="navigation" />
</td>
</tr>
</table>
<div id="footer">
<tiles:insert attribute="footer"/>
</div>
</div>
</body>
</html:html>
 
/impl/src/web/layout/layout4.jsp
9,29 → 9,54
<head>
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/></title>
<jsp:include page="/layout/scripts.jsp"/>
<script type="text/javascript">
function horizontal() {
 
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li");
 
for (var i=0; i< navItems.length; i++) {
if(navItems[i].className == "submenu")
{
if(navItems[i].getElementsByTagName('ul')[0] != null)
{
navItems[i].onmouseover=function() {
this.getElementsByTagName('ul')[0].style.display="block";}
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";}
}
}
}
 
}
</script>
</head>
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0">
<div id="header">
<tiles:insert attribute="header"/>
<tiles:insert attribute="navigationMenu"/>
 
 
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();">
<div id="body">
<div id="header">
<tiles:insert attribute="header"/>
</div>
<table id="page">
<tr>
<td colspan="3"><tiles:insert attribute="navigationTop"/></td>
</tr>
<tr>
<td id="leftPage">
<tiles:insert attribute="navigationLeft" />
</td>
<td id="content4">
<tiles:insert attribute="topnav"/>
<tiles:insert attribute="body" />
</td>
<td id="rightPage">
<tiles:insert attribute="navigationRight"/>
</td>
</tr>
</table>
<div id="footer">
<tiles:insert attribute="footer"/>
</div>
</div>
<table id="bigtable">
<tr>
<td id="latnav_containerLeft">
<tiles:insert attribute="navigationLeft" />
</td>
<td id="content">
<tiles:insert attribute="topnav"/>
<tiles:insert attribute="body" />
</td>
<td id="latnav_containerRight">
<tiles:insert attribute="navigationRight"/>
</td>
</tr>
</table>
<div id="footer">
<tiles:insert attribute="footer"/>
</div>
</body>
</html:html>
 
/impl/src/web/layout/navigationLeft.jsp
6,51 → 6,35
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %>
 
<div id="latnavLeft">
<div id="leftPagePosition">
<%--ANONIMOUS MENUS--%>
<jsp:include page="/layout/navigationLeftAdmin.jsp"/>
<jsp:include page="/layout/navigationLeftMenu.jsp"/>
 
<%--ANONIMOUS MENUS--%>
<jsp:include page="/layout/navigationTop.jsp"/>
<%-- USER MENUS--%>
<div id="leftMenuModule">
<div id="linkTypeOne">
<estgweb:isAuthenticated>
 
<%--SUPER USER MENUS--%>
<estgweb:isSuperUser>
<p><bean:message key="superuser"/></p>
<ul>
<li>
TESTE
</li>
</ul>
</estgweb:isSuperUser>
<%--SERVICES--%>
<ul>
<p><bean:message key="services"/></p>
<li>
<html:link action="/startSubmitAnnouncement"><bean:message key="submit.announcement"/></html:link>
</li>
 
<%--ADMIN USER MENUS--%>
<estgweb:isAdmin>
<p><bean:message key="administration"/></p>
<ul>
<li>
TESTE
</li>
</ul>
</estgweb:isAdmin>
 
<%-- USER MENUS--%>
<estgweb:isAuthenticated>
<%--SERVICES--%>
<p><bean:message key="services"/></p>
<ul>
<li>
<html:link action="/startSubmitAnnouncement"><bean:message key="submit.announcement"/></html:link>
</li>
</ul>
<!--OTHER PLACES-->
<p><bean:message key="Others"/></p>
<ul>
<li>
<html:link action="/user/startCourses"><bean:message key="courses"/></html:link>
</li>
<li>
<a href="<%=request.getContextPath()%>/proxy/layout4/estgp/">ESTG SITE TESTE</a>
</li>
</ul>
</estgweb:isAuthenticated>
<!--OTHER PLACES-->
<p><bean:message key="Others"/></p>
<li>
<html:link action="/user/startCourses"><bean:message key="courses"/></html:link>
</li>
<li>
<a href="<%=request.getContextPath()%>/proxy/layout4/estgp/">ESTG SITE TESTE</a>
</li>
</ul>
</estgweb:isAuthenticated>
</div>
</div>
</div>
 
 
/impl/src/web/layout/navigationCourse.jsp
9,7 → 9,7
 
<div id="latnavLeft">
 
<jsp:include page="/layout/navigationTop.jsp"/>
<jsp:include page="/layout/navigationLeftAdmin.jsp"/>
 
<p><bean:message key="courses"/></p>
<ul>
/impl/src/web/layout/navigationTop.jsp
1,28 → 1,78
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 13/Mar/2008
Time: 15:28:29
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %>
<ul>
<li>
<html:link action="/Welcome"><bean:message key="Home"/></html:link>
</li>
 
<estgweb:isNotAuthenticated>
<li>
<html:link action="/StartAuthentication"><bean:message key="authenticate"/></html:link>
</li>
</estgweb:isNotAuthenticated>
<div>
<ul id="menu_dropdown" class="menubar">
<li class="submenu"><a href="#">Apresentação</a>
<div class="shadow ">
<ul class="menu">
<li><a href="#">Mensagem do Presidente</a></li>
<li><a href="#">A ESTG e a sua missão</a></li>
<li><a href="#">História</a></li>
<li><a href="#">Localização</a></li>
<li><a href="#">Factos e números</a></li>
<li><a href="#">A ESTG em Fotografias</a></li>
</ul>
</div>
</li>
<li class="submenu"><a href="#">Organização</a>
<div class="shadow ">
<ul class="menu">
<li><a href="#">Assembleia de Representantes</a></li>
<li><a href="#">Conselho Directivo</a></li>
<li><a href="#">Conselho Ciêntifico</a></li>
<li><a href="#">Conselho Pedagógico</a></li>
</ul>
</div>
</li>
<li class="submenu"><a href="#">Áreas</a>
<div class="shadow ">
<ul class="menu">
<li><a href="#">Engenharias</a></li>
<li><a href="#">Ciências Empresariais</a></li>
<li><a href="#">Ciências Humanas</a></li>
<li><a href="#">Design</a></li>
</ul>
</div>
</li>
<li class="submenu"><a href="#">Ensino</a>
<div class="shadow ">
<ul class="menu">
<li><a href="#">Cursos</a></li>
<li><a href="#">Mestrados</a></li>
<li><a href="#">Pós Graduações</a></li>
<li><a href="#">Cet´s</a></li>
<li><a href="#">Formação TIC</a></li>
<li><a href="#">Formação CTOC</a></li>
<li><a href="#">Acções de Formação de Curta Duração</a></li>
</ul>
</div>
</li>
<li class="submenu"><a href="#">I&D</a>
<div class="shadow ">
<ul class="menu">
<li><a href="#">OTIC-INOVAA</a></li>
<li><a href="#">POLIEMPRIENDE</a></li>
<li><a href="#">Gab. Empreendedorismo</a></li>
<li><a href="#">SGQ</a></li>
<li><a href="#">Protocolos com o Exterior</a></li>
<li><a href="#">LAQI Lab. Anal. Qui. e Industriais</a></li>
</ul>
</div>
</li>
</ul>
<estgweb:pageUrlStat><img src="<%=request.getContextPath()%>/imgs/minichart.gif"></estgweb:pageUrlStat>
</div>
 
 
<estgweb:isAuthenticated>
<li>
<html:link action="/Logout"><bean:message key="logout"/></html:link>
</li>
</estgweb:isAuthenticated>
 
</ul>
 
 
/impl/src/web/layout/navigationLeftAdmin.jsp
New file
0,0 → 1,30
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %>
<div id="leftMenuModule">
<div id="linkTypeOne">
<ul>
<li>
<html:link action="/Welcome"><bean:message key="Home"/></html:link>
</li>
 
<estgweb:isNotAuthenticated>
<li>
<html:link action="/StartAuthentication"><bean:message key="authenticate"/></html:link>
</li>
</estgweb:isNotAuthenticated>
 
 
<estgweb:isAuthenticated>
<li>
<html:link action="/Logout"><bean:message key="logout"/></html:link>
</li>
</estgweb:isAuthenticated>
</ul>
</div>
</div>
 
/impl/src/web/public/index.jsp
1,10 → 1,109
<%@ page import="java.util.Locale" %>
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %>
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %>
<%@ page import="pt.estgp.estgweb.domain.views.AnnouncementView" %>
<%@ page import="java.util.List" %>
<%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %>
<%@page language="java" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
 
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%
IServiceManager sm = ServiceManager.getInstance();
String[] names = new String[]{};
Object[] args = new Object[]{};
List<AnnouncementView> announcementViews = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request), "LoadTargetMaxAnnouncements", args, names);
request.setAttribute("Announcements", announcementViews);
%>
<jomm:messages/>
<html:errors/>
 
Benvindos ao site da ESTG
<table class="indexPage" style=" border-collapse: collapse;">
<tr>
<td id="topBar" colspan="2">
<bean:message key="mainAnnouncements"/>
</td>
</tr>
<tr>
<td class="topSpace" colspan="2">
 
</td>
</tr>
<tr id="backOne">
<td style="vertical-align:top; width :100%;">
<div class="padLeft10">
<logic:iterate length="1" id="item" name="Announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView">
<logic:equal value="top.flash.news" name="item" property="type">
<div class="linkTypeSeven" style="font-weight :bold ;">
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link>
</div>
<div class="linkTypeHeight" style="padding-top :10px;">
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.text}</html:link>
</div>
</logic:equal>
</logic:iterate>
</div>
</td>
<td style="text-align :right;">
<img src="<%=request.getContextPath()%>/imgs/destaque_1.jpg"/>
</td>
</tr>
</table>
 
<div class="topSpace">
<table class="indexPage" style=" border-top-style: dotted; border-top-color:#DEDEDD;">
<tr>
<div class="padLeft10">
<logic:iterate length="2" id="item" name="Announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView">
<logic:equal value="bottom.flash.news" name="item" property="type">
<td>
<img src="<%=request.getContextPath()%>/imgs/destaque_2_1.jpg"/>
</td>
<td style="vertical-align:top; width :200px;">
<div class="linkTypeSeven" style="font-weight :bold;padding-left :5px;">
 
</div>
<div class="linkTypeSix" style="padding-left :5px;">
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.text}</html:link>
</div>
</td>
</logic:equal>
</logic:iterate>
</div>
</tr>
</table>
</div>
 
<div class="topSpace">
<table class="indexPage">
<tr>
<div class="padLeft10">
<logic:iterate length="5" id="item" name="Announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView">
<logic:equal value="news" name="item" property="type">
<td style=" width :200px;">
<img src="<%=request.getContextPath()%>/imgs/destaque_3_3.gif"/>
</td>
</logic:equal>
</logic:iterate>
</div>
</tr>
<tr>
<div class="padLeft10">
<logic:iterate length="5" id="item" name="Announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView">
<logic:equal value="news" name="item" property="type">
<td style="vertical-align:top; width :200px;">
<div class="linkTypeTen" style="font-weight :bold;padding-left :10px; padding-right:5px;">
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link>
</div>
<div class="linkTypeNine" style="padding-left :10px; padding-right:5px;">
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.text}</html:link>
</div>
</td>
</logic:equal>
</logic:iterate>
</div>
</tr>
</table>
</div>
 
/impl/src/web/public/staff/organization.jsp
New file
0,0 → 1,25
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 18/Mar/2008
Time: 15:04:44
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jomm:messages/>
<html:errors/>
 
<div class="staffLinks">
<p>Orgãos</p>
<ul class="linkeTypeTwo">
<li><a href="#">Conselho Pedagógico</a></li>
<li><a href="#">Conselho Ciêntifico</a></li>
<li><a href="#">Conselho Directivo</a></li>
<li><a href="#">Assembleia de Representantes</a></li>
</ul>
</div>
/impl/src/web/public/staff/index.jsp
New file
0,0 → 1,112
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 18/Mar/2008
Time: 12:26:11
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jomm:messages/>
<html:errors/>
<div class="portal">
<div class="header">
<h1><bean:message key="staff.header"/></h1>
</div>
 
<div class="portalContent">
<div class="header">
<img src="<%=request.getContextPath()%>/imgs/docente.gif"/>
</div>
<table class="columnTable">
<tbody>
<tr>
<td class="column" width="50%">
<div class="block">
<p>Serviços On-line</p>
<ul>
<li><a href="#">WEBmail</a></li>
<li><a href="#">Eduroam</a></li>
<li><a href="#">Secretaria</a></li>
<li><a href="#">In-Estg</a></li>
<li><a href="#">Biblioteca Online</a></li>
<li><a href="#">N.zero</a></li>
<li><a href="#">Académicos Online</a></li>
<li><a href="#">Portal de Assiduidade</a></li>
<li><a href="#">Sisgom-Ocorrências</a></li>
<li><a href="#">Siadap</a></li>
</ul>
</div>
<div class="block">
<p>Contactos</p>
<ul>
<li><a href="#">Contactos Gerais Estg</a></li>
<li><a href="#">Áreas Cientificas</a></li>
<li><a href="#">Secretaria</a></li>
<li><a href="#">Centro Informatico</a></li>
<li><a href="#">Reprografia</a></li>
<li><a href="#">Docentes</a></li>
</ul>
</div>
<div class="block">
 
<p>Informação Académica</p>
<ul>
<li><a href="#">Calendário Escolar</a></li>
<li><a href="#">Licenciaturas</a></li>
<li><a href="#">Mestrados</a></li>
<li><a href="#">Pós-Graduações</a></li>
<li><a href="#">Cet´s</a></li>
</ul>
</div>
</td>
<td class="column" width="50%">
<div class="block">
<p>Mobilidade</p>
<ul>
<li><a href="#">Os Docentes Estrangeiros na Estg</a></li>
<li><a href="#">Os Docentes da Estg no Estrangeiro</a></li>
<li><a href="#">Protocolos Internacionais</a></li>
<li><a href="#">Candidaturas</a></li>
<li><a href="#">Programa Erasmus</a></li>
</ul>
</div>
<div class="block">
<p>Acção Social</p>
<ul>
<li><a href="#">Cantinas</a></li>
<li><a href="#">Residências</a></li>
<li><a href="#">Ementas</a></li>
<li><a href="#">Desporto e Cultura</a></li>
<li><a href="#">Apoio Psicopedagógico</a></li>
</ul>
</div>
<div class="block">
<p>Orgãos</p>
<ul>
<li><a href="#">Conselho Pedagógico</a></li>
<li><a href="#">Conselho Ciêntifico</a></li>
<li><a href="#">Conselho Directivo</a></li>
<li><a href="#">Assembleia de Representantes</a></li>
</ul>
</div>
<div class="block">
<p>Instituto Politécnico</p>
<ul>
<li><a href="#">Serviços Centrais</a></li>
<li><a href="#">Loja do Aluno</a></li>
<li><a href="#">Merchandising</a></li>
<li><a href="#">Cultura e Lazer</a></li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
 
/impl/src/web/public/staff/school.jsp
New file
0,0 → 1,25
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 18/Mar/2008
Time: 15:06:59
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jomm:messages/>
<html:errors/>
 
<div class="staffLinks">
<p>Instituto Politécnico</p>
<ul class="linkeTypeTwo">
<li><a href="#">Serviços Centrais</a></li>
<li><a href="#">Loja do Aluno</a></li>
<li><a href="#">Merchandising</a></li>
<li><a href="#">Cultura e Lazer</a></li>
</ul>
</div>
/impl/src/web/public/staff/onLineServices.jsp
New file
0,0 → 1,31
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 18/Mar/2008
Time: 14:21:43
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jomm:messages/>
<html:errors/>
 
<div class="staffLinks">
<p>Serviços On-line</p>
<ul class="linkeTypeTwo">
<li><a href="#">WEBmail</a></li>
<li><a href="#">Eduroam</a></li>
<li><a href="#">Secretaria</a></li>
<li><a href="#">In-Estg</a></li>
<li><a href="#">Biblioteca Online</a></li>
<li><a href="#">N.zero</a></li>
<li><a href="#">Académicos Online</a></li>
<li><a href="#">Portal de Assiduidade</a></li>
<li><a href="#">Sisgom-Ocorrências</a></li>
<li><a href="#">Siadap</a></li>
</ul>
</div>
/impl/src/web/public/staff/socialAction.jsp
New file
0,0 → 1,26
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 18/Mar/2008
Time: 14:53:29
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jomm:messages/>
<html:errors/>
 
<div class="staffLinks">
<p>Acção Social</p>
<ul class="linkeTypeTwo">
<li><a href="#">Cantinas</a></li>
<li><a href="#">Residências</a></li>
<li><a href="#">Ementas</a></li>
<li><a href="#">Desporto e Cultura</a></li>
<li><a href="#">Apoio Psicopedagógico</a></li>
</ul>
</div>
/impl/src/web/public/staff/academicInformation.jsp
New file
0,0 → 1,26
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 18/Mar/2008
Time: 14:49:03
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jomm:messages/>
<html:errors/>
 
<div class="staffLinks">
<p>Informação Académica</p>
<ul class="linkeTypeTwo">
<li><a href="#">Calendário Escolar</a></li>
<li><a href="#">Licenciaturas</a></li>
<li><a href="#">Mestrados</a></li>
<li><a href="#">Pós-Graduações</a></li>
<li><a href="#">Cet´s</a></li>
</ul>
</div>
/impl/src/web/public/staff/internationalRelationships.jsp
New file
0,0 → 1,26
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 18/Mar/2008
Time: 14:50:57
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jomm:messages/>
<html:errors/>
 
<div class="staffLinks">
<p>Mobilidade e Relações Internacionais</p>
<ul class="linkeTypeTwo">
<li><a href="#">Os Docentes Estrangeiros na Estg</a></li>
<li><a href="#">Os Docentes da Estg no Estrangeiro</a></li>
<li><a href="#">Protocolos Internacionais</a></li>
<li><a href="#">Candidaturas</a></li>
<li><a href="#">Programa Erasmus</a></li>
</ul>
</div>
/impl/src/web/public/staff/contacts.jsp
New file
0,0 → 1,27
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 18/Mar/2008
Time: 14:44:05
To change this template use File | Settings | File Templates.
--%>
<%@ 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-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jomm:messages/>
<html:errors/>
 
<div class="staffLinks">
<p>Contactos</p>
<ul class="linkeTypeTwo">
<li><a href="#">Contactos Gerais Estg</a></li>
<li><a href="#">Áreas Cientificas</a></li>
<li><a href="#">Secretaria</a></li>
<li><a href="#">Centro Informatico</a></li>
<li><a href="#">Reprografia</a></li>
<li><a href="#">Docentes</a></li>
</ul>
</div>
/impl/src/web/public/announcements/announcements.jsp
14,26 → 14,32
List<AnnouncementView> announcementViews = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request), "LoadTargetMaxAnnouncements", args, names);
request.setAttribute("Announcements", announcementViews);
%>
<table class="box">
<table class="lastAnnouncementsModule" style=" border-collapse: collapse;">
<tr>
<th>
<td id="topBar">
<bean:message key="announcements"/>
</th>
</td>
</tr>
<tr>
<td>
<div class="linkTypeTwo">
<ul>
<logic:iterate id="item" name="Announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView">
<li>
<logic:empty name="item" property="url">
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link>
<logic:equal value="news" name="item" property="type">
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link>
</logic:equal>
</logic:empty>
<logic:notEmpty name="item" property="url">
<html:link href="${item.url}">${item.title}</html:link>
<logic:equal value="news" name="item" property="type">
<html:link href="${item.url}">${item.title}</html:link>
</logic:equal>
</logic:notEmpty>
</li>
</logic:iterate>
</ul>
</div>
</td>
</tr>
 
/impl/src/web/public/urlstat/index.jsp
New file
0,0 → 1,28
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
<h2></h2>
<table class="charts">
<tr>
<td>
<estgweb:chartPageUrlStat chartType="urlstat.chart.week.days" altKey="urlstat.chart.week.days"/>
</td>
</tr>
<tr>
<td>
<estgweb:chartPageUrlStat chartType="urlstat.chart.month.days" altKey="urlstat.chart.month.days"/>
</td>
</tr>
<tr>
<td>
<estgweb:chartPageUrlStat chartType="urlstat.chart.year.months" altKey="urlstat.chart.year.months"/>
</td>
</tr>
<tr>
<td>
<estgweb:chartPageUrlStat chartType="urlstat.chart.year.days" altKey="urlstat.chart.year.days"/>
</td>
</tr>
 
</table>
/impl/src/web/templates/templatePage.jsp
New file
0,0 → 1,105
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 19/Mar/2008
Time: 15:52:44
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="page">
<div class="pageHeader">
<h1>Titulo</h1>
</div>
 
<div class="pageContent">
<div class="pageHeader">
<img src="<%=request.getContextPath()%>/imgs/docente.gif"/>
</div>
<table class="pageColumnTable">
<tbody>
<tr>
<td class="pageColumn" width="50%">
<div class="pageBlock">
<h2>Serviços On-line</h2>
<div class="listClean">
<ul>
<li><a href="#">WEBmail</a></li>
</ul>
</div>
</div>
<div class="pageBlock">
<h2>Contactos</h2>
<div class="listCircleWhite">
<ul>
<li><a href="#">Contactos Gerais Estg</a></li>
</ul>
</div>
</div>
<div class="pageBlock">
<h2>Informação Académica</h2>
<div class="listDecimal">
<ul>
<li><a href="#">Calendário Escolar</a></li>
</ul>
</div>
</div>
</td>
<td class="pageColumn" width="50%">
<div class="pageBlock">
<h2>Informação Académica</h2>
<div class="listDisc">
<ul>
<li><a href="#">Calendário Escolar</a></li>
</ul>
</div>
</div>
<div class="pageBlock">
<h2>Informação Académica</h2>
<div class="listSquare">
<ul>
<li><a href="#">Calendário Escolar</a></li>
</ul>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
 
<div class="pageSection">
<div class="sectionTitle">
<h2>Titulo</h2>
</div>
<div class="pageText">
Aqui mete o texto....
dsdasdsa
dsdas
</div>
</div>
 
<table class="pageColumnTableSolid">
<tbody>
<tr>
<td>fdfdfdf</td>
<td>sasasa</td>
</tr>
</tbody>
</table>
 
<div class="pageDefenitions">
<div class=defenitionsTitle>
<h2>Titulo</h2>
</div>
<div class="defenitionsSubTitle">
<h3>Sub-Titulo-</h3>
</div>
<div class="pageBlock">
<div class="listClean">
<ul>
<li>defenição.........</li>
</ul>
</div>
</div>
</div>
</div>
/impl/src/web/templates/templatePortal.jsp
New file
0,0 → 1,104
<%--
Created by IntelliJ IDEA.
User: Fabio Velez
Date: 19/Mar/2008
Time: 10:20:20
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="portal">
<div class="header">
<h1><bean:message key="staff.header"/></h1>
</div>
 
<div class="portalContent">
<div class="header">
<img src="<%=request.getContextPath()%>/imgs/docente.gif"/>
</div>
<table class="columnTable">
<tbody>
<tr>
<td class="column" width="50%">
<div class="block">
<p>Serviços On-line</p>
<ul>
<li><a href="#">WEBmail</a></li>
<li><a href="#">Eduroam</a></li>
<li><a href="#">Secretaria</a></li>
<li><a href="#">In-Estg</a></li>
<li><a href="#">Biblioteca Online</a></li>
<li><a href="#">N.zero</a></li>
<li><a href="#">Académicos Online</a></li>
<li><a href="#">Portal de Assiduidade</a></li>
<li><a href="#">Sisgom-Ocorrências</a></li>
<li><a href="#">Siadap</a></li>
</ul>
</div>
<div class="block">
<p>Contactos</p>
<ul>
<li><a href="#">Contactos Gerais Estg</a></li>
<li><a href="#">Áreas Cientificas</a></li>
<li><a href="#">Secretaria</a></li>
<li><a href="#">Centro Informatico</a></li>
<li><a href="#">Reprografia</a></li>
<li><a href="#">Docentes</a></li>
</ul>
</div>
<div class="block">
 
<p>Informação Académica</p>
<ul>
<li><a href="#">Calendário Escolar</a></li>
<li><a href="#">Licenciaturas</a></li>
<li><a href="#">Mestrados</a></li>
<li><a href="#">Pós-Graduações</a></li>
<li><a href="#">Cet´s</a></li>
</ul>
</div>
</td>
<td class="column" width="50%">
<div class="block">
<p>Mobilidade</p>
<ul>
<li><a href="#">Os Docentes Estrangeiros na Estg</a></li>
<li><a href="#">Os Docentes da Estg no Estrangeiro</a></li>
<li><a href="#">Protocolos Internacionais</a></li>
<li><a href="#">Candidaturas</a></li>
<li><a href="#">Programa Erasmus</a></li>
</ul>
</div>
<div class="block">
<p>Acção Social</p>
<ul>
<li><a href="#">Cantinas</a></li>
<li><a href="#">Residências</a></li>
<li><a href="#">Ementas</a></li>
<li><a href="#">Desporto e Cultura</a></li>
<li><a href="#">Apoio Psicopedagógico</a></li>
</ul>
</div>
<div class="block">
<p>Orgãos</p>
<ul>
<li><a href="#">Conselho Pedagógico</a></li>
<li><a href="#">Conselho Ciêntifico</a></li>
<li><a href="#">Conselho Directivo</a></li>
<li><a href="#">Assembleia de Representantes</a></li>
</ul>
</div>
<div class="block">
<p>Instituto Politécnico</p>
<ul>
<li><a href="#">Serviços Centrais</a></li>
<li><a href="#">Loja do Aluno</a></li>
<li><a href="#">Merchandising</a></li>
<li><a href="#">Cultura e Lazer</a></li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
/impl/gen/java/pt/estgp/estgweb/domain/Course.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/UrlStatMonth.java
New file
0,0 → 1,85
package pt.estgp.estgweb.domain;
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
 
/**
* UrlStatMonth generated by hbm2java
*/
public abstract class UrlStatMonth extends pt.estgp.estgweb.domain.DomainObject implements java.io.Serializable {
 
 
private UrlStatMonthId id;
private Date updateDate;
private Date saveDate;
private Date date;
private Integer totalClicks;
private Set<UrlStatDay> days = new HashSet<UrlStatDay>(0);
 
public UrlStatMonth() {
}
 
public UrlStatMonth(UrlStatMonthId id) {
this.id = id;
}
public UrlStatMonth(UrlStatMonthId id, Date saveDate, Date date, Integer totalClicks, Set<UrlStatDay> days) {
this.id = id;
this.saveDate = saveDate;
this.date = date;
this.totalClicks = totalClicks;
this.days = days;
}
public UrlStatMonthId getId() {
return this.id;
}
public void setId(UrlStatMonthId id) {
this.id = id;
}
public Date getUpdateDate() {
return this.updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date saveDate) {
this.saveDate = saveDate;
}
public Date getDate() {
return this.date;
}
public void setDate(Date date) {
this.date = date;
}
public Integer getTotalClicks() {
return this.totalClicks;
}
public void setTotalClicks(Integer totalClicks) {
this.totalClicks = totalClicks;
}
public Set<UrlStatDay> getDays() {
return this.days;
}
public void setDays(Set<UrlStatDay> days) {
this.days = days;
}
 
 
 
 
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/UrlStatDayId.java
New file
0,0 → 1,43
package pt.estgp.estgweb.domain;
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
 
/**
* UrlStatDayId generated by hbm2java
*/
public class UrlStatDayId extends pt.estgp.estgweb.domain.DomainObject implements java.io.Serializable {
 
 
private Integer day;
private UrlStatMonth urlStatMonth;
 
public UrlStatDayId() {
}
 
public UrlStatDayId(Integer day, UrlStatMonth urlStatMonth) {
this.day = day;
this.urlStatMonth = urlStatMonth;
}
public Integer getDay() {
return this.day;
}
public void setDay(Integer day) {
this.day = day;
}
public UrlStatMonth getUrlStatMonth() {
return this.urlStatMonth;
}
public void setUrlStatMonth(UrlStatMonth urlStatMonth) {
this.urlStatMonth = urlStatMonth;
}
 
 
 
 
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/SessionObject.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/GenericUser.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/User.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/UrlStatYear.java
New file
0,0 → 1,76
package pt.estgp.estgweb.domain;
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
 
/**
* UrlStatYear generated by hbm2java
*/
public abstract class UrlStatYear extends pt.estgp.estgweb.domain.DomainObject implements java.io.Serializable {
 
 
private UrlStatYearId id;
private Date updateDate;
private Date saveDate;
private Integer totalClicks;
private Set<UrlStatMonth> months = new HashSet<UrlStatMonth>(0);
 
public UrlStatYear() {
}
 
public UrlStatYear(UrlStatYearId id) {
this.id = id;
}
public UrlStatYear(UrlStatYearId id, Date saveDate, Integer totalClicks, Set<UrlStatMonth> months) {
this.id = id;
this.saveDate = saveDate;
this.totalClicks = totalClicks;
this.months = months;
}
public UrlStatYearId getId() {
return this.id;
}
public void setId(UrlStatYearId id) {
this.id = id;
}
public Date getUpdateDate() {
return this.updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date saveDate) {
this.saveDate = saveDate;
}
public Integer getTotalClicks() {
return this.totalClicks;
}
public void setTotalClicks(Integer totalClicks) {
this.totalClicks = totalClicks;
}
public Set<UrlStatMonth> getMonths() {
return this.months;
}
public void setMonths(Set<UrlStatMonth> months) {
this.months = months;
}
 
 
 
 
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/UrlStatMonthId.java
New file
0,0 → 1,43
package pt.estgp.estgweb.domain;
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
 
/**
* UrlStatMonthId generated by hbm2java
*/
public class UrlStatMonthId extends pt.estgp.estgweb.domain.DomainObject implements java.io.Serializable {
 
 
private Integer month;
private UrlStatYear urlStatYear;
 
public UrlStatMonthId() {
}
 
public UrlStatMonthId(Integer month, UrlStatYear urlStatYear) {
this.month = month;
this.urlStatYear = urlStatYear;
}
public Integer getMonth() {
return this.month;
}
public void setMonth(Integer month) {
this.month = month;
}
public UrlStatYear getUrlStatYear() {
return this.urlStatYear;
}
public void setUrlStatYear(UrlStatYear urlStatYear) {
this.urlStatYear = urlStatYear;
}
 
 
 
 
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/UserSession.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/Image.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/GenericUserDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UserDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UrlStatYearDao.java
New file
0,0 → 1,39
package pt.estgp.estgweb.domain.dao.impl;
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
 
/**
* Home object for domain model class UrlStatYear.
* @author Jorge Machado - Hibernate Tools
*/
 
import jomm.dao.IDomainObjectDao;
import jomm.dao.impl.AbstractDao;
import pt.estgp.estgweb.domain.UrlStatYear;
 
 
public class UrlStatYearDao extends AbstractDao<UrlStatYear> {
//public class UrlStatYearDao extends AbstractDao implements IDomainObjectDao {
 
private static final Logger log = Logger.getLogger(UrlStatYearDao.class);
 
protected static UrlStatYearDao myInstance = null;
 
protected UrlStatYearDao(){
super();
}
 
public static UrlStatYearDao getInstance() {
if (myInstance == null)
myInstance = new UrlStatYearDao();
return myInstance;
}
 
protected Class getReferenceClass() {
return UrlStatYear.class;
}
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UrlStatMonthIdDao.java
New file
0,0 → 1,39
package pt.estgp.estgweb.domain.dao.impl;
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
 
/**
* Home object for domain model class UrlStatMonthId.
* @author Jorge Machado - Hibernate Tools
*/
 
import jomm.dao.IDomainObjectDao;
import jomm.dao.impl.AbstractDao;
import pt.estgp.estgweb.domain.UrlStatMonthId;
 
 
public class UrlStatMonthIdDao extends AbstractDao<UrlStatMonthId> {
//public class UrlStatMonthIdDao extends AbstractDao implements IDomainObjectDao {
 
private static final Logger log = Logger.getLogger(UrlStatMonthIdDao.class);
 
protected static UrlStatMonthIdDao myInstance = null;
 
protected UrlStatMonthIdDao(){
super();
}
 
public static UrlStatMonthIdDao getInstance() {
if (myInstance == null)
myInstance = new UrlStatMonthIdDao();
return myInstance;
}
 
protected Class getReferenceClass() {
return UrlStatMonthId.class;
}
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UserSessionDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/ImageDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/SessionObjectIdDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/AnnouncementDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/CourseUserAssociationDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/GroupDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UrlStatDayDao.java
New file
0,0 → 1,39
package pt.estgp.estgweb.domain.dao.impl;
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
 
/**
* Home object for domain model class UrlStatDay.
* @author Jorge Machado - Hibernate Tools
*/
 
import jomm.dao.IDomainObjectDao;
import jomm.dao.impl.AbstractDao;
import pt.estgp.estgweb.domain.UrlStatDay;
 
 
public class UrlStatDayDao extends AbstractDao<UrlStatDay> {
//public class UrlStatDayDao extends AbstractDao implements IDomainObjectDao {
 
private static final Logger log = Logger.getLogger(UrlStatDayDao.class);
 
protected static UrlStatDayDao myInstance = null;
 
protected UrlStatDayDao(){
super();
}
 
public static UrlStatDayDao getInstance() {
if (myInstance == null)
myInstance = new UrlStatDayDao();
return myInstance;
}
 
protected Class getReferenceClass() {
return UrlStatDay.class;
}
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UrlStatYearIdDao.java
New file
0,0 → 1,39
package pt.estgp.estgweb.domain.dao.impl;
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
 
/**
* Home object for domain model class UrlStatYearId.
* @author Jorge Machado - Hibernate Tools
*/
 
import jomm.dao.IDomainObjectDao;
import jomm.dao.impl.AbstractDao;
import pt.estgp.estgweb.domain.UrlStatYearId;
 
 
public class UrlStatYearIdDao extends AbstractDao<UrlStatYearId> {
//public class UrlStatYearIdDao extends AbstractDao implements IDomainObjectDao {
 
private static final Logger log = Logger.getLogger(UrlStatYearIdDao.class);
 
protected static UrlStatYearIdDao myInstance = null;
 
protected UrlStatYearIdDao(){
super();
}
 
public static UrlStatYearIdDao getInstance() {
if (myInstance == null)
myInstance = new UrlStatYearIdDao();
return myInstance;
}
 
protected Class getReferenceClass() {
return UrlStatYearId.class;
}
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UrlStatDao.java
New file
0,0 → 1,39
package pt.estgp.estgweb.domain.dao.impl;
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
 
/**
* Home object for domain model class UrlStat.
* @author Jorge Machado - Hibernate Tools
*/
 
import jomm.dao.IDomainObjectDao;
import jomm.dao.impl.AbstractDao;
import pt.estgp.estgweb.domain.UrlStat;
 
 
public class UrlStatDao extends AbstractDao<UrlStat> {
//public class UrlStatDao extends AbstractDao implements IDomainObjectDao {
 
private static final Logger log = Logger.getLogger(UrlStatDao.class);
 
protected static UrlStatDao myInstance = null;
 
protected UrlStatDao(){
super();
}
 
public static UrlStatDao getInstance() {
if (myInstance == null)
myInstance = new UrlStatDao();
return myInstance;
}
 
protected Class getReferenceClass() {
return UrlStat.class;
}
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/CourseDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UrlStatMonthDao.java
New file
0,0 → 1,39
package pt.estgp.estgweb.domain.dao.impl;
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
 
/**
* Home object for domain model class UrlStatMonth.
* @author Jorge Machado - Hibernate Tools
*/
 
import jomm.dao.IDomainObjectDao;
import jomm.dao.impl.AbstractDao;
import pt.estgp.estgweb.domain.UrlStatMonth;
 
 
public class UrlStatMonthDao extends AbstractDao<UrlStatMonth> {
//public class UrlStatMonthDao extends AbstractDao implements IDomainObjectDao {
 
private static final Logger log = Logger.getLogger(UrlStatMonthDao.class);
 
protected static UrlStatMonthDao myInstance = null;
 
protected UrlStatMonthDao(){
super();
}
 
public static UrlStatMonthDao getInstance() {
if (myInstance == null)
myInstance = new UrlStatMonthDao();
return myInstance;
}
 
protected Class getReferenceClass() {
return UrlStatMonth.class;
}
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/UrlStatDayIdDao.java
New file
0,0 → 1,39
package pt.estgp.estgweb.domain.dao.impl;
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
 
/**
* Home object for domain model class UrlStatDayId.
* @author Jorge Machado - Hibernate Tools
*/
 
import jomm.dao.IDomainObjectDao;
import jomm.dao.impl.AbstractDao;
import pt.estgp.estgweb.domain.UrlStatDayId;
 
 
public class UrlStatDayIdDao extends AbstractDao<UrlStatDayId> {
//public class UrlStatDayIdDao extends AbstractDao implements IDomainObjectDao {
 
private static final Logger log = Logger.getLogger(UrlStatDayIdDao.class);
 
protected static UrlStatDayIdDao myInstance = null;
 
protected UrlStatDayIdDao(){
super();
}
 
public static UrlStatDayIdDao getInstance() {
if (myInstance == null)
myInstance = new UrlStatDayIdDao();
return myInstance;
}
 
protected Class getReferenceClass() {
return UrlStatDayId.class;
}
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/dao/impl/SessionObjectDao.java
1,5 → 1,5
package pt.estgp.estgweb.domain.dao.impl;
// Generated 12/Mar/2008 16:26:56 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:37 by Hibernate Tools 3.2.0.b9
 
 
import org.apache.log4j.Logger;
/impl/gen/java/pt/estgp/estgweb/domain/SessionObjectId.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
 
/impl/gen/java/pt/estgp/estgweb/domain/Announcement.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/Group.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/UrlStatDay.java
New file
0,0 → 1,74
package pt.estgp.estgweb.domain;
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
 
/**
* UrlStatDay generated by hbm2java
*/
public abstract class UrlStatDay extends pt.estgp.estgweb.domain.DomainObject implements java.io.Serializable {
 
 
private UrlStatDayId id;
private Date updateDate;
private Date saveDate;
private Date date;
private Integer totalClicks;
 
public UrlStatDay() {
}
 
public UrlStatDay(UrlStatDayId id) {
this.id = id;
}
public UrlStatDay(UrlStatDayId id, Date saveDate, Date date, Integer totalClicks) {
this.id = id;
this.saveDate = saveDate;
this.date = date;
this.totalClicks = totalClicks;
}
public UrlStatDayId getId() {
return this.id;
}
public void setId(UrlStatDayId id) {
this.id = id;
}
public Date getUpdateDate() {
return this.updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date saveDate) {
this.saveDate = saveDate;
}
public Date getDate() {
return this.date;
}
public void setDate(Date date) {
this.date = date;
}
public Integer getTotalClicks() {
return this.totalClicks;
}
public void setTotalClicks(Integer totalClicks) {
this.totalClicks = totalClicks;
}
 
 
 
 
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/UrlStatYearId.java
New file
0,0 → 1,43
package pt.estgp.estgweb.domain;
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
 
/**
* UrlStatYearId generated by hbm2java
*/
public class UrlStatYearId extends pt.estgp.estgweb.domain.DomainObject implements java.io.Serializable {
 
 
private Integer year;
private UrlStat urlStat;
 
public UrlStatYearId() {
}
 
public UrlStatYearId(Integer year, UrlStat urlStat) {
this.year = year;
this.urlStat = urlStat;
}
public Integer getYear() {
return this.year;
}
public void setYear(Integer year) {
this.year = year;
}
public UrlStat getUrlStat() {
return this.urlStat;
}
public void setUrlStat(UrlStat urlStat) {
this.urlStat = urlStat;
}
 
 
 
 
}
 
 
/impl/gen/java/pt/estgp/estgweb/domain/CourseUserAssociation.java
1,5 → 1,5
package pt.estgp.estgweb.domain;
// Generated 12/Mar/2008 16:26:54 by Hibernate Tools 3.2.0.b9
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
/impl/gen/java/pt/estgp/estgweb/domain/UrlStat.java
New file
0,0 → 1,103
package pt.estgp.estgweb.domain;
// Generated 20/Mar/2008 18:10:33 by Hibernate Tools 3.2.0.b9
 
 
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
 
/**
* UrlStat generated by hbm2java
*/
public abstract class UrlStat extends pt.estgp.estgweb.domain.DomainObject implements java.io.Serializable {
 
 
private String relativePath;
private Date updateDate;
private Date saveDate;
private String name;
private String description;
private Integer totalClicks;
private boolean status;
private Set<UrlStatYear> years = new HashSet<UrlStatYear>(0);
 
public UrlStat() {
}
 
public UrlStat(String relativePath) {
this.relativePath = relativePath;
}
public UrlStat(String relativePath, Date saveDate, String name, String description, Integer totalClicks, boolean status, Set<UrlStatYear> years) {
this.relativePath = relativePath;
this.saveDate = saveDate;
this.name = name;
this.description = description;
this.totalClicks = totalClicks;
this.status = status;
this.years = years;
}
public String getRelativePath() {
return this.relativePath;
}
public void setRelativePath(String relativePath) {
this.relativePath = relativePath;
}
public Date getUpdateDate() {
return this.updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date saveDate) {
this.saveDate = saveDate;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public Integer getTotalClicks() {
return this.totalClicks;
}
public void setTotalClicks(Integer totalClicks) {
this.totalClicks = totalClicks;
}
public boolean isStatus() {
return this.status;
}
public void setStatus(boolean status) {
this.status = status;
}
public Set<UrlStatYear> getYears() {
return this.years;
}
public void setYears(Set<UrlStatYear> years) {
this.years = years;
}
 
 
 
 
}
 
 
/impl/build.properties
42,7 → 42,7
common.lib.dir =../common
conf.dir =conf
lib.dir =lib
data.dir =../../DATA/estgweb
data.dir =C:/Servidores/DATA/estgweb
src.dir =src/java
hbm.dir =src/hbm
build.dir =build/ant
59,6 → 59,10
app.properties.build=${build.dir.classes}/${package.dir}
 
 
mime.types.filename=mime.types
mime.types=${conf.dir}/${mime.types.filename}
mime.types.build=${build.dir.classes}/jomm/utils
 
hibernate.cfg.xml.filename=hibernate.cfg.xml
hibernate.cfg.xml=${conf.dir}/${hibernate.cfg.xml.filename}
hibernate.cfg.xml.build=${build.dir.classes}/${package.dir}
81,6 → 85,11
#log file confirguration
log.file=/estgweb.log
 
#email templates
email.templates.dir=/template/email
email.templates.dir.build=${build.dir.classes}${email.templates.dir}
email.templates.dir.conf=${conf.dir}${email.templates.dir}
 
#DATA
out.dir=${data.dir}/out
tmp.dir=${data.dir}/tmp
/impl/build.xml
54,6 → 54,9
<fileset dir="${common.lib.dir}/struts">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${common.lib.dir}/jfreechart">
<include name="**/*.jar"/>
</fileset>
</path>
 
 
74,7 → 77,11
<target name="clean" description="clean *.class and build dir">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${gen.dir.java}"/>
<delete>
<fileset dir="${gen.dir.java}">
<include name="**/*.java"/>
</fileset>
</delete>
<antcall target="initDirs"/>
</target>
 
202,7 → 209,7
</replace>
</target>
 
<target name="copy.jsps.war" depends="" description="copy only jsps to war distribution">
<target name="copy.jsps.war" description="copy only jsps to war distribution">
<copy todir="${build.dir.war}" overwrite="false">
<fileset dir="src/web">
<include name="**/*"/>
236,6 → 243,15
<fileset dir="${common.lib.dir}/struts">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${common.lib.dir}/ldap">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${common.lib.dir}/mail">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${common.lib.dir}/jfreechart">
<include name="**/*.jar"/>
</fileset>
</copy>
<copy file="${dist.dir}/estgweb.jar" todir="${build.dir.war}/WEB-INF/lib"/>
<copy todir="${build.dir.war}/WEB-INF" overwrite="true">
246,7 → 262,9
<mkdir dir="${build.dir.war}/WEB-INF/classes"/>
<copy todir="${build.dir.war}/WEB-INF/classes" overwrite="true">
<fileset dir="${build.dir.classes}">
<include name="**/*.types"/>
<include name="**/*.properties"/>
<include name="**/*.txt"/>
<include name="**/*.xml"/>
</fileset>
</copy>
284,7 → 302,12
<copy overwrite="true" todir="${build.dir.classes}">
<fileset dir="${conf.dir}/berserk" includes="*.*"/>
</copy>
<mkdir dir="${email.templates.dir.build}"/>
<copy overwrite="true" todir="${email.templates.dir.build}">
<fileset dir="${email.templates.dir.conf}" includes="*.*"/>
</copy>
<copy overwrite="true" todir="${hibernate.cfg.xml.build}" file="${hibernate.cfg.xml}"/>
<copy overwrite="true" todir="${mime.types.build}" file="${mime.types}"/>
<copy overwrite="true" todir="${app.properties.build}" file="${app.properties}"/>
<copy overwrite="true" todir="${jdbc.properties.build}" file="${jdbc.properties}"/>
<copy overwrite="true" todir="${ldap.properties.build}" file="${ldap.properties}"/>
312,6 → 335,7
<replace file="${app.properties.build}/app.properties">
<replacefilter token="@tmp.dir@" value="${tmp.dir}"/>
<replacefilter token="@out.dir@" value="${out.dir}"/>
<replacefilter token="@email.templates.dir@" value="${email.templates.dir}"/>
</replace>
<replace file="${build.dir.classes}/${log4j.properties.filename}">
<replacefilter token="@log.file@" value="${log.file}"/>
332,18 → 356,20
<antcall target="replaceFiltersConfigurationFiles"/>
</target>
<target name="dbInit">
<!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>-->
<java classname="pt.estgp.estgweb.examples.DBInit" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>
<antcall target="replaceFiltersConfigurationFiles"/>
</target>
<!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>-->
<java classname="pt.estgp.estgweb.examples.DBInit" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>
 
<antcall target="replaceFiltersConfigurationFiles"/>
</target>
 
 
 
<!--
Hibernate Tools Task
-->
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="pathToToolsLib" classpath="${build.dir.classes}"/>
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="pathToToolsLib" classpath="${build.dir.classes}"/>
<!--
==========================================================================================
GENERATE SQL SCRIPTS
/common/mail/mail.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/common/jfreechart/swtgraphics2d.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/common/jfreechart/jfreechart-1.0.9-experimental.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/common/jfreechart/jfreechart-1.0.9-swt.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/common/jfreechart/itext-2.0.6.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/common/jfreechart/jcommon-1.0.12.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/common/jfreechart/jfreechart-1.0.9.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream