/impl/importRoutines.xml |
---|
60,8 → 60,31 |
<!-- PONTUAIS --> |
<target name="agendarImportacoes"> |
<java classname="pt.estgp.estgweb.services.jobs.JobScheduleService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
</java> |
</target> |
<target name="grades"> |
<java classname="pt.estgp.estgweb.services.sigesimports.ImportGradesService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
<java classname="pt.estgp.estgweb.services.sigesimports.ImportGradesService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
<arg value="200809"/> |
</java> |
<java classname="pt.estgp.estgweb.services.sigesimports.ImportGradesService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
<arg value="200910"/> |
</java> |
<java classname="pt.estgp.estgweb.services.sigesimports.ImportGradesService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
<arg value="201011"/> |
</java> |
<java classname="pt.estgp.estgweb.services.sigesimports.ImportGradesService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
<arg value="201112"/> |
</java> |
<java classname="pt.estgp.estgweb.services.sigesimports.ImportGradesService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
<arg value="201213"/> |
</java> |
<java classname="pt.estgp.estgweb.services.sigesimports.ImportGradesService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
<arg value="201314"/> |
</java> |
</target> |
<target name="setAreas"> |
/impl/conf/language/MessageResourcesCourse.properties |
---|
40,7 → 40,13 |
course.A=Formações Avançadas |
course.O=Outras Formações |
course.T=TeSP |
course.D=Diploma de Estudos Superiores Especializados |
course.H=Doutoramento |
course.Z=Desconhecido |
course.Bs=Bacharelatos |
course.Ls=Licenciaturas |
course.Ms=Mestrados |
54,6 → 60,7 |
course.valid.program=Programa Validado |
course.directed.coordinated=Cursos que coordena e/ou dirige (Apenas os Presidentes dos Departamentos tem permissão para alterar o estado de um programa) |
courseunit.programs=Programas Curriculares |
courseunit.indexes=Índice de Unidades e Cursos (Gestão de Fichas) |
course.directed.courses=Cursos que dirige |
course.coordinated.courses=Cursos que coordena |
course.unit.directed=Unidades Curriculares |
91,3 → 98,5 |
course.menu.publicacoes=Publicações |
status=Curso Activo |
courses.fill.course=Por favor escolha pelo menos um curso nos filtros. |
/impl/conf/language/MessageResourcesImportSiges.properties |
---|
6,12 → 6,25 |
import.semestre.separated=Importando as disciplinas por Semestre |
import.semestre.repeated.S1=Unidade Repetida no 1º semestre |
import.semestre.repeated.S2=Unidade Repetida no 2º Semestre |
import.semestre.repeated.T1=Unidade Repetida no 1º Trimestre |
import.semestre.repeated.T2=Unidade Repetida no 2º Trimestre |
import.semestre.repeated.T3=Unidade Repetida no 3º Trimestre |
import.semestre.repeated.T4=Unidade Repetida no 4º Trimestre |
import.semestre.repeated.A=Unidade Repetida Anual |
import.semestre.course.units.T1=Importando Unidades Curriculares do 1º Trimestre |
import.semestre.course.units.T2=Importando Unidades Curriculares do 2º Trimestre |
import.semestre.course.units.T3=Importando Unidades Curriculares do 3º Trimestre |
import.semestre.course.units.T4=Importando Unidades Curriculares do 4º Trimestre |
import.semestre.course.units.S1=Importando Unidades Curriculares do 1º Semestre |
import.semestre.course.units.S2=Importando Unidades Curriculares do 2º Semestre |
import.semestre.course.units.A=Importando Unidades Curriculares Anuais |
import.semestre.updating.course.units.S1=Actualizando Unidades Curriculares do 1º Semestre |
import.semestre.updating.course.units.S2=Actualizando Unidades Curriculares do 2º Semestre |
import.semestre.updating.course.units.T1=Actualizando Unidades Curriculares do 1º Trimestre |
import.semestre.updating.course.units.T2=Actualizando Unidades Curriculares do 2º Trimestre |
import.semestre.updating.course.units.T3=Actualizando Unidades Curriculares do 3º Trimestre |
import.semestre.updating.course.units.T4=Actualizando Unidades Curriculares do 4º Trimestre |
import.semestre.updating.course.units.A=Actualizando Unidades Curriculares Anuais |
import.semestre.updating.courses=Actualizando os Cursos |
import.error=Erro na importação |
/impl/conf/language/MessageResources.properties |
---|
160,6 → 160,7 |
fail.authenticate=O nome de utilizador ou a palavra passe estão errados. Por favor tente de novo. |
dontexist.authenticate=O utilizador já existe na rede interna mas ainda não está disponivel no sistema BACO, por favor dirija-se ao Centro Informático. |
top.separators=Separadores Públicos |
#palavras comuns |
courseunit=Unidade Curricular |
grade=Nota |
362,6 → 363,7 |
delete=Apagar |
confirm=Confirmar |
save=Salvar |
deliverEvaluation=Entregar Avaliação |
add=Adicionar |
put=Colocar |
remove=Remover |
473,21 → 475,91 |
user.role.courseValidateProgramTGI=Comissão de Curso de TGI |
user.role.courseValidateProgramRU=Comissão de Curso de RU |
configuration.grades=Configuração Pautas |
configuration=Configurações |
configuration.directories=Configuração de Directórios |
configuration.directory=Directório |
directories.leaf.not.found=Nó não encontrado com o id {0} |
directories.removed.leaf=Nó {0} removido com sucesso. Necessita de gravar as alterações para tornar a operação definitiva. |
directories.add.leaf=Nó {0} adicionado com sucesso. Necessita de gravar as alterações para tornar a operação definitiva. |
directories.remove.ask=Têm a certeza que pretende eliminar este nó -> {0}? |
directories.add.right=Direito adicionado com sucesso, por favor atribua as permissões desejadas |
directories.remove.right=Direito removido com sucesso ({0},{1},{2}) |
directories.add.group=Grupo Adicionado cm sucesso, atribua um descritivo |
directories.remove.group=Grupo removido cm sucesso |
directories.refresh=Refrescar Página |
directories.confirm.save=Tem a certeza que deseja SALVAR as alterações? |
directories.confirm.cancel=Tem a certeza que deseja CANCELAR as alterações? |
directories.save=Salvar as Alterações |
directories.cancel=Cancelar e reverter |
directories.canceled=Operação cancelada |
directories.saved=Operação salva com sucesso |
##TAREFAS AGENDADAS |
configuration.jobtask=Tarefa Executada |
configuration.jobtasks=Tarefas Executadas |
configuration.tasks=Tarefas Agendadas |
configuration.task=Tarefa Agendada |
configuration.taskLog=Log de Tarefa |
configuration.task.weekly=Semanalmente |
configuration.task.monthly=Mensalmente |
configuration.task.dally=Diariamente |
configuration.task.hour=Hora |
configuration.task.minute=Minuto |
configuration.task.second=Segundo |
configuration.task.weekday=Dia da semana |
configuration.task.monthday=Dia do Mês |
configuration.task.now=Agendar para correr agora |
configuration.task.records=Registos de Tarefas Agendadas |
configuration.task.log=Ficheiro de Registo |
configuration.task.progress=Progresso |
configuration.task.PENDING=Hora |
configuration.task.STARTED=Iniciada |
configuration.task.FINISHED=Terminada |
configuration.task.FAILED=Falhada |
configuration.task.UNKNOWN_ERROR=Terminada com erro desconhecido |
configuration.task.unknown=Desconhecido |
targetService.pt.estgp.estgweb.services.sigesimports.ImportTeachersService=Importação de Professores |
targetService.pt.estgp.estgweb.services.sigesimports.ImportStudentsService=Importação de Alunos |
targetService.pt.estgp.estgweb.services.sigesimports.ImportSumariesJson=Importação de Sumários |
targetService.pt.estgp.estgweb.services.sigesimports.ImportGradesService=Importação de Notas |
targetService.pt.estgp.estgweb.services.sigesimports.ImportCourseService=Importação de Cursos |
targetService.pt.estgp.estgweb.services.sigesimports.SincronizeLastYearCourseUnitProgramsService=Clonagem de Fichas Curriculares |
weekday.Mon=Segundas |
weekday.Tue=Terças |
weekday.Wed=Quartas |
weekday.Thu=Quintas |
weekday.Fri=Sextas |
weekday.Sat=Sabados |
weekday.Sun=Domingos |
monthday.day=ao dia |
weekday.day=às |
day.time=às |
job.schedule.inactive=Tarefa está inativa |
job.schedule.active=Tarefa reativada |
job.schedule.deleted=Tarefa apagada das agendadas |
job.schedule.for.now=Agendada para correr assim que for possivel |
job.status.PENDING=Pendente |
job.status.STARTED=Iniciado |
job.status.FINISHED=Terminado |
job.status.FINISHED_ERRORS=Terminado com Erros |
job.status.FINISHED_WARNINGS=Terminado com Avisos |
job.status.FAILED=Falhado |
job.status.UNKNOWN_ERROR=Erro Desconhecido |
508,3 → 580,22 |
/impl/conf/language/MessageResourcesCourseUnits.properties |
---|
6,6 → 6,7 |
module.CourseUnits=Unidades Curriculares |
course={0} > |
courseunit={0} |
course.unit=Unidade Curricular |
course.nav.without.arrow={0} |
courseunit.security.not.implemented=N\u00e3o implementado por raz\u00f5es de seguran\u00e7a |
45,6 → 46,8 |
courseunit.name=Nome |
courseunit.code=C\u00f3digo |
courseunit.semestre=Semestre |
courseunit.trimestre=Trimestre |
courseunit.anuais=Anuais |
courseunit.importYear=Ano de Importa\u00e7\u00e3o |
courseunit.course=Curso |
61,7 → 64,12 |
courseunit.teacher.situation.all=Todos |
courseunit.S1=1\u00ba Semestre |
courseunit.S2=2\u00aa Semestre |
courseunit.A=Anual |
courseunit.ALL=Todos os Semestres |
courseunit.T1=1\u00ba Trimestre |
courseunit.T2=2\u00ba Trimestre |
courseunit.T3=3\u00ba Trimestre |
courseunit.T4=4\u00ba Trimestre |
courseunit.assignement.delivered.date=Data de Entrega |
courseunit.assignement.delivered.date.first.version=Data de Entrega da Primeira Vers\u00e3o |
courseunit.assignement.delivered.versions=Total de Vers\u00f5es Entregues |
/impl/conf/WEB-INF/struts/struts-configuration.xml |
---|
New file |
0,0 → 1,77 |
<?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.configuration.ConfigurationGradesForm" name="ConfigurationGradesForm"/> |
<form-bean type="pt.estgp.estgweb.web.form.configuration.DirectoriesForm" name="DirectoriesForm"/> |
<form-bean type="pt.estgp.estgweb.web.form.configuration.SchedulleTasksForm" name="SchedulleTasksForm"/> |
</form-beans> |
<global-exceptions> |
</global-exceptions> |
<global-forwards> |
</global-forwards> |
<action-mappings> |
<action path="/user/configurationGrades" forward="page.configuration.grades"/> |
<action path="/user/grades" |
type="pt.estgp.estgweb.web.controllers.configuration.GradesController" |
name="ConfigurationGradesForm" |
scope="request" |
parameter="dispatch" |
validate="false" |
input="page.separators.serviceZone"> |
<forward name="save" path="page.separators.serviceZone"/> |
<forward name="grades" path="page.configuration.grades"/> |
</action> |
<action path="/user/configurationDirectories" forward="page.configuration.directories"/> |
<action path="/user/configurationDirectory" forward="page.configuration.directory"/> |
<action path="/user/configurationDir" |
type="pt.estgp.estgweb.web.controllers.configuration.DirectoriesController" |
name="DirectoriesForm" |
scope="request" |
parameter="dispatch" |
validate="false" |
input="page.separators.serviceZone"> |
<forward name="save" path="page.separators.serviceZone"/> |
<forward name="directory" path="page.configuration.directory"/> |
<forward name="directories" path="page.configuration.directories"/> |
</action> |
<action path="/user/configurationSchedulleTasks" forward="page.configuration.tasks"/> |
<action path="/user/configurationJobTasks" forward="page.configuration.jobtasks"/> |
<action path="/user/configurationTasks" |
type="pt.estgp.estgweb.web.controllers.configuration.SchedulerTasksController" |
name="SchedulleTasksForm" |
scope="request" |
parameter="dispatch" |
validate="false" |
input="page.separators.serviceZone"> |
<forward name="save" path="page.separators.serviceZone"/> |
<forward name="jobtasks" path="page.configuration.jobtasks"/> |
<forward name="tasks" path="page.configuration.tasks"/> |
<forward name="task" path="page.configuration.task"/> |
<forward name="taskLog" path="page.configuration.taskLog"/> |
<forward name="taskLogfromjobtasks" path="page.configuration.taskLog.from.jobtasks"/> |
</action> |
</action-mappings> |
</struts-config> |
Property changes: |
Added: svn:executable |
+ * |
/impl/conf/WEB-INF/struts/tiles-configuration.xml |
---|
New file |
0,0 → 1,59 |
<?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.configuration.grades" extends="page.separators.serviceZone"> |
<put name="title" value="Configuração Notas"/> |
<put name="topnav" value="/user/serviceZone/topnavConfigurationGrades.jsp"/> |
<put name="body" value="/admin/configuration/grades.jsp"/> |
</definition> |
<definition name="page.configuration.directories" extends="page.separators.serviceZone"> |
<put name="title" value="Configuração Directorios"/> |
<put name="topnav" value="/user/serviceZone/topnavConfigurationDirectories.jsp"/> |
<put name="body" value="/admin/configuration/directories.jsp"/> |
</definition> |
<definition name="page.configuration.directory" extends="page.separators.serviceZone"> |
<put name="title" value="Directório"/> |
<put name="topnav" value="/user/serviceZone/topnavConfigurationDirectory.jsp"/> |
<put name="body" value="/admin/configuration/directory.jsp"/> |
</definition> |
<definition name="page.configuration.tasks" extends="page.separators.serviceZone"> |
<put name="title" value="Tarefas Agendadas"/> |
<put name="topnav" value="/user/serviceZone/topnavConfigurationTasks.jsp"/> |
<put name="body" value="/admin/configuration/tasks.jsp"/> |
</definition> |
<definition name="page.configuration.jobtasks" extends="page.separators.serviceZone"> |
<put name="title" value="Registo de Tarefas Executadas"/> |
<put name="topnav" value="/user/serviceZone/topnavConfigurationJobTasks.jsp"/> |
<put name="body" value="/admin/configuration/jobTasks.jsp"/> |
</definition> |
<definition name="page.configuration.task" extends="page.separators.serviceZone"> |
<put name="title" value="Tarefa Agendada"/> |
<put name="topnav" value="/user/serviceZone/topnavConfigurationTask.jsp"/> |
<put name="body" value="/admin/configuration/task.jsp"/> |
</definition> |
<definition name="page.configuration.taskLog" extends="page.separators.serviceZone"> |
<put name="title" value="Tarefa Agendada"/> |
<put name="topnav" value="/user/serviceZone/topnavConfigurationTaskLog.jsp"/> |
<put name="body" value="/admin/configuration/taskLog.jsp"/> |
</definition> |
<definition name="page.configuration.taskLog.from.jobtasks" extends="page.separators.serviceZone"> |
<put name="title" value="Tarefa Agendada"/> |
<put name="topnav" value="/user/serviceZone/topnavConfigurationTaskLogFromJobTasks.jsp"/> |
<put name="body" value="/admin/configuration/taskLog.jsp"/> |
</definition> |
</tiles-definitions> |
Property changes: |
Added: svn:executable |
+ * |
/impl/conf/WEB-INF/struts/struts-default.xml |
---|
210,7 → 210,8 |
/WEB-INF/struts/tiles-srusource.xml, |
/WEB-INF/struts/tiles-survey.xml, |
/WEB-INF/struts/tiles-processes.xml, |
/WEB-INF/struts/tiles-comunicationfolder.xml"/> <!-- Duarte Santos --> |
/WEB-INF/struts/tiles-comunicationfolder.xml, |
/WEB-INF/struts/tiles-configuration.xml"/> <!-- Duarte Santos --> |
</plug-in> |
<plug-in className="org.apache.struts.validator.ValidatorPlugIn"> |
/impl/conf/WEB-INF/web.xml |
---|
165,7 → 165,8 |
/WEB-INF/struts/struts-srusource.xml, |
/WEB-INF/struts/struts-survey.xml, <!-- Duarte Santos --> |
/WEB-INF/struts/struts-comunicationfolder.xml, |
/WEB-INF/struts/struts-processes.xml |
/WEB-INF/struts/struts-processes.xml, |
/WEB-INF/struts/struts-configuration.xml |
</param-value> |
</init-param> |
<init-param> |
243,8 → 244,20 |
<servlet-class>pt.estgp.estgweb.web.ajaxapis.ServicosImpressao</servlet-class> |
</servlet> |
<servlet> |
<servlet-name>logServiceStream</servlet-name> |
<servlet-class>pt.estgp.estgweb.web.LogsServiceStream</servlet-class> |
</servlet> |
<servlet> |
<servlet-name>schedullerTasksJson</servlet-name> |
<servlet-class>pt.estgp.estgweb.web.controllers.configuration.SchedullerTasksJson</servlet-class> |
</servlet> |
<!--MAPPINGS--> |
<!--SOAP Tutorial--> |
312,6 → 325,10 |
<url-pattern>/repositoryStreamVersion/*</url-pattern> |
</servlet-mapping> |
<servlet-mapping> |
<servlet-name>logServiceStream</servlet-name> |
<url-pattern>/logServiceStream/*</url-pattern> |
</servlet-mapping> |
<servlet-mapping> |
<servlet-name>ftpProxyStream</servlet-name> |
<url-pattern>/ftpProxyStream/*</url-pattern> |
</servlet-mapping> |
332,7 → 349,12 |
<url-pattern>/user/ajaxapis/ServicosImpressao</url-pattern> |
</servlet-mapping> |
<servlet-mapping> |
<servlet-name>schedullerTasksJson</servlet-name> |
<url-pattern>/admin/schedullerTasksJson</url-pattern> |
</servlet-mapping> |
<!--START FILES--> |
<welcome-file-list> |
<welcome-file>index.jsp</welcome-file> |
/impl/conf/app.properties |
---|
10,6 → 10,7 |
user.session.timeout.minutes=60 |
site.url=@site.url@ |
#USAR APENAS ESTES DOIS EMAILS NAO DA PARA MAIS |
admin.email=ci@estgp.pt |
admin.email.2=jmachado@estgp.pt |
55,17 → 56,19 |
email.courseunit.blogpost.subject.pt={0}: {1} (ESTG) |
email.courseunit.blogpost.subject.en={0}: {1} (ESTG) |
email.new.grades=true |
email.new.grades=false |
email.courseunit.announcements=true |
email.courseunit.blogs=true |
email.summaries=false |
email.summary.subject.pt=Sumário lançado em {0} |
email.summary.subject.en=Sumário lançado em {0} |
email.summary.subject.pt=Sumario lançado em {0} |
email.summary.subject.en=Sumario lançado em {0} |
email.unidade.edicao.subject.pt=Ficha em edição {0} |
email.relatorio.aval.unidade.editado.subject.pt=Relatorio Avaliacao Editado {0} |
email.relatorio.aval.unidade.editado.subject.en=Unit Report Evaluation Edited {0} |
email.unidade.edicao.subject.pt=Ficha em edicao {0} |
email.unidade.edicao.subject.en=Unit in edition {0} |
email.unidade.editada.subject.pt=Ficha editada {0} |
email.unidade.editada.subject.en=Unit edited {0} |
124,6 → 127,10 |
server.ionline.start.path= |
ionline.pass=baco |
ionline.user=Baco_web |
ionline.use.default.credentials.to.updates.and.deletes=false |
ionline.use.default.credentials.to.read=false |
ionline.use.default.credentials.to.read.if.user.fail.when.authenticated=true |
ionline.use.default.credentials.to.read.if.user.fail.when.not.authenticated=true |
##ESTA CONFIGURACAO ESTA FUNCIONAL |
## Ver nos Ficheiros FtpService metodo run |
## Ver LayoutController |
135,14 → 142,18 |
## Todos o sistema de ficheiros tem codigo espalhado das classes FTPServer e FTPClient |
## Para se conseguir isolar o sistema deste código tem de se fazer um nivel de abstracao |
## e remover todos o código de FTPServer e FTPClient |
ionline.use.default.credentials.to.updates.and.deletes=false |
server.grupos=ftp://ftppublic:ftppublic@w2.estgp.pt |
server.grupos=ftp://w2.estgp.pt |
server.grupos.start.path=/grupos |
grupos.pass=ftppublic |
grupos.user=ftppublic |
grupos.use.default.credentials.to.read=true |
#Irrelevantes vai usar sempre as defaults |
grupos.use.default.credentials.to.read.if.user.fail.when.authenticated=true |
grupos.use.default.credentials.to.read.if.user.fail.when.not.authenticated=true |
grupos.use.default.credentials.to.updates.and.deletes=false |
server.estgp.start.path= |
server.estgp=http://localhost:9090/static |
estgp.encoding=UTF-8 |
457,12 → 468,26 |
# |
siges.degree.1=L |
siges.degree.2=B |
siges.degree.3=D |
siges.degree.4=M |
siges.degree.8=C |
siges.degree.5=H |
siges.degree.6=P |
siges.degree.7=Z |
siges.degree.8=Z |
siges.degree.9=A |
siges.degree.10=T |
siges.degree.11=E |
siges.degree.12=Z |
siges.degree.13=Z |
siges.degree.14=Z |
siges.degree.15=Z |
siges.degree.16=C |
siges.degree.17=O |
national.institution.code=3122 |
siges.institution.code=1 |
ws.siges.wsdl=@ws.siges.wsdl@ |
# DONT USE ANY MORE NOW IS IN CONFIGURATION DAO national.institution.code=3122 |
# DONT USE ANY MORE NOW IS IN CONFIGURATION DAO siges.institution.code=1 |
# DONT USE ANY MORE NOW IS IN CONFIGURATION DAO ws.siges.wsdl=@ws.siges.wsdl@ |
ws.siges.target.namespace=@ws.siges.target.namespace@ |
ws.siges.secret=deptal1232007estg. |
483,6 → 508,11 |
intranet.semestre.S2=Semestre2 |
intranet.semestre.A=Anual |
intranet.semestre.T1=Trimestre1 |
intranet.semestre.T2=Trimestre2 |
intranet.semestre.T3=Trimestre3 |
intranet.semestre.T4=Trimestre4 |
intranet.setup.file=@intranet.setup.folders.file@ |
intranet.setup.users.filename=cursos.txt |
intranet.setup.filename=@intranet.setup.folders.filename@ |
/impl/conf/template/email/unidadeRelatorioAvaliacaoEditado_en.txt |
---|
New file |
0,0 → 1,13 |
#Email unidade ficha em edicao |
Caro membro da comissão de curso de {0} |
O BACO informa-o de que o relatorio de avaliação da unidade curricular de {1} |
foi alterado |
Estado: {2} |
Com os melhores cumprimentos |
--------------------------------------------- |
Escola Superior de Tecnologia e Gestão |
Instituto Politécnico de Portalegre |
http://www.estgp.pt |
Property changes: |
Added: svn:executable |
+ * |
/impl/conf/template/email/GradeUnit.txt |
---|
3,4 → 3,4 |
# 0: Unidade |
# 1: Nota |
################################################## |
{0}:{1}; |
{0} {1} {2} {3} |
/impl/conf/template/email/unidadeRelatorioAvaliacaoEditado_pt.txt |
---|
New file |
0,0 → 1,13 |
#Email unidade ficha em edicao |
Caro membro da comissão de curso de {0} |
O BACO informa-o de que o relatorio de avaliação da unidade curricular de {1} |
foi editado |
Estado: {2} |
Cumprimentos |
--------------------------------------------- |
Escola Superior de Tecnologia e Gestão |
Instituto Politécnico de Portalegre |
http://www.estgp.pt |
/impl/conf/directories/topMenus.xsl |
---|
New file |
0,0 → 1,60 |
<?xml version="1.0" encoding="UTF-8"?> |
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" xmlns:d="http://www.estgp.pt/baco/directory/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > |
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="yes" /> |
<xsl:param name="contextPath">/baco</xsl:param> |
<xsl:template match="/"> |
<table id="menuTop" cellpadding="0" cellspacing="0"> |
<tr> |
<td> |
<ul id="menu_dropdown" class="menubar"> |
<xsl:apply-templates select="/d:directory/d:leaf" mode="root"/> |
</ul> |
</td> |
</tr> |
</table> |
</xsl:template> |
<xsl:template match="d:leaf" mode="root"> |
<li class="submenu"> |
<a> |
<xsl:attribute name="href"> |
<xsl:choose> |
<xsl:when test="@url and @absolute='true'"> |
<xsl:value-of select="@url"/> |
</xsl:when> |
<xsl:when test="@url and @absolute='false'"> |
<xsl:value-of select="$contextPath"/><xsl:value-of select="@url"/> |
</xsl:when> |
<xsl:otherwise>#</xsl:otherwise> |
</xsl:choose> |
</xsl:attribute> |
<xsl:value-of select="@label"/> |
</a> |
<xsl:if test="./d:leaf"> |
<div class="shadow"> |
<ul class="menu"> |
<xsl:for-each select="./d:leaf"> |
<li> |
<a> |
<xsl:attribute name="href"> |
<xsl:choose> |
<xsl:when test="@url and @absolute='true'"> |
<xsl:value-of select="@url"/> |
</xsl:when> |
<xsl:when test="@url and @absolute='false'"> |
<xsl:value-of select="$contextPath"/><xsl:value-of select="@url"/> |
</xsl:when> |
<xsl:otherwise>#</xsl:otherwise> |
</xsl:choose> |
</xsl:attribute> |
<xsl:value-of select="@label"/> |
</a> |
</li> |
</xsl:for-each> |
</ul> |
</div> |
</xsl:if> |
</li> |
</xsl:template> |
</xsl:stylesheet> |
/impl/conf/directories/futureStudent.xml |
---|
1,82 → 1,87 |
<?xml version="1.0" encoding="UTF-8"?> |
<directory label="Futuros Alunos" place="home" layout="layout0" layoutRoot="layoutPortal" targetRole="futureStudent" id="futureStudent" menuKey="menu.futuroAlunos" style="style1.xsl" xmlns="http://www.estgp.pt/baco/directory/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.estgp.pt/baco/directory/directory.xsd"> |
<directory label="Futuros Alunos" place="home" layout="layout0" layoutRoot="layoutPortal" targetRole="futureStudent" id="futureStudent" menuKey="menu.futuroAlunos" style="style1.xsl" xmlns="http://www.estgp.pt/baco/directory/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.estgp.pt/baco/directory/ directory.xsd"> |
<groupsDeclaration> |
<group>1</group> |
<group>2</group> |
<group> |
<name>1</name> |
<description>1</description> |
</group> |
<group> |
<name>2</name> |
<description>2</description> |
</group> |
</groupsDeclaration> |
<node label="A ESTG" id="ESTG" group="1"> |
<leaf absolute="false" url="/pagina.php?nome_id=MensagemDirector" proxy="conteudos" id="estgDirector" label="Mensagem do Director"></leaf> |
<leaf absolute="false" url="/public/portal/estgComoChegarEstg.html" proxy="estgp" id="estgChegar" label="Como Chegar à ESTG"></leaf> |
<leaf absolute="false" url="/public/portal/estgPassado.html" proxy="estgp" id="estgPassado" label="O nosso Passado"></leaf> |
<leaf absolute="false" url="/public/portal/estgPresente.html" proxy="estgp" id="estgPresente" label="O Presente"></leaf> |
<leaf absolute="false" url="/public/portal/estgEdificio.html" proxy="estgp" id="estgCidade" label="O Edifício"></leaf> |
<leaf absolute="false" url="/public/portal/estgMissao.html" proxy="estgp" id="estgMissao" label="Missao"></leaf> |
<leaf absolute="false" url="/public/portal/estgFotos.html" proxy="estgp" id="estgFotos" label="Fotografias"></leaf> |
</node> |
<node label="Serviços on-line" id="servicosOnLine" group="1"> |
<leaf absolute="true" url="http://mail.estgp.pt/exchange/" proxy="estgp" id="servWebmail" label="Webmail"></leaf> |
<leaf absolute="false" url="/public/portal/servicosEduroam.html" proxy="estgp" id="servEduroam" label="Eduroam"></leaf> |
<leaf absolute="false" url="/public/portal/servicosSecretaria.html" proxy="estgp" id="servSecretaria" label="Secretaria"></leaf> |
<leaf absolute="true" url="http://netpa.ipportalegre.pt/" proxy="estgp" id="servAcademicosOnline" label="Académicos online"></leaf> |
<leaf absolute="false" url="/public/portal/servicosGabineteComunicacao.html" proxy="estgp" id="servGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
<leaf absolute="false" url="/public/portal/servicosRegie.html" proxy="estgp" id="servRegie" label="Régie"></leaf> |
<leaf absolute="false" url="/public/portal/servicosCentroInformatico.html" proxy="estgp" id="servCentroInformatico" label="Centro Informático"></leaf> |
</node> |
<node label="Contactos" id="contactos" group="2"> |
<leaf absolute="false" url="/public/portal/contactosGeraisEstg.html" proxy="estgp" id="contGerais" label="Gerais ESTG"></leaf> |
<leaf absolute="false" url="/public/portal/contactosDepartamentos.html" proxy="estgp" id="contDep" label="Departamentos"></leaf> |
<leaf absolute="false" url="/public/portal/contactosSecretaria.html" proxy="estgp" id="contSecretaria" label="Secretaria"></leaf> |
<leaf absolute="false" url="/public/portal/contactosCentroInformatico.html" proxy="estgp" id="contCentroInformatico" label="Centro Informático"></leaf> |
<leaf absolute="false" url="/public/portal/contactosGabineteComunicacao.html" proxy="estgp" id="contGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
</node> |
<node label="Biblioteca" id="biblioteca" group="1"> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaApresentacao.html" proxy="estgp" id="servBiblioteca" label="Apresentação"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaServicos.html" proxy="estgp" id="servBibliotecaServ" label="Serviços"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaColeccoes.html" proxy="estgp" id="servBibliotecaColeccoes" label="Colecções"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaPublico.html" proxy="estgp" id="servBibliotecaPublico" label="Público"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaCatalogos.html" proxy="estgp" id="servBibliotecaCatalogos" label="Catálogos"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaRegulamento.html" proxy="estgp" id="servBiblioteRegulamento" label="Regulamento"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaContactos.html" proxy="estgp" id="servBibliotecaContactos" label="Contactos e Horários"></leaf> |
</node> |
<node label="PALV Erasmus" id="PALVErasmus" group="2"> |
<leaf absolute="false" url="/public/portal/PALVErasmusAlunosEstrangeirosESTG.html" proxy="estgp" id="PALVErasmusAlunosEstrangeiros" label="Os Alunos Estrangeiros na ESTG"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusAlunosESTGEstrangeiro.html" proxy="estgp" id="PALVErasmusEstrangeiroAlunos" label="Os Alunos da ESTG no Estrangeiro"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusObjectivos.html" proxy="estgp" id="PALVErasmusObjectivos" label="Objectivos"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusPaises.html" proxy="estgp" id="PALVErasmusPaises" label="Países Participantes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusProgramaErasmus.html" proxy="estgp" id="PALVErasmusProgramaErasmus" label="Programa Sectorial - Erasmus"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusActividadesElegiveis.html" proxy="estgp" id="PALVErasmusActividadesElegiveis" label="Actividades Elegiveis"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusMobilidadeEstudantes.html" proxy="estgp" id="PALVErasmusMobilidadeEstudantes" label="Mobilidade Estudantes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusParceirosESTG.html" proxy="estgp" id="PALVErasmusParceiros" label="Parceiros"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusFormularioEstudantes.html" proxy="estgp" id="PALVErasmusFomularioEstudantes" label="Formulários Estudantes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusContactos.html" proxy="estgp" id="PALVErasmusContactos" label="Contactos"></leaf> |
</node> |
<node label="Orgãos de Gestão" id="OrgaosGestao" group="1"> |
<leaf absolute="false" url="/public/portal/orgaoDirector.html" proxy="estgp" id="orgaosDirector" label="Director"></leaf> |
<leaf node="true" label="A ESTG" id="ESTG" group="1"> |
<leaf node="false" absolute="false" url="/pagina.php?nome_id=MensagemDirector" proxy="conteudos" id="estgDirector" label="Mensagem do Director"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/estgComoChegarEstg.html" proxy="estgp" id="estgChegar" label="Como Chegar à ESTG"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/estgPassado.html" proxy="estgp" id="estgPassado" label="O nosso Passado"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/estgPresente.html" proxy="estgp" id="estgPresente" label="O Presente"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/estgEdificio.html" proxy="estgp" id="estgCidade" label="O Edifício"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/estgMissao.html" proxy="estgp" id="estgMissao" label="Missao"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/estgFotos.html" proxy="estgp" id="estgFotos" label="Fotografias"></leaf> |
</leaf> |
<leaf node="true" label="Serviços on-line" id="servicosOnLine" group="1"> |
<leaf node="false" absolute="true" url="http://mail.estgp.pt/exchange/" proxy="estgp" id="servWebmail" label="Webmail"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosEduroam.html" proxy="estgp" id="servEduroam" label="Eduroam"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosSecretaria.html" proxy="estgp" id="servSecretaria" label="Secretaria"></leaf> |
<leaf node="false" absolute="true" url="http://netpa.ipportalegre.pt/" proxy="estgp" id="servAcademicosOnline" label="Académicos online"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosGabineteComunicacao.html" proxy="estgp" id="servGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosRegie.html" proxy="estgp" id="servRegie" label="Régie"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosCentroInformatico.html" proxy="estgp" id="servCentroInformatico" label="Centro Informático"></leaf> |
</leaf> |
<leaf node="true" label="Contactos" id="contactos" group="2"> |
<leaf node="false" absolute="false" url="/public/portal/contactosGeraisEstg.html" proxy="estgp" id="contGerais" label="Gerais ESTG"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosDepartamentos.html" proxy="estgp" id="contDep" label="Departamentos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosSecretaria.html" proxy="estgp" id="contSecretaria" label="Secretaria"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosCentroInformatico.html" proxy="estgp" id="contCentroInformatico" label="Centro Informático"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosGabineteComunicacao.html" proxy="estgp" id="contGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
</leaf> |
<leaf node="true" label="Biblioteca" id="biblioteca" group="1"> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaApresentacao.html" proxy="estgp" id="servBiblioteca" label="Apresentação"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaServicos.html" proxy="estgp" id="servBibliotecaServ" label="Serviços"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaColeccoes.html" proxy="estgp" id="servBibliotecaColeccoes" label="Colecções"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaPublico.html" proxy="estgp" id="servBibliotecaPublico" label="Público"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaCatalogos.html" proxy="estgp" id="servBibliotecaCatalogos" label="Catálogos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaRegulamento.html" proxy="estgp" id="servBiblioteRegulamento" label="Regulamento"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaContactos.html" proxy="estgp" id="servBibliotecaContactos" label="Contactos e Horários"></leaf> |
</leaf> |
<leaf node="true" label="PALV Erasmus" id="PALVErasmus" group="2"> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusAlunosEstrangeirosESTG.html" proxy="estgp" id="PALVErasmusAlunosEstrangeiros" label="Os Alunos Estrangeiros na ESTG"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusAlunosESTGEstrangeiro.html" proxy="estgp" id="PALVErasmusEstrangeiroAlunos" label="Os Alunos da ESTG no Estrangeiro"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusObjectivos.html" proxy="estgp" id="PALVErasmusObjectivos" label="Objectivos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusPaises.html" proxy="estgp" id="PALVErasmusPaises" label="Países Participantes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusProgramaErasmus.html" proxy="estgp" id="PALVErasmusProgramaErasmus" label="Programa Sectorial - Erasmus"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusActividadesElegiveis.html" proxy="estgp" id="PALVErasmusActividadesElegiveis" label="Actividades Elegiveis"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusMobilidadeEstudantes.html" proxy="estgp" id="PALVErasmusMobilidadeEstudantes" label="Mobilidade Estudantes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusParceirosESTG.html" proxy="estgp" id="PALVErasmusParceiros" label="Parceiros"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusFormularioEstudantes.html" proxy="estgp" id="PALVErasmusFomularioEstudantes" label="Formulários Estudantes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusContactos.html" proxy="estgp" id="PALVErasmusContactos" label="Contactos"></leaf> |
</leaf> |
<leaf node="true" label="Orgãos de Gestão" id="OrgaosGestao" group="1"> |
<leaf node="false" absolute="false" url="/public/portal/orgaoDirector.html" proxy="estgp" id="orgaosDirector" label="Director"></leaf> |
<leaf absolute="false" url="/public/portal/orgaosConselhoTecnicoCientifico.html" proxy="estgp" id="orgaosConselhoTecnicoCientifico" label="Conselho Técnico Científico"></leaf> |
<leaf absolute="false" url="/Conselho.Tecnico.Cientifico.Externo" proxy="grupos" id="pastaConselhoTecnicoCientificoExterna" label=" -----> Documentação CTC" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoPedagogico.html" proxy="estgp" id="orgaosConselhoPedagogico" label="Conselho Pedagógico"></leaf> |
<leaf absolute="false" url="/Conselho.Pedagogico.Externo" proxy="grupos" id="pastaConselhoPegagogicoExterna" label=" -----> Documentação CP" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoRepresentantes.html" proxy="estgp" id="orgaosConselhoRepresentantes" label="Conselho Representantes"></leaf> |
<leaf absolute="false" url="/Conselho.Representantes.Externo" proxy="grupos" id="pastaConselhoRepresentantesExterna" label=" -----> Documentação CR" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoTecnicoCientifico.html" proxy="estgp" id="orgaosConselhoTecnicoCientifico" label="Conselho Técnico Científico"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Tecnico.Cientifico.Externo" proxy="grupos" id="pastaConselhoTecnicoCientificoExterna" label=" -----> Documentação CTC" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoPedagogico.html" proxy="estgp" id="orgaosConselhoPedagogico" label="Conselho Pedagógico"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Pedagogico.Externo" proxy="grupos" id="pastaConselhoPegagogicoExterna" label=" -----> Documentação CP" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoRepresentantes.html" proxy="estgp" id="orgaosConselhoRepresentantes" label="Conselho Representantes"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Representantes.Externo" proxy="grupos" id="pastaConselhoRepresentantesExterna" label=" -----> Documentação CR" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoGestao.html" proxy="estgp" id="orgaosConselhogestao" label="Conselho de Gestão"></leaf> |
<leaf absolute="false" url="/public/portal/orgaosConselhoInterdepartamental.html" proxy="estgp" id="orgaosConselhoDepartamental" label="Conselho Departamental"></leaf> |
</node> |
<node label="Informação Académica" id="infoAcademica" group="2"> |
<leaf absolute="true" url="http://baco.estgp.pt/dir/student/infoAcademica/infoAcadCalendarioEscolar/public/portal/CL20102011.pdf" proxy="estgp" id="infoAcadCalendarioEscolar" label="Calendário Escolar"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=L" proxy="estgp" id="infoAcadLicenciaturas" label="Licenciaturas"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=M" proxy="estgp" id="infoAcadMestrados" label="Mestrados"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=P" proxy="estgp" id="infoAcadPgraduacoes" label="Pós-Graduações"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=E" proxy="estgp" id="infoAcadCET" label="CET"></leaf> |
</node> |
<node label="O IPP" id="IPP" group="2"> |
<leaf absolute="true" url="http://www.ipportalegre.pt/" proxy="estgp" id="ippIPP" label="IPP Serviços Centrais"></leaf> |
<leaf absolute="true" url="http://www.esep.pt/" proxy="estgp" id="ippESEP" label="Esc. Sup. de Educação"></leaf> |
<leaf absolute="true" url="http://www.esaelvas.pt/" proxy="estgp" id="ippESAE" label="Esc. Sup. Agrária"></leaf> |
<leaf absolute="true" url="http://www.essp.pt/" proxy="estgp" id="ippESSP" label="Esc. Sup. de Saúde"></leaf> |
<leaf absolute="true" url="http://www.ipportalegre.pt/sas/" proxy="estgp" id="ippSAS" label="Serviços de Acção Social"></leaf> |
</node> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoGestao.html" proxy="estgp" id="orgaosConselhogestao" label="Conselho de Gestão"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoInterdepartamental.html" proxy="estgp" id="orgaosConselhoDepartamental" label="Conselho Departamental"></leaf> |
</leaf> |
<leaf node="true" label="Informação Académica" id="infoAcademica" group="2"> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/dir/student/infoAcademica/infoAcadCalendarioEscolar/public/portal/CL20102011.pdf" proxy="estgp" id="infoAcadCalendarioEscolar" label="Calendário Escolar"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=L" proxy="estgp" id="infoAcadLicenciaturas" label="Licenciaturas"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=M" proxy="estgp" id="infoAcadMestrados" label="Mestrados"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=P" proxy="estgp" id="infoAcadPgraduacoes" label="Pós-Graduações"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=E" proxy="estgp" id="infoAcadCET" label="CET"></leaf> |
</leaf> |
<leaf node="true" label="O IPP" id="IPP" group="2"> |
<leaf node="false" absolute="true" url="http://www.ipportalegre.pt/" proxy="estgp" id="ippIPP" label="IPP Serviços Centrais"></leaf> |
<leaf node="false" absolute="true" url="http://www.esep.pt/" proxy="estgp" id="ippESEP" label="Esc. Sup. de Educação"></leaf> |
<leaf node="false" absolute="true" url="http://www.esaelvas.pt/" proxy="estgp" id="ippESAE" label="Esc. Sup. Agrária"></leaf> |
<leaf node="false" absolute="true" url="http://www.essp.pt/" proxy="estgp" id="ippESSP" label="Esc. Sup. de Saúde"></leaf> |
<leaf node="false" absolute="true" url="http://www.ipportalegre.pt/sas/" proxy="estgp" id="ippSAS" label="Serviços de Acção Social"></leaf> |
</leaf> |
</directory> |
/impl/conf/directories/directory.xsd |
---|
1,6 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!-- edited with XMLSpy v2008 rel. 2 sp2 (http://www.altova.com) by Jorge Machado (Escola Superior de tecnologia e Gestao, Portalegre) --> |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.estgp.pt/baco/directory/" targetNamespace="http://www.estgp.pt/baco/directory/" elementFormDefault="qualified" attributeFormDefault="unqualified"> |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.estgp.pt/baco/directory/" |
xmlns:xsl="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.estgp.pt/baco/directory/" |
elementFormDefault="qualified" attributeFormDefault="unqualified"> |
<xs:element name="directory"> |
<xs:annotation> |
<xs:documentation>This schema is to define information structured directories</xs:documentation> |
8,14 → 10,13 |
<xs:complexType> |
<xs:sequence> |
<xs:element name="groupsDeclaration" type="groupDeclarationT" minOccurs="0"/> |
<xs:choice maxOccurs="unbounded"> |
<xs:element name="node" type="nodeT"/> |
<xs:element name="leaf" type="leafT"/> |
</xs:choice> |
<xs:element name="leaf" type="leafT" maxOccurs="unbounded"/> |
<xs:element name="rights" type="rightsT" minOccurs="0"/> |
</xs:sequence> |
<xs:attribute name="id" type="xs:ID" use="required"/> |
<xs:attribute name="label" use="required"/> |
<xs:attribute name="label_en" use="optional"/> |
<xs:attribute name="label_es" use="optional"/> |
<xs:attribute name="place" use="required"/> |
<xs:attribute name="style" use="required"/> |
<xs:attribute name="layout" use="required"/> |
30,13 → 31,12 |
</xs:annotation> |
<xs:sequence> |
<xs:element name="groupsDeclaration" type="groupDeclarationT" minOccurs="0"/> |
<xs:choice maxOccurs="unbounded"> |
<xs:element name="node" type="nodeT"/> |
<xs:element name="leaf" type="leafT"/> |
</xs:choice> |
<xs:element name="leaf" type="leafT" maxOccurs="unbounded"/> |
<xs:element name="rights" type="rightsT" minOccurs="0"/> |
</xs:sequence> |
<xs:attribute name="label" use="required"/> |
<xs:attribute name="label" use="required"/> |
<xs:attribute name="label_en" use="optional"/> |
<xs:attribute name="label_es" use="optional"/> |
<xs:attribute name="group" use="optional"> |
<xs:annotation> |
<xs:documentation>Grouping purposes in styling</xs:documentation> |
65,18 → 65,19 |
<xs:documentation>A leaf is an URL for an external or internal WEB site</xs:documentation> |
</xs:annotation> |
<xs:sequence> |
<xs:choice minOccurs="0" maxOccurs="unbounded"> |
<xs:annotation> |
<xs:documentation>A leaf can be a root of some diferent system like FTP server Directory</xs:documentation> |
</xs:annotation> |
<xs:element name="node" type="nodeT"/> |
<xs:element name="leaf" type="leafT"/> |
</xs:choice> |
<xs:annotation> |
<xs:documentation>A leaf can be a root of some diferent system like FTP server Directory</xs:documentation> |
</xs:annotation> |
<xs:element name="groupsDeclaration" type="groupDeclarationT" minOccurs="0"/> |
<xs:element name="leaf" type="leafT" minOccurs="0" maxOccurs="unbounded"/> |
<xs:element name="rights" type="rightsT" minOccurs="0"/> |
</xs:sequence> |
<xs:attribute name="url" type="xs:string" use="required"/> |
<xs:attribute name="node" type="xs:boolean" use="optional"/> |
<xs:attribute name="url" type="xs:string" use="optional"/> |
<xs:attribute name="id" type="xs:ID" use="required"/> |
<xs:attribute name="label" use="required"/> |
<xs:attribute name="label_en" use="optional"/> |
<xs:attribute name="label_es" use="optional"/> |
<xs:attribute name="xml" type="xs:boolean" use="optional"> |
<xs:annotation> |
<xs:documentation>False by default</xs:documentation> |
93,7 → 94,7 |
When style=false and layout=false external file will be directly writed in TopWindow</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="absolute" type="xs:boolean" use="required"> |
<xs:attribute name="absolute" type="xs:boolean" use="optional"> |
<xs:annotation> |
<xs:documentation>follow parameter will be evaluated only If this parameter is set to false</xs:documentation> |
</xs:annotation> |
139,11 → 140,36 |
</xs:restriction> |
</xs:simpleType> |
</xs:attribute> |
<!-- NODE ATTRIBUTES --> |
<xs:attribute name="showNav" type="xs:boolean" use="optional"> |
<xs:annotation> |
<xs:documentation>Show link to this node in navigation menus, true by default</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="type" use="optional"> |
<xs:annotation> |
<xs:documentation>Type of node, by default HTTP link</xs:documentation> |
</xs:annotation> |
<xs:simpleType> |
<xs:restriction base="xs:string"> |
<xs:enumeration value="ftp"/> |
<xs:enumeration value="http"/> |
</xs:restriction> |
</xs:simpleType> |
</xs:attribute> |
</xs:complexType> |
<xs:complexType name="groupDeclarationT"> |
<xs:sequence> |
<xs:element name="group" maxOccurs="unbounded"/> |
<xs:element name="group" maxOccurs="unbounded"> |
<xs:complexType> |
<xs:sequence> |
<xs:element name="name" type="xs:string"/> |
<xs:element name="description" type="xs:string"/> |
</xs:sequence> |
</xs:complexType> |
</xs:element> |
</xs:sequence> |
</xs:complexType> |
<xs:complexType name="rightsT"> |
151,24 → 177,34 |
<xs:documentation>Rights define who is authorized to enter in a node</xs:documentation> |
</xs:annotation> |
<xs:sequence> |
<xs:choice maxOccurs="unbounded"> |
<xs:element name="role" type="rightT1"/> |
<xs:element name="user" type="rightT1"/> |
</xs:choice> |
<xs:element name="right" maxOccurs="unbounded"> |
<xs:complexType > |
<xs:annotation> |
<xs:documentation>A right T1 can be to permit or restrict</xs:documentation> |
</xs:annotation> |
<xs:attribute name="target" use="required"> |
<xs:simpleType> |
<xs:restriction base="xs:string"> |
<xs:enumeration value="user"/> |
<xs:enumeration value="role"/> |
</xs:restriction> |
</xs:simpleType> |
</xs:attribute> |
<xs:attribute name="type" use="required"> |
<xs:simpleType> |
<xs:restriction base="xs:string"> |
<xs:enumeration value="permit"/> |
<xs:enumeration value="restrict"/> |
</xs:restriction> |
</xs:simpleType> |
</xs:attribute> |
<xs:attribute name="name" use="required" type="xs:string"/> |
</xs:complexType> |
</xs:element> |
<xs:element name="internal" type="xs:boolean" minOccurs="0"/> |
</xs:sequence> |
</xs:complexType> |
<xs:complexType name="rightT1" mixed="true"> |
<xs:annotation> |
<xs:documentation>A right T1 can be to permit or restrict</xs:documentation> |
</xs:annotation> |
<xs:attribute name="type" use="required"> |
<xs:simpleType> |
<xs:restriction base="xs:string"> |
<xs:enumeration value="permit"/> |
<xs:enumeration value="restrict"/> |
</xs:restriction> |
</xs:simpleType> |
</xs:attribute> |
</xs:complexType> |
</xs:schema> |
/impl/conf/directories/styleMapaDir.xsl |
---|
13,11 → 13,11 |
<td>ULR</td> |
<td width="20%">NOTAS</td> |
</tr> |
<xsl:for-each select="//d:node"> |
<xsl:for-each select="//d:leaf[@node='true']"> |
<tr> |
<td colspan="4" style="background-color:#aaaaaa"><xsl:value-of select="@label"/></td> |
</tr> |
<xsl:for-each select="./d:leaf"> |
<xsl:for-each select="./d:leaf[@node='false']"> |
<tr> |
<td><xsl:text>-></xsl:text><xsl:value-of select="@label"/></td> |
<td> |
/impl/conf/directories/utilsIntranet.xml |
---|
1,22 → 1,23 |
<?xml version="1.0" encoding="UTF-8"?> |
<directory place="intranetUtils" label="Utilitários" layout="layoutIntranetUtils" layoutRoot="layoutIntranetUtils" targetRole="student" id="utilsIntranet" menuKey="intranet.separator.utils" style="styleIntranet.xsl" xmlns="http://www.estgp.pt/baco/directory/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.estgp.pt/baco/directory/ directory.xsd"> |
<leaf absolute="false" label="Home Utilitários" layout="true" proxy="estgp" id="utils" url="/intranet/escola/utils.html"/> |
<leaf absolute="false" label="Secretaria" layout="true" proxy="estgp" id="secretaria" url="/intranet/escola/secretaria.html"> |
<leaf absolute="false" label="Documentos de Apoio" layout="true" proxy="estgp" id="documentosApoio" url="/intranet/escola/secretaria/documentosApoio.html"/> |
<leaf absolute="false" label="Formulários [alunos]" layout="true" proxy="estgp" id="Forms.Alunos" url="/intranet/escola/secretaria/formulariosAlunos.html"/> |
<leaf absolute="false" label="Legislação" layout="true" proxy="estgp" id="legislacao" url="/intranet/escola/secretaria/legislacao.html"/> |
<leaf label="Folhas de Presenças" id="Folhas.Presencas" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Intranet/Escola/Secretaria/Folhas.Presencas"/> |
<leaf label="Projetos-AA,CA,GE,MKT" id="Projectos.Finais" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Intranet/Escola/Secretaria/Projectos.Finais"/> |
<leaf label="Atas" id="Actas" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Actas"/> |
<leaf node="false" absolute="false" label="Home Utilitários" layout="true" proxy="estgp" id="utils" url="/intranet/escola/utils.html"/> |
<leaf node="false" absolute="false" label="Secretaria" layout="true" proxy="estgp" id="secretaria" url="/intranet/escola/secretaria.html"> |
<leaf node="false" absolute="false" label="Documentos de Apoio" layout="true" proxy="estgp" id="documentosApoio" url="/intranet/escola/secretaria/documentosApoio.html"/> |
<leaf node="false" absolute="false" label="Formulários [alunos]" layout="true" proxy="estgp" id="Forms.Alunos" url="/intranet/escola/secretaria/formulariosAlunos.html"/> |
<leaf node="false" absolute="false" label="Legislação" layout="true" proxy="estgp" id="legislacao" url="/intranet/escola/secretaria/legislacao.html"/> |
<leaf node="false" label="Folhas de Presenças" id="Folhas.Presencas" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Intranet/Escola/Secretaria/Folhas.Presencas"/> |
<leaf node="false" label="Projetos-AA,CA,GE,MKT" id="Projectos.Finais" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Intranet/Escola/Secretaria/Projectos.Finais"/> |
<leaf node="false" label="Atas" id="Actas" absolute="false" remoteExtensionRoot="true" style="true" proxy="ionline" layout="true" url="/Actas"/> |
</leaf> |
<leaf absolute="false" label="Horários" layout="true" proxy="estgp" id="horarios" url="/intranet/escola/horarios.html"> |
<leaf absolute="false" label="Horários de CET" layout="true" proxy="estgp" id="horariosCet" url="/intranet/escola/horarios_cets.html"/> |
<leaf absolute="false" label="Horários de Licenciaturas" layout="true" proxy="estgp" id="horariosLicenciaturas" url="/intranet/escola/horarios_licenciaturas.html"/> |
<leaf absolute="false" label="Horários de Mestrados" layout="true" proxy="estgp" id="horariosMestrados" url="/intranet/escola/horarios_mestrados.html"/> |
<leaf absolute="false" label="Horários de Docentes" layout="true" proxy="estgp" id="horariosDocentes" url="/intranet/escola/horarios_Docentes.html"/> |
<leaf absolute="false" label="Horários de Salas" layout="true" proxy="estgp" id="horariosSalas" url="/intranet/escola/horarios_salas.html"/> |
<leaf node="false" absolute="false" label="Horários" layout="true" proxy="estgp" id="horarios" url="/intranet/escola/horarios.html"> |
<leaf node="false" absolute="false" label="Horários de CTeSP" layout="true" proxy="estgp" id="horariosCTeSP" url="/intranet/escola/horarios_ctesp.html"/> |
<leaf node="false" absolute="false" label="Horários de CET" layout="true" proxy="estgp" id="horariosCet" url="/intranet/escola/horarios_cets.html"/> |
<leaf node="false" absolute="false" label="Horários de Licenciaturas" layout="true" proxy="estgp" id="horariosLicenciaturas" url="/intranet/escola/horarios_licenciaturas.html"/> |
<leaf node="false" absolute="false" label="Horários de Mestrados" layout="true" proxy="estgp" id="horariosMestrados" url="/intranet/escola/horarios_mestrados.html"/> |
<leaf node="false" absolute="false" label="Horários de Docentes" layout="true" proxy="estgp" id="horariosDocentes" url="/intranet/escola/horarios_Docentes.html"/> |
<leaf node="false" absolute="false" label="Horários de Salas" layout="true" proxy="estgp" id="horariosSalas" url="/intranet/escola/horarios_salas.html"/> |
</leaf> |
<leaf label="Calendário Escolar" id="calEscolar" absolute="false" url="/public/portal/CL20102011.pdf" layout="false" proxy="estgp"/> |
<leaf absolute="false" label="Calendário de Exames" layout="true" proxy="estgp" id="exames" url="/intranet/escola/Exames.html"/> |
<leaf absolute="false" label="Centro Informático" layout="true" proxy="estgp" id="ci" url="/intranet/escola/ci.html"/> |
<leaf node="false" label="Calendário Escolar" id="calEscolar" absolute="false" url="/public/portal/CL20102011.pdf" layout="false" proxy="estgp"/> |
<leaf node="false" absolute="false" label="Calendário de Exames" layout="true" proxy="estgp" id="exames" url="/intranet/escola/Exames.html"/> |
<leaf node="false" absolute="false" label="Centro Informático" layout="true" proxy="estgp" id="ci" url="/intranet/escola/ci.html"/> |
</directory> |
/impl/conf/directories/student.xml |
---|
1,77 → 1,93 |
<?xml version="1.0" encoding="UTF-8"?> |
<directory label="Alunos" place="home" layout="layout0" layoutRoot="layoutPortal" targetRole="student" id="student" menuKey="menu.alunos" style="style1.xsl" xmlns="http://www.estgp.pt/baco/directory/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.estgp.pt/baco/directory/ directory.xsd"> |
<groupsDeclaration> |
<group>1</group> |
<group>2</group> |
</groupsDeclaration> |
<node label="Serviços on-line" id="servicosOnLine" group="1"> |
<leaf absolute="true" url="http://baco.estgp.pt/layout/webmailRedirect.jsp" proxy="estgp" id="servWebmail" label="Webmail"></leaf> |
<leaf absolute="false" url="/public/portal/servicosEduroam.html" proxy="estgp" id="servEduroam" label="Eduroam"></leaf> |
<leaf absolute="false" url="/public/portal/servicosSecretaria.html" proxy="estgp" id="servSecretaria" label="Secretaria"></leaf> |
<leaf absolute="true" url="http://netpa.ipportalegre.pt/" proxy="estgp" id="servAcademicosOnline" label="Académicos online"></leaf> |
<leaf absolute="false" url="/public/portal/servicosGabineteComunicacao.html" proxy="estgp" id="servGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
<leaf absolute="false" url="/public/portal/servicosRegie.html" proxy="estgp" id="servRegie" label="Régie"></leaf> |
<leaf absolute="false" url="/public/portal/servicosCentroInformatico.html" proxy="estgp" id="servCentroInformatico" label="Centro informático"></leaf> |
</node> |
<node label="Contactos" id="contactos" group="2"> |
<leaf absolute="false" url="/public/portal/contactosGeraisEstg.html" proxy="estgp" id="contGerais" label="Gerais ESTG"></leaf> |
<leaf absolute="false" url="/public/portal/contactosDepartamentos.html" proxy="estgp" id="contDep" label="Departamentos"></leaf> |
<leaf absolute="false" url="/public/portal/contactosSecretaria.html" proxy="estgp" id="contSecretaria" label="Secretaria"></leaf> |
<leaf absolute="false" url="/public/portal/contactosCentroInformatico.html" proxy="estgp" id="contCentroInformatico" label="Centro Informático"></leaf> |
<leaf absolute="false" url="/public/portal/contactosGabineteComunicacao.html" proxy="estgp" id="contGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
</node> |
<node label="Biblioteca" id="biblioteca" group="1"> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaApresentacao.html" proxy="estgp" id="servBiblioteca" label="Apresentação"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaServicos.html" proxy="estgp" id="servBibliotecaServ" label="Serviços"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaColeccoes.html" proxy="estgp" id="servBibliotecaColeccoes" label="Coleções"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaPublico.html" proxy="estgp" id="servBibliotecaPublico" label="Público"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaCatalogos.html" proxy="estgp" id="servBibliotecaCatalogos" label="Catálogos"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaRegulamento.html" proxy="estgp" id="servBiblioteRegulamento" label="Regulamento"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaContactos.html" proxy="estgp" id="servBibliotecaContactos" label="Contatos e Horários"></leaf> |
</node> |
<node label="PALV Erasmus" id="PALVErasmus" group="2"> |
<leaf absolute="false" url="/public/portal/PALVErasmusAlunosEstrangeirosESTG.html" proxy="estgp" id="PALVErasmusAlunosEstrangeiros" label="Os Alunos Estrangeiros na ESTG"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusAlunosESTGEstrangeiro.html" proxy="estgp" id="PALVErasmusEstrangeiroAlunos" label="Os Alunos da ESTG no Estrangeiro"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusObjectivos.html" proxy="estgp" id="PALVErasmusObjectivos" label="Objectivos"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusPaises.html" proxy="estgp" id="PALVErasmusPaises" label="Países Participantes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusProgramaErasmus.html" proxy="estgp" id="PALVErasmusProgramaErasmus" label="Programa Setorial - Erasmus"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusActividadesElegiveis.html" proxy="estgp" id="PALVErasmusActividadesElegiveis" label="Atividades Elegiveis"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusMobilidadeEstudantes.html" proxy="estgp" id="PALVErasmusMobilidadeEstudantes" label="Mobilidade Estudantes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusParceirosESTG.html" proxy="estgp" id="PALVErasmusParceiros" label="Parceiros"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusFormularioEstudantes.html" proxy="estgp" id="PALVErasmusFomularioEstudantes" label="Formulários Estudantes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusContactos.html" proxy="estgp" id="PALVErasmusContactos" label="Contactos"></leaf> |
</node> |
<node label="Orgãos de Gestão" id="OrgaosGestao" group="1"> |
<leaf absolute="false" url="/public/portal/orgaoDirector.html" proxy="estgp" id="orgaosDirector" label="Diretor"></leaf> |
<groupsDeclaration> |
<group> |
<name>1</name> |
<description>1</description> |
</group> |
<group> |
<name>2</name> |
<description>2</description> |
</group> |
</groupsDeclaration> |
<leaf node="true" label="Serviços on-line" id="servicosOnLine" group="1"> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/layout/webmailRedirect.jsp" proxy="estgp" id="servWebmail" label="Webmail"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosEduroam.html" proxy="estgp" id="servEduroam" label="Eduroam"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosSecretaria.html" proxy="estgp" id="servSecretaria" label="Secretaria"></leaf> |
<leaf node="false" absolute="true" url="http://netpa.ipportalegre.pt/" proxy="estgp" id="servAcademicosOnline" label="Académicos online"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosGabineteComunicacao.html" proxy="estgp" id="servGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosRegie.html" proxy="estgp" id="servRegie" label="Régie"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosCentroInformatico.html" proxy="estgp" id="servCentroInformatico" label="Centro informático"></leaf> |
</leaf> |
<leaf node="true" label="Contactos" id="contactos" group="2"> |
<leaf node="false" absolute="false" url="/public/portal/contactosGeraisEstg.html" proxy="estgp" id="contGerais" label="Gerais ESTG"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosDepartamentos.html" proxy="estgp" id="contDep" label="Departamentos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosSecretaria.html" proxy="estgp" id="contSecretaria" label="Secretaria"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosCentroInformatico.html" proxy="estgp" id="contCentroInformatico" label="Centro Informático"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosGabineteComunicacao.html" proxy="estgp" id="contGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
</leaf> |
<leaf node="true" label="Biblioteca" id="biblioteca" group="1"> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaApresentacao.html" proxy="estgp" id="servBiblioteca" label="Apresentação"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaServicos.html" proxy="estgp" id="servBibliotecaServ" label="Serviços"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaColeccoes.html" proxy="estgp" id="servBibliotecaColeccoes" label="Coleções"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaPublico.html" proxy="estgp" id="servBibliotecaPublico" label="Público"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaCatalogos.html" proxy="estgp" id="servBibliotecaCatalogos" label="Catálogos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaRegulamento.html" proxy="estgp" id="servBiblioteRegulamento" label="Regulamento"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaContactos.html" proxy="estgp" id="servBibliotecaContactos" label="Contatos e Horários"></leaf> |
</leaf> |
<leaf node="true" label="PALV Erasmus" id="PALVErasmus" group="2"> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusAlunosEstrangeirosESTG.html" proxy="estgp" id="PALVErasmusAlunosEstrangeiros" label="Os Alunos Estrangeiros na ESTG"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusAlunosESTGEstrangeiro.html" proxy="estgp" id="PALVErasmusEstrangeiroAlunos" label="Os Alunos da ESTG no Estrangeiro"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusObjectivos.html" proxy="estgp" id="PALVErasmusObjectivos" label="Objectivos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusPaises.html" proxy="estgp" id="PALVErasmusPaises" label="Países Participantes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusProgramaErasmus.html" proxy="estgp" id="PALVErasmusProgramaErasmus" label="Programa Setorial - Erasmus"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusActividadesElegiveis.html" proxy="estgp" id="PALVErasmusActividadesElegiveis" label="Atividades Elegiveis"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusMobilidadeEstudantes.html" proxy="estgp" id="PALVErasmusMobilidadeEstudantes" label="Mobilidade Estudantes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusParceirosESTG.html" proxy="estgp" id="PALVErasmusParceiros" label="Parceiros"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusFormularioEstudantes.html" proxy="estgp" id="PALVErasmusFomularioEstudantes" label="Formulários Estudantes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusContactos.html" proxy="estgp" id="PALVErasmusContactos" label="Contactos"></leaf> |
</leaf> |
<leaf node="true" label="Orgãos de Gestão" id="OrgaosGestao" group="1"> |
<leaf node="false" absolute="false" url="/public/portal/orgaoDirector.html" proxy="estgp" id="orgaosDirector" label="Diretor"></leaf> |
<leaf absolute="false" url="/public/portal/orgaosConselhoTecnicoCientifico.html" proxy="estgp" id="orgaosConselhoTecnicoCientifico" label="Conselho Técnico Científico"></leaf> |
<leaf absolute="false" url="/Conselho.Tecnico.Cientifico.Externo" proxy="grupos" id="pastaConselhoTecnicoCientificoExterna" label=" -----> Documentação CTC" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoPedagogico.html" proxy="estgp" id="orgaosConselhoPedagogico" label="Conselho Pedagógico"></leaf> |
<leaf absolute="false" url="/Conselho.Pedagogico.Externo" proxy="grupos" id="pastaConselhoPegagogicoExterna" label=" -----> Documentação CP" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoRepresentantes.html" proxy="estgp" id="orgaosConselhoRepresentantes" label="Conselho Representantes"></leaf> |
<leaf absolute="false" url="/Conselho.Representantes.Externo" proxy="grupos" id="pastaConselhoRepresentantesExterna" label=" -----> Documentação CR" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoTecnicoCientifico.html" proxy="estgp" id="orgaosConselhoTecnicoCientifico" label="Conselho Técnico Científico"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Tecnico.Cientifico.Externo" proxy="grupos" id="pastaConselhoTecnicoCientificoExterna" label=" -----> Documentação CTC" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoPedagogico.html" proxy="estgp" id="orgaosConselhoPedagogico" label="Conselho Pedagógico"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Pedagogico.Externo" proxy="grupos" id="pastaConselhoPegagogicoExterna" label=" -----> Documentação CP" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoRepresentantes.html" proxy="estgp" id="orgaosConselhoRepresentantes" label="Conselho Representantes"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Representantes.Externo" proxy="grupos" id="pastaConselhoRepresentantesExterna" label=" -----> Documentação CR" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoGestao.html" proxy="estgp" id="orgaosConselhogestao" label="Conselho de Gestão"></leaf> |
<leaf absolute="false" url="/public/portal/orgaosConselhoInterdepartamental.html" proxy="estgp" id="orgaosConselhoDepartamental" label="Conselho Interdepartamental"></leaf> |
</node> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoGestao.html" proxy="estgp" id="orgaosConselhogestao" label="Conselho de Gestão"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoInterdepartamental.html" proxy="estgp" id="orgaosConselhoDepartamental" label="Conselho Interdepartamental"></leaf> |
<rights> |
<right target="role" type="restrict" name="student"/> |
<internal>true</internal> |
</rights> |
</leaf> |
<node label="Informação Académica" id="infoAcademica" group="2"> |
<leaf absolute="false" url="/public/portal/CL20102011.pdf" proxy="estgp" id="infoAcadCalendarioEscolar" label="Calendário Escolar"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=L" proxy="estgp" id="infoAcadLicenciaturas" label="Licenciaturas"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=M" proxy="estgp" id="infoAcadMestrados" label="Mestrados"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=P" proxy="estgp" id="infoAcadPgraduacoes" label="Pós-Graduações"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=E" proxy="estgp" id="infoAcadCET" label="CET"></leaf> |
</node> |
<node label="O IPP" id="IPP" group="1"> |
<leaf absolute="true" url="http://www.ipportalegre.pt/" proxy="estgp" id="ippIPP" label="IPP Serviços Centrais"></leaf> |
<leaf absolute="true" url="http://www.esep.pt/" proxy="estgp" id="ippESEP" label="Esc. Sup. de Educação"></leaf> |
<leaf absolute="true" url="http://www.esaelvas.pt/" proxy="estgp" id="ippESAE" label="Esc. Sup. Agrária"></leaf> |
<leaf absolute="true" url="http://www.essp.pt/" proxy="estgp" id="ippESSP" label="Esc. Sup. de Saúde"></leaf> |
<leaf absolute="true" url="http://www.ipportalegre.pt/sas/" proxy="estgp" id="ippSAS" label="Serviços de Acção Social"></leaf> |
</node> |
<node label="Departamentos" id="departamentos" group="2"> |
<leaf absolute="false" url="/public/departamentos/depTD.html" proxy="estgp" id="depTD" label="Departamento de TD"></leaf> |
<leaf absolute="false" url="/public/departamentos/depCESH.html" proxy="estgp" id="depCESH" label="Departamento de CESH"></leaf> |
</node> |
<leaf node="true" label="Informação Académica" id="infoAcademica" group="2"> |
<leaf node="false" absolute="false" url="/public/portal/CL20102011.pdf" proxy="estgp" id="infoAcadCalendarioEscolar" label="Calendário Escolar"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=L" proxy="estgp" id="infoAcadLicenciaturas" label="Licenciaturas"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=M" proxy="estgp" id="infoAcadMestrados" label="Mestrados"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=P" proxy="estgp" id="infoAcadPgraduacoes" label="Pós-Graduações"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=E" proxy="estgp" id="infoAcadCET" label="CET"></leaf> |
<rights> |
<right target="user" type="restrict" name="jmachado"/> |
</rights> |
</leaf> |
<leaf node="true" label="O IPP" id="IPP" group="1"> |
<leaf node="false" absolute="true" url="http://www.ipportalegre.pt/" proxy="estgp" id="ippIPP" label="IPP Serviços Centrais"></leaf> |
<leaf node="false" absolute="true" url="http://www.esep.pt/" proxy="estgp" id="ippESEP" label="Esc. Sup. de Educação"></leaf> |
<leaf node="false" absolute="true" url="http://www.esaelvas.pt/" proxy="estgp" id="ippESAE" label="Esc. Sup. Agrária"></leaf> |
<leaf node="false" absolute="true" url="http://www.essp.pt/" proxy="estgp" id="ippESSP" label="Esc. Sup. de Saúde"></leaf> |
<leaf node="false" absolute="true" url="http://www.ipportalegre.pt/sas/" proxy="estgp" id="ippSAS" label="Serviços de Acção Social"></leaf> |
</leaf> |
<leaf node="true" label="Departamentos" id="departamentos" group="2"> |
<leaf node="false" absolute="false" url="/public/departamentos/depTD.html" proxy="estgp" id="depTD" label="Departamento de TD"></leaf> |
<leaf node="false" absolute="false" url="/public/departamentos/depCESH.html" proxy="estgp" id="depCESH" label="Departamento de CESH"></leaf> |
</leaf> |
<rights> |
<right target="role" type="permit" name="admin"/> |
<right target="role" type="restrict" name="student"/> |
</rights> |
</directory> |
/impl/conf/directories/utils.xsl |
---|
11,7 → 11,7 |
</a> |
</xsl:template> |
<xsl:template match="d:node" mode="link"> |
<xsl:template match="d:leaf[@node='true']" mode="link"> |
<a> |
<xsl:attribute name="href"> |
<xsl:choose> |
26,14 → 26,17 |
<xsl:apply-templates select="." mode="label"/> |
</a> |
</xsl:template> |
<xsl:template match="d:leaf" mode="link"> |
<xsl:template match="d:leaf[@node='false']" mode="link"> |
<a> |
<xsl:attribute name="href"> |
<xsl:choose> |
<xsl:when test="string(@absolute)='true'"> |
<xsl:value-of select="@url"/> |
</xsl:when> |
<xsl:when test="@idPrefixSize"><xsl:value-of select="$dirStartPath"/><xsl:apply-templates select=".." mode="linkParent"/>/<xsl:value-of select="substring(@id,@idPrefixSize+1)"/></xsl:when> |
<xsl:value-of select="@url"/> |
</xsl:when> |
<xsl:when test="@proxy='local'"> |
<xsl:value-of select="$contextPath"/><xsl:value-of select="@url"/> |
</xsl:when> |
<xsl:when test="@idPrefixSize"><xsl:value-of select="$dirStartPath"/><xsl:apply-templates select=".." mode="linkParent"/>/<xsl:value-of select="substring(@id,@idPrefixSize+1)"/></xsl:when> |
<xsl:when test="@remoteExtensionRoot='true'"><xsl:value-of select="$dirStartPath"/><xsl:apply-templates select=".." mode="linkParent"/>/<xsl:value-of select="@id"/></xsl:when> |
<xsl:otherwise><xsl:value-of select="$dirStartPath"/><xsl:apply-templates select=".." mode="linkParent"/>/<xsl:value-of select="@id"/><xsl:value-of select="@url"/></xsl:otherwise> |
</xsl:choose> |
41,12 → 44,24 |
<xsl:apply-templates select="." mode="label"/> |
</a> |
</xsl:template> |
<!-- |
- A variavel de ambiente dirStartPath é o contextPath + /dir |
- Os templates linkparent tem por objectivo escrever toda a hierarquia de ID's até ao elemento directory |
- Todos os nós que trazem o atributo idPrefixSize significa que foram extendidos a partir de um FTP |
não são orginais do XML do directório |
- por exemplo para o id gerado FTP_4_DTP será |
um elemento representativo de uma pasta DTP, o id é unico porque 4 é a profundidade onde ele |
está logo o par 4 + DTP é único supostamente a menos que alguém vá criar uma pasta com este nome |
o que é quase impossivel |
substring(@id,@idPrefixSize+1) este código com o id de exemplo vai originar DTP no link |
--> |
<xsl:template match="d:directory" mode="linkParent">/<xsl:value-of select="@id"/></xsl:template> |
<xsl:template match="d:node" mode="linkParent"> |
<xsl:template match="d:leaf[@node='true']" mode="linkParent"> |
<xsl:choose> |
<xsl:when test="@idPrefixSize"><xsl:apply-templates select=".." mode="linkParent"/>/<xsl:value-of select="substring(@id,@idPrefixSize+1)"/></xsl:when> |
<xsl:otherwise><xsl:apply-templates select=".." mode="linkParent"/>/<xsl:value-of select="@id"/></xsl:otherwise> |
55,11 → 70,11 |
<xsl:template match="d:leaf" mode="linkParent"> |
<xsl:template match="d:leaf[@node='false']" mode="linkParent"> |
<xsl:apply-templates select=".." mode="linkParent"/>/<xsl:value-of select="@id"/> |
</xsl:template> |
<xsl:template match="d:leaf" mode="bodyContent"> |
<xsl:template match="d:leaf[@node='false']" mode="bodyContent"> |
<xsl:choose> |
<xsl:when test="string(@xml) = 'true'"> |
<xsl:variable name="bodyDoc" select="document($includeXML)"/> |
74,10 → 89,10 |
<xsl:template match="d:directory" mode="label"> |
<xsl:value-of select="@label"/> |
</xsl:template> |
<xsl:template match="d:node" mode="label"> |
<xsl:template match="d:leaf[@node='true']" mode="label"> |
<xsl:value-of select="@label"/> |
</xsl:template> |
<xsl:template match="d:leaf" mode="label"> |
<xsl:template match="d:leaf[@node='false']" mode="label"> |
<xsl:value-of select="@label"/> |
</xsl:template> |
/impl/conf/directories/style1.xsl |
---|
247,7 → 247,7 |
<xsl:apply-templates select="." mode="childs"/> |
</xsl:template> |
<xsl:template match="d:node" mode="root"> |
<xsl:template match="d:leaf[@node='true']" mode="root"> |
<xsl:apply-templates select="." mode="topNav"/> |
<table cellpadding="0" cellspacing="0" width="100%" border="0"> |
<tr> |
267,11 → 267,11 |
<table class="columnTable"> |
<tr> |
<td class="column"> |
<xsl:if test="d:leaf"> |
<xsl:if test="d:leaf[@node='false']"> |
<div class="block links"> |
<p><xsl:call-template name="leafsBlockLabel"/></p> |
<ul> |
<xsl:for-each select="d:leaf"> |
<xsl:for-each select="d:leaf[@node='false']"> |
<li> |
<xsl:apply-templates select="." mode="link"/> |
</li> |
280,13 → 280,13 |
</div> |
</xsl:if> |
</td> |
<xsl:if test="d:node"> |
<xsl:if test="d:leaf[@node='true']"> |
<xsl:choose> |
<xsl:when test="d:groupsDeclaration"> |
<xsl:for-each select="d:groupsDeclaration/d:group"> |
<xsl:when test="d:groupsDeclaration/d:group/d:name"> |
<xsl:for-each select="d:groupsDeclaration/d:group/d:name"> |
<tr> |
<xsl:variable name="group" select="."/> |
<xsl:for-each select="../../d:node[@group=$group]"> |
<xsl:for-each select="../../../d:leaf[@node='true' and @group=$group]"> |
<td class="column"> |
<xsl:apply-templates select="." mode="block"/> |
</td> |
295,7 → 295,7 |
</xsl:for-each> |
</xsl:when> |
<xsl:otherwise> |
<xsl:for-each select="d:node"> |
<xsl:for-each select="d:leaf[@node='true']"> |
<td class="column"> |
<xsl:apply-templates select="." mode="block"/> |
</td> |
307,15 → 307,15 |
</table> |
</xsl:template> |
<xsl:template match="d:node" mode="childs"> |
<xsl:template match="d:leaf[@node='true']" mode="childs"> |
<table class="columnTable"> |
<tr> |
<td class="column"> |
<xsl:if test="d:leaf"> |
<xsl:if test="d:leaf[@node='false']"> |
<div class="block links"> |
<p><xsl:call-template name="leafsBlockLabel"/></p> |
<ul> |
<xsl:for-each select="d:leaf"> |
<xsl:for-each select="d:leaf[@node='false']"> |
<li> |
<xsl:apply-templates select="." mode="link"/> |
</li> |
324,13 → 324,13 |
</div> |
</xsl:if> |
</td> |
<xsl:if test="d:node"> |
<xsl:if test="d:leaf[@node='true']"> |
<xsl:choose> |
<xsl:when test="d:groupsDeclaration"> |
<xsl:for-each select="d:groupsDeclaration/d:group"> |
<xsl:when test="d:groupsDeclaration/d:group/d:name"> |
<xsl:for-each select="d:groupsDeclaration/d:group/d:name"> |
<tr> |
<xsl:variable name="group" select="."/> |
<xsl:for-each select="../../d:node[@group=$group]"> |
<xsl:for-each select="../../../d:leaf[@node='true' and @group=$group]"> |
<td class="column"> |
<xsl:apply-templates select="." mode="block"/> |
</td> |
339,7 → 339,7 |
</xsl:for-each> |
</xsl:when> |
<xsl:otherwise> |
<xsl:for-each select="d:node"> |
<xsl:for-each select="d:leaf[@node='true']"> |
<td class="column"> |
<xsl:apply-templates select="." mode="block"/> |
</td> |
351,16 → 351,16 |
</table> |
</xsl:template> |
<xsl:template match="d:node" mode="block"> |
<xsl:template match="d:leaf[@node='true']" mode="block"> |
<div class="block"> |
<p><xsl:apply-templates select="." mode="link"/></p> |
<ul> |
<xsl:for-each select="d:leaf"> |
<xsl:for-each select="d:leaf[@node='false']"> |
<li> |
<xsl:apply-templates select="." mode="link"/> |
</li> |
</xsl:for-each> |
<xsl:for-each select="d:node"> |
<xsl:for-each select="d:leaf[@node='true']"> |
<li> |
<xsl:apply-templates select="." mode="link"/> |
</li> |
373,7 → 373,7 |
| Página de Apresentação de uma Folha no Corpo da Página |
=========================================================== |
--> |
<xsl:template match="d:leaf" mode="root"> |
<xsl:template match="d:leaf[@node='false']" mode="root"> |
<xsl:apply-templates select="." mode="topNav"/> |
<table id="bigTable" cellspacing="0" cellpadding="0"> |
<tr> |
417,12 → 417,12 |
Tamanho |
</th> |
</tr> |
<xsl:apply-templates select="./d:leaf[@ftpDirectory='true']" mode="ftpLine"/> |
<xsl:apply-templates select="./d:leaf[@ftpDirectory='false']" mode="ftpLine"/> |
<xsl:apply-templates select="./d:leaf[@node='false' and @ftpDirectory='true']" mode="ftpLine"/> |
<xsl:apply-templates select="./d:leaf[@node='false' and @ftpDirectory='false']" mode="ftpLine"/> |
</table> |
</div> |
</xsl:template> |
<xsl:template match="d:leaf" mode="ftpLine"> |
<xsl:template match="d:leaf[@node='false']" mode="ftpLine"> |
<xsl:choose> |
<xsl:when test="./@ftpDirectory='true'"> |
<tr class="dir"> |
451,7 → 451,7 |
</xsl:otherwise> |
</xsl:choose> |
</xsl:template> |
<xsl:template match="d:leaf" mode="mime"> |
<xsl:template match="d:leaf[@node='false']" mode="mime"> |
<img> |
<xsl:attribute name="alt"><xsl:value-of select="."/></xsl:attribute> |
<xsl:attribute name="src"> |
490,7 → 490,7 |
--> |
<xsl:template match="d:leaf" mode="topNav"> |
<xsl:template match="d:leaf[@node='false']" mode="topNav"> |
<div id="topnav"> |
<ul> |
<xsl:apply-templates select=".." mode="navBack"/> |
502,7 → 502,7 |
</div> |
</xsl:template> |
<xsl:template match="d:node" mode="topNav"> |
<xsl:template match="d:leaf[@node='true']" mode="topNav"> |
<div id="topnav"> |
<ul> |
<xsl:apply-templates select=".." mode="navBack"/> |
529,7 → 529,7 |
</div>--> |
</xsl:template> |
<xsl:template match="d:leaf" mode="topNavRemote"> |
<xsl:template match="d:leaf[@node='false']" mode="topNavRemote"> |
<div id="topnav"> |
<ul> |
<li class="navPlace"> |
538,7 → 538,7 |
</div> |
</xsl:template> |
<xsl:template match="d:node" mode="topNavRemote"> |
<xsl:template match="d:leaf[@node='true']" mode="topNavRemote"> |
<div id="topnav"> |
<ul> |
<xsl:apply-templates select=".." mode="navBackRemote"/> |
561,7 → 561,7 |
</li> |
</xsl:template> |
<xsl:template match="d:node" mode="navBack"> |
<xsl:template match="d:leaf[@node='true']" mode="navBack"> |
<xsl:apply-templates select=".." mode="navBack"/> |
<li class="navPlace"> |
570,7 → 570,7 |
</li> |
</xsl:template> |
<xsl:template match="d:leaf" mode="navBack"> |
<xsl:template match="d:leaf[@node='false']" mode="navBack"> |
<xsl:apply-templates select=".." mode="navBack"/> |
<li class="navPlace"> |
579,12 → 579,12 |
</li> |
</xsl:template> |
<xsl:template match="d:leaf" mode="navBackRemote"> |
<xsl:template match="d:leaf[@node='false']" mode="navBackRemote"> |
<li class="navPlace"> |
<xsl:apply-templates select="." mode="link"/> |
</li> |
</xsl:template> |
<xsl:template match="d:node" mode="navBackRemote"> |
<xsl:template match="d:leaf[@node='true']" mode="navBackRemote"> |
<xsl:apply-templates select=".." mode="navBackRemote"/> |
<li class="navPlace"> |
> |
597,15 → 597,15 |
| Barra de Navegação Lateral Esquerda |
=========================================================== |
--> |
<xsl:template match="d:node" mode="latNav"> |
<xsl:if test="./d:leaf or ./d:node"> |
<xsl:template match="d:leaf[@node='true']" mode="latNav"> |
<!--<xsl:if test="./d:leaf or ./d:node">--> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul id="portalMenu"> |
<xsl:for-each select="./d:node"> |
<xsl:for-each select="./d:leaf[@node='true']"> |
<xsl:choose> |
<xsl:when test="@id = $ACTUAL"> |
<li class="navPlace selected"> |
619,24 → 619,24 |
</xsl:otherwise> |
</xsl:choose> |
</xsl:for-each> |
<xsl:for-each select="./d:leaf"> |
<xsl:for-each select="./d:leaf[@node='false']"> |
<li class="navPlace">...<xsl:apply-templates select="." mode="link"/></li> |
</xsl:for-each> |
</ul> |
</div> |
</div> |
</div> |
</xsl:if> |
<!--</xsl:if>--> |
</xsl:template> |
<xsl:template match="d:leaf" mode="latNav"> |
<xsl:if test="./d:leaf or ./d:node"> |
<xsl:template match="d:leaf[@node='false']" mode="latNav"> |
<!--<xsl:if test="./d:leaf or ./d:node">--> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul id="portalMenu"> |
<xsl:for-each select="./d:node"> |
<xsl:for-each select="./d:leaf[@node='true']"> |
<xsl:choose> |
<xsl:when test="@id = $ACTUAL"> |
<li class="navPlace selected"> |
650,24 → 650,24 |
</xsl:otherwise> |
</xsl:choose> |
</xsl:for-each> |
<xsl:for-each select="./d:leaf"> |
<xsl:for-each select="./d:leaf[@node='false']"> |
<li class="navPlace">...<xsl:apply-templates select="." mode="link"/></li> |
</xsl:for-each> |
</ul> |
</div> |
</div> |
</div> |
</xsl:if> |
<!--</xsl:if>--> |
</xsl:template> |
<xsl:template match="d:directory" mode="latNav"> |
<xsl:if test="./d:leaf or ./d:node"> |
<!--<xsl:if test="./d:leaf or ./d:node">--> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul id="portalMenu"> |
<xsl:for-each select="./d:node"> |
<xsl:for-each select="./d:leaf[@node='true']"> |
<xsl:choose> |
<xsl:when test="@id = $ACTUAL"> |
<li class="navPlace selected"> |
681,14 → 681,14 |
</xsl:otherwise> |
</xsl:choose> |
</xsl:for-each> |
<xsl:for-each select="./d:leaf"> |
<xsl:for-each select="./d:leaf[@node='false']"> |
<li class="navPlace"><xsl:call-template name="linkPrefix"/><xsl:apply-templates select="." mode="link"/></li> |
</xsl:for-each> |
</ul> |
</div> |
</div> |
</div> |
</xsl:if> |
<!--</xsl:if>--> |
</xsl:template> |
<xsl:template name="linkPrefix"> |
701,9 → 701,9 |
--> |
<xsl:template name="treeRoot"> |
<xsl:if test="/d:directory/d:node"> |
<xsl:if test="/d:directory/d:leaf[@node='true']"> |
<ul> |
<xsl:for-each select="/d:directory/d:node"> |
<xsl:for-each select="/d:directory/d:leaf[@node='true']"> |
<li> |
<xsl:apply-templates select="." mode="treeLoop"/> |
</li> |
712,20 → 712,20 |
</xsl:if> |
</xsl:template> |
<xsl:template match="d:node" mode="treeLoop"> |
<xsl:template match="d:leaf[@node='true']" mode="treeLoop"> |
<div> |
<xsl:if test="$ACTUAL=@id"> |
<xsl:attribute name="style">background-color:yellow</xsl:attribute> |
</xsl:if> |
<p><xsl:value-of select="@label"/></p> |
<xsl:if test="./d:leaf"> |
<xsl:for-each select="./d:leaf"> |
<xsl:if test="./d:leaf[@node='false']"> |
<xsl:for-each select="./d:leaf[@node='false']"> |
<xsl:apply-templates select="." mode="tree"/> |
</xsl:for-each> |
</xsl:if> |
<xsl:if test="./d:node"> |
<xsl:if test="./d:leaf[@node='true']"> |
<ul> |
<xsl:for-each select="./d:node"> |
<xsl:for-each select="./d:leaf[@node='true']"> |
<li> |
<xsl:apply-templates select="." mode="treeLoop"/> |
</li> |
735,7 → 735,7 |
</div> |
</xsl:template> |
<xsl:template match="d:leaf" mode="tree"> |
<xsl:template match="d:leaf[@node='false']" mode="tree"> |
<div> |
<xsl:if test="$ACTUAL=@id"> |
<xsl:attribute name="style">background-color:yellow</xsl:attribute> |
/impl/conf/directories/topMenus.xml |
---|
New file |
0,0 → 1,50 |
<?xml version="1.0" encoding="UTF-8"?> |
<directory id="topMenus" label="Menus de Top" place="home" layout="" layoutRoot="" targetRole="" menuKey="" style="topMenus.xsl" xmlns="http://www.estgp.pt/baco/directory/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.estgp.pt/baco/directory/ directory.xsd"> |
<leaf node="true" label="Apresentação" id="app"> |
<leaf node="false" id="msgDir" label="Mensagem do Director" absolute="false" url="/dir/futureStudent/ESTG/estgDirector/public/portal/estgMensagemDirector.html" proxy="local"/> |
<leaf node="false" id="missao" label="A ESTG e a sua missão" absolute="false" url="/dir/futureStudent/ESTG/estgMissao/public/portal/estgMissao.html" proxy="local"/> |
<leaf node="false" id="historia" label="História" absolute="false" url="/dir/futureStudent/ESTG/estgPassado/public/portal/estgPassado.html" proxy="local"/> |
<leaf node="false" id="localizacao" label="Localização" absolute="false" url="/dir/futureStudent/ESTG/estgChegar/public/portal/estgComoChegarEstg.html" proxy="local"/> |
<leaf node="false" id="fotos" label="A ESTG em Fotografias" absolute="false" url="/dir/futureStudent/ESTG/estgFotos/public/portal/estgFotos.html" proxy="local"/> |
</leaf> |
<leaf node="true" label="Organização" id="org"> |
<leaf node="false" id="director" label="Director" absolute="false" url="/dir/student/OrgaosGestao/orgaosDirector/public/portal/orgaoDirector.html" proxy="local"/> |
<leaf node="false" id="ctc" label="Conselho Tecnico Cientifico" absolute="false" url="/dir/student/OrgaosGestao/orgaosConselhoTecnicoCientifico/public/portal/orgaosConselhoTecnicoCientifico.html" proxy="local"/> |
<leaf node="false" id="cr" label="Conselho de Representantes" absolute="false" url="/dir/student/OrgaosGestao/orgaosConselhoRepresentantes/public/portal/orgaosConselhoRepresentantes.html" proxy="local"/> |
<leaf node="false" id="cp" label="Conselho Pedagógico" absolute="false" url="/dir/student/OrgaosGestao/orgaosConselhoPedagogico/public/portal/orgaosConselhoPedagogico.html" proxy="local"/> |
<leaf node="false" id="cg" label="Conselho de Gestão" absolute="false" url="/dir/student/OrgaosGestao/orgaosConselhogestao/public/portal/orgaosConselhoGestao.html" proxy="local"/> |
<leaf node="false" id="cint" label="Conselho Interdepartamental" absolute="false" url="/dir/teacher/OrgaosGestao/orgaosConselhoInterdepartamental/public/portal/orgaosConselhoInterdepartamental.html" proxy="local"/> |
</leaf> |
<leaf node="true" label="Departamentos" id="departamentos"> |
<leaf node="false" id="dtd" label="Tecnologia e Design" absolute="false" url="/dir/student/departamentos/depTD/public/departamentos/depTD.html" proxy="local"/> |
<leaf node="false" id="cesh" label="Ciencias Empresariais Sociais e Humanas" absolute="false" url="/dir/student/departamentos/depTD/public/departamentos/depCESH.html" proxy="local"/> |
</leaf> |
<leaf node="true" label="Ensino" id="ensino"> |
<leaf node="false" id="lecenciaturas" label="Licenciaturas" absolute="false" url="/courses.do?type=L" proxy="local"/> |
<leaf node="false" id="mestrados" label="Mestrados" absolute="false" url="/courses.do?type=M" proxy="local"/> |
<leaf node="false" id="accurtadur" label="Acções de Formação de Curta Duração" absolute="false" url="/courses.do?type=C" proxy="local"/> |
<leaf node="false" id="cet" label="CET" absolute="false" url="/courses.do?type=E" proxy="local"/> |
<leaf node="false" id="favanc" label="Formações Avançadas" absolute="false" url="/courses.do?type=A" proxy="local"/> |
<leaf node="false" id="pgrad" label="Pós Graduação" absolute="false" url="/courses.do?type=P" proxy="local"/> |
<leaf node="false" id="tesp" label="TeSP" absolute="false" url="/courses.do?type=T" proxy="local"/> |
</leaf> |
<leaf node="true" label="I&D" id="ied"> |
<leaf node="false" id="poliempreende" label="Poliempreende" absolute="true" url="http://www.ipportalegre.pt/poliempreende/" proxy="local"/> |
<leaf node="false" id="alimentsaud" label="Alimentação Saudável" absolute="true" url="http://alimentacaosaudavel.ipportalegre.pt" proxy="local"/> |
<leaf node="false" id="c3i" label="C3i" absolute="true" url="http://www.c3i.ipportalegre.pt/" proxy="local"/> |
</leaf> |
<leaf node="false" id="contactos" label="Contactos" absolute="false" url="/dir/student/contactos/contGerais/public/portal/contactosGeraisEstg.html" proxy="local"/> |
<leaf node="true" label="O Politécnico" id="politecnico"> |
<leaf node="false" id="ipp" label="Instituto Politécnico de Portalegre" absolute="true" url="http://www.ipportalegre.pt/" proxy="local"/> |
<leaf node="false" id="esep" label="E. S. Educação" absolute="true" url="http://www.esep.pt/" proxy="local"/> |
<leaf node="false" id="esae" label="E. S. Agrária de Elvas" absolute="true" url="http://www.esaelvas.pt/" proxy="local"/> |
<leaf node="false" id="essp" label="E. S. Saúde" absolute="true" url="http://www.essp.pt/" proxy="local"/> |
<leaf node="false" id="sas" label="SAS" absolute="true" url="http://www.ipportalegre.pt/sas/" proxy="local"/> |
</leaf> |
</directory> |
/impl/conf/directories/styleIntranet.xsl |
---|
12,7 → 12,7 |
</xsl:template> |
<xsl:template match="d:leaf" mode="topNav"> |
<xsl:template match="d:leaf[@node='false']" mode="topNav"> |
<xsl:if test="not(local-name(..) = 'directory')"> |
<div id="topnav"> |
<ul> |
26,7 → 26,7 |
</xsl:if> |
</xsl:template> |
<xsl:template match="d:node" mode="topNav"> |
<xsl:template match="d:leaf[@node='true']" mode="topNav"> |
<xsl:if test="not(local-name(..) = 'directory')"> |
<div id="topnav"> |
<ul> |
48,7 → 48,7 |
</xsl:template> |
<xsl:template match="d:leaf" mode="topNavRemote"> |
<xsl:template match="d:leaf[@node='false']" mode="topNavRemote"> |
<div id="topnav"> |
<ul> |
<li class="navPlace"> |
57,7 → 57,7 |
</div> |
</xsl:template> |
<xsl:template match="d:node" mode="topNavRemote"> |
<xsl:template match="d:leaf[@node='true']" mode="topNavRemote"> |
<div id="topnav"> |
<ul> |
<xsl:apply-templates select=".." mode="navBackRemote"/> |
80,7 → 80,7 |
</li> |
</xsl:template> |
<xsl:template match="d:node" mode="navBack"> |
<xsl:template match="d:leaf[@node='true']" mode="navBack"> |
<xsl:if test="not(local-name(..) = 'directory')"> |
<xsl:apply-templates select=".." mode="navBack"/> |
</xsl:if> |
94,7 → 94,7 |
</li> |
</xsl:template> |
<xsl:template match="d:leaf" mode="navBack"> |
<xsl:template match="d:leaf[@node='false']" mode="navBack"> |
<xsl:if test="not(local-name(..) = 'directory')"> |
<xsl:apply-templates select=".." mode="navBack"/> |
</xsl:if> |
107,12 → 107,12 |
</li> |
</xsl:template> |
<xsl:template match="d:leaf" mode="navBackRemote"> |
<xsl:template match="d:leaf[@node='false']" mode="navBackRemote"> |
<li class="navPlace"> |
<xsl:apply-templates select="." mode="link"/> |
</li> |
</xsl:template> |
<xsl:template match="d:node" mode="navBackRemote"> |
<xsl:template match="d:leaf[@node='true']" mode="navBackRemote"> |
<xsl:apply-templates select=".." mode="navBackRemote"/> |
<li class="navPlace"> |
> |
125,15 → 125,15 |
| Barra de Navegação Lateral Esquerda |
=========================================================== |
--> |
<xsl:template match="d:node" mode="latNav"> |
<xsl:if test="./d:leaf or ./d:node"> |
<xsl:template match="d:leaf[@node='true']" mode="latNav"> |
<!--<xsl:if test="./d:leaf or ./d:node">--> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul id="portalMenu"> |
<xsl:for-each select="./d:node"> |
<xsl:for-each select="./d:leaf[@node='true']"> |
<xsl:choose> |
<xsl:when test="@id = $ACTUAL"> |
<li class="navPlace selected"> |
147,24 → 147,24 |
</xsl:otherwise> |
</xsl:choose> |
</xsl:for-each> |
<xsl:for-each select="./d:leaf"> |
<xsl:for-each select="./d:leaf[@node='false']"> |
<li class="navPlace">...<xsl:apply-templates select="." mode="link"/></li> |
</xsl:for-each> |
</ul> |
</div> |
</div> |
</div> |
</xsl:if> |
<!--</xsl:if>--> |
</xsl:template> |
<xsl:template match="d:leaf" mode="latNav"> |
<xsl:if test="./d:leaf or ./d:node"> |
<xsl:template match="d:leaf[@node='false']" mode="latNav"> |
<!--<xsl:if test="./d:leaf or ./d:node">--> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"><xsl:apply-templates select="." mode="label"/></div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul id="portalMenu"> |
<xsl:for-each select="./d:node"> |
<xsl:for-each select="./d:leaf[@node='true']"> |
<xsl:choose> |
<xsl:when test="@id = $ACTUAL"> |
<li class="navPlace selected"> |
178,14 → 178,14 |
</xsl:otherwise> |
</xsl:choose> |
</xsl:for-each> |
<xsl:for-each select="./d:leaf"> |
<xsl:for-each select="./d:leaf[@node='false']"> |
<li class="navPlace"><xsl:apply-templates select="." mode="link"/></li> |
</xsl:for-each> |
</ul> |
</div> |
</div> |
</div> |
</xsl:if> |
<!--</xsl:if>--> |
</xsl:template> |
/impl/conf/directories/teacher.xml |
---|
1,74 → 1,80 |
<?xml version="1.0" encoding="UTF-8"?> |
<directory label="Docentes" place="home" layout="layout0" layoutRoot="layoutPortal" targetRole="teacher" id="teacher" menuKey="menu.docentes" style="style1.xsl" xmlns="http://www.estgp.pt/baco/directory/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.estgp.pt/baco/directory/ directory.xsd"> |
<groupsDeclaration> |
<group>1</group> |
<group>2</group> |
</groupsDeclaration> |
<node label="Serviços on-line" id="servicosOnLine" group="1"> |
<leaf absolute="true" url="http://baco.estgp.pt/layout/webmailRedirect.jsp" proxy="estgp" id="servWebmail" label="Webmail"></leaf> |
<leaf absolute="false" url="/public/portal/servicosEduroam.html" proxy="estgp" id="servEduroam" label="Eduroam"></leaf> |
<leaf absolute="false" url="/public/portal/servicosSecretaria.html" proxy="estgp" id="servSecretaria" label="Secretaria"></leaf> |
<leaf absolute="true" url="http://netpa.ipportalegre.pt/" proxy="estgp" id="servAcademicosOnline" label="Académicos online"></leaf> |
<leaf absolute="false" url="/public/portal/servicosGabineteComunicacao.html" proxy="estgp" id="servGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
<leaf absolute="true" url="http://assiduidade.ipportalegre.pt/mymillenium/" proxy="estgp" id="servPortalAssiduidade" label="Portal de Assiduidade"></leaf> |
<leaf absolute="true" url="http://sisgor.ipportalegre.pt/" proxy="estgp" id="servSisgom" label="Sisgor Ocorrências"></leaf> |
<leaf absolute="true" url="https://www.siadap.gov.pt/" proxy="estgp" id="siadap" label="Siadap"></leaf> |
</node> |
<node label="Contactos" id="contactos" group="2"> |
<leaf absolute="false" url="/public/portal/contactosGeraisEstg.html" proxy="estgp" id="contGerais" label="Gerais ESTG"></leaf> |
<leaf absolute="false" url="/public/portal/contactosDepartamentos.html" proxy="estgp" id="contDep" label="Departamentos"></leaf> |
<leaf absolute="false" url="/public/portal/contactosSecretaria.html" proxy="estgp" id="contSecretaria" label="Secretaria"></leaf> |
<leaf absolute="false" url="/public/portal/contactosCentroInformatico.html" proxy="estgp" id="contCentroInformatico" label="Centro Informático"></leaf> |
<leaf absolute="false" url="/public/portal/contactosGabineteComunicacao.html" proxy="estgp" id="contGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
</node> |
<node label="Biblioteca" id="biblioteca" group="1"> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaApresentacao.html" proxy="estgp" id="servBiblioteca" label="Apresentação"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaServicos.html" proxy="estgp" id="servBibliotecaServ" label="Serviços"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaColeccoes.html" proxy="estgp" id="servBibliotecaColeccoes" label="Coleções"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaPublico.html" proxy="estgp" id="servBibliotecaPublico" label="Público"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaCatalogos.html" proxy="estgp" id="servBibliotecaCatalogos" label="Catálogos"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaRegulamento.html" proxy="estgp" id="servBiblioteRegulamento" label="Regulamento"></leaf> |
<leaf absolute="false" url="/public/portal/servicosBibliotecaContactos.html" proxy="estgp" id="servBibliotecaContactos" label="Contactos e Horários"></leaf> |
</node> |
<node label="PALV Erasmus" id="PALVErasmus" group="2"> |
<leaf absolute="false" url="/public/portal/PALVErasmusDocentesEstrangeirosESTG.html" proxy="estgp" id="PALVErasmusDocentesEstrangeiros" label="Os Docentes Estrangeiros na ESTG"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusDocentesESTGEstrangeiro.html" proxy="estgp" id="PALVErasmusEstrangeiroDocentes" label="Os Docentes da ESTG no Estrangeiro"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusObjectivos.html" proxy="estgp" id="PALVErasmusObjectivos" label="Objectivos"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusPaises.html" proxy="estgp" id="PALVErasmusPaises" label="Países Participantes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusProgramaErasmus.html" proxy="estgp" id="PALVErasmusProgramaErasmus" label="Programa Setorial - Erasmus"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusActividadesElegiveis.html" proxy="estgp" id="PALVErasmusActividadesElegiveis" label="Atividades Elegiveis"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusMobilidadeEstudantes.html" proxy="estgp" id="PALVErasmusMobilidadeEstudantes" label="Mobilidade Estudantes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusParceirosESTG.html" proxy="estgp" id="PALVErasmusParceiros" label="Parceiros"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusFormularioDocentes.html" proxy="estgp" id="PALVErasmusFomularioDocentes" label="Formulários Docentes"></leaf> |
<leaf absolute="false" url="/public/portal/PALVErasmusContactos.html" proxy="estgp" id="PALVErasmusContactos" label="Contactos"></leaf> |
</node> |
<node label="Orgãos de Gestão" id="OrgaosGestao" group="1"> |
<leaf absolute="false" url="/public/portal/orgaoDirector.html" proxy="estgp" id="orgaosDirector" label="Director"></leaf> |
<leaf absolute="false" url="/public/portal/orgaosConselhoTecnicoCientifico.html" proxy="estgp" id="orgaosConselhoTecnicoCientifico" label="Conselho Técnico Científico"></leaf> |
<leaf absolute="false" url="/Conselho.Tecnico.Cientifico.Externo" proxy="grupos" id="pastaConselhoTecnicoCientificoExterna" label=" -----> Documentação CTC" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoPedagogico.html" proxy="estgp" id="orgaosConselhoPedagogico" label="Conselho Pedagógico"></leaf> |
<leaf absolute="false" url="/Conselho.Pedagogico.Externo" proxy="grupos" id="pastaConselhoPegagogicoExterna" label=" -----> Documentação CP" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoRepresentantes.html" proxy="estgp" id="orgaosConselhoRepresentantes" label="Conselho Representantes"></leaf> |
<leaf absolute="false" url="/Conselho.Representantes.Externo" proxy="grupos" id="pastaConselhoRepresentantesExterna" label=" -----> Documentação CR" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf absolute="false" url="/public/portal/orgaosConselhoGestao.html" proxy="estgp" id="orgaosConselhogestao" label="Conselho de Gestão"></leaf> |
<leaf absolute="false" url="/public/portal/orgaosConselhoInterdepartamental.html" proxy="estgp" id="orgaosConselhoInterdepartamental" label="Conselho Interdepartamental"></leaf> |
</node> |
<node label="Informação Académica" id="infoAcademica" group="2"> |
<leaf absolute="true" url="http://baco.estgp.pt/dir/student/infoAcademica/infoAcadCalendarioEscolar/public/portal/CL20102011.pdf" proxy="estgp" id="infoAcadCalendarioEscolar" label="Calendário Escolar"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=L" proxy="estgp" id="infoAcadLicenciaturas" label="Licenciaturas"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=M" proxy="estgp" id="infoAcadMestrados" label="Mestrados"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=P" proxy="estgp" id="infoAcadPgraduacoes" label="Pós-Graduações"></leaf> |
<leaf absolute="true" url="http://baco.estgp.pt/courses.do?type=E" proxy="estgp" id="infoAcadCET" label="CET"></leaf> |
</node> |
<node label="O IPP" id="IPP" group="1"> |
<leaf absolute="true" url="http://www.ipportalegre.pt/" proxy="estgp" id="ippIPP" label="IPP Serviços Centrais"></leaf> |
<leaf absolute="true" url="http://www.esep.pt/" proxy="estgp" id="ippESEP" label="Esc. Sup. de Educação"></leaf> |
<leaf absolute="true" url="http://www.esaelvas.pt/" proxy="estgp" id="ippESAE" label="Esc. Sup. Agrária"></leaf> |
<leaf absolute="true" url="http://www.essp.pt/" proxy="estgp" id="ippESSP" label="Esc. Sup. de Saúde"></leaf> |
<leaf absolute="true" url="http://www.ipportalegre.pt/sas/" proxy="estgp" id="ippSAS" label="Serviços de Ação Social"></leaf> |
</node> |
<node label="Departamentos" id="departamentos" group="2"> |
<leaf absolute="false" url="/public/departamentos/depTD.html" proxy="estgp" id="depTD" label="Departamento de TD"></leaf> |
<leaf absolute="false" url="/public/departamentos/depCESH.html" proxy="estgp" id="depCESH" label="Departamento de CESH"></leaf> |
</node> |
<groupsDeclaration> |
<group> |
<name>1</name> |
<description>1</description> |
</group> |
<group> |
<name>2</name> |
<description>2</description> |
</group> |
</groupsDeclaration> |
<leaf node="true" label="Serviços on-line" id="servicosOnLine" group="1"> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/layout/webmailRedirect.jsp" proxy="estgp" id="servWebmail" label="Webmail"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosEduroam.html" proxy="estgp" id="servEduroam" label="Eduroam"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosSecretaria.html" proxy="estgp" id="servSecretaria" label="Secretaria"></leaf> |
<leaf node="false" absolute="true" url="http://netpa.ipportalegre.pt/" proxy="estgp" id="servAcademicosOnline" label="Académicos online"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosGabineteComunicacao.html" proxy="estgp" id="servGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
<leaf node="false" absolute="true" url="http://assiduidade.ipportalegre.pt/mymillenium/" proxy="estgp" id="servPortalAssiduidade" label="Portal de Assiduidade"></leaf> |
<leaf node="false" absolute="true" url="http://sisgor.ipportalegre.pt/" proxy="estgp" id="servSisgom" label="Sisgor Ocorrências"></leaf> |
<leaf node="false" absolute="true" url="https://www.siadap.gov.pt/" proxy="estgp" id="siadap" label="Siadap"></leaf> |
</leaf> |
<leaf node="true" label="Contactos" id="contactos" group="2"> |
<leaf node="false" absolute="false" url="/public/portal/contactosGeraisEstg.html" proxy="estgp" id="contGerais" label="Gerais ESTG"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosDepartamentos.html" proxy="estgp" id="contDep" label="Departamentos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosSecretaria.html" proxy="estgp" id="contSecretaria" label="Secretaria"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosCentroInformatico.html" proxy="estgp" id="contCentroInformatico" label="Centro Informático"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/contactosGabineteComunicacao.html" proxy="estgp" id="contGabinetedeComunicacao" label="Gabinete de Comunicação"></leaf> |
</leaf> |
<leaf node="true" label="Biblioteca" id="biblioteca" group="1"> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaApresentacao.html" proxy="estgp" id="servBiblioteca" label="Apresentação"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaServicos.html" proxy="estgp" id="servBibliotecaServ" label="Serviços"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaColeccoes.html" proxy="estgp" id="servBibliotecaColeccoes" label="Coleções"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaPublico.html" proxy="estgp" id="servBibliotecaPublico" label="Público"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaCatalogos.html" proxy="estgp" id="servBibliotecaCatalogos" label="Catálogos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaRegulamento.html" proxy="estgp" id="servBiblioteRegulamento" label="Regulamento"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/servicosBibliotecaContactos.html" proxy="estgp" id="servBibliotecaContactos" label="Contactos e Horários"></leaf> |
</leaf> |
<leaf node="true" label="PALV Erasmus" id="PALVErasmus" group="2"> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusDocentesEstrangeirosESTG.html" proxy="estgp" id="PALVErasmusDocentesEstrangeiros" label="Os Docentes Estrangeiros na ESTG"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusDocentesESTGEstrangeiro.html" proxy="estgp" id="PALVErasmusEstrangeiroDocentes" label="Os Docentes da ESTG no Estrangeiro"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusObjectivos.html" proxy="estgp" id="PALVErasmusObjectivos" label="Objectivos"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusPaises.html" proxy="estgp" id="PALVErasmusPaises" label="Países Participantes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusProgramaErasmus.html" proxy="estgp" id="PALVErasmusProgramaErasmus" label="Programa Setorial - Erasmus"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusActividadesElegiveis.html" proxy="estgp" id="PALVErasmusActividadesElegiveis" label="Atividades Elegiveis"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusMobilidadeEstudantes.html" proxy="estgp" id="PALVErasmusMobilidadeEstudantes" label="Mobilidade Estudantes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusParceirosESTG.html" proxy="estgp" id="PALVErasmusParceiros" label="Parceiros"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusFormularioDocentes.html" proxy="estgp" id="PALVErasmusFomularioDocentes" label="Formulários Docentes"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/PALVErasmusContactos.html" proxy="estgp" id="PALVErasmusContactos" label="Contactos"></leaf> |
</leaf> |
<leaf node="true" label="Orgãos de Gestão" id="OrgaosGestao" group="1"> |
<leaf node="false" absolute="false" url="/public/portal/orgaoDirector.html" proxy="estgp" id="orgaosDirector" label="Director"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoTecnicoCientifico.html" proxy="estgp" id="orgaosConselhoTecnicoCientifico" label="Conselho Técnico Científico"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Tecnico.Cientifico.Externo" proxy="grupos" id="pastaConselhoTecnicoCientificoExterna" label=" -----> Documentação CTC" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoPedagogico.html" proxy="estgp" id="orgaosConselhoPedagogico" label="Conselho Pedagógico"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Pedagogico.Externo" proxy="grupos" id="pastaConselhoPegagogicoExterna" label=" -----> Documentação CP" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoRepresentantes.html" proxy="estgp" id="orgaosConselhoRepresentantes" label="Conselho Representantes"></leaf> |
<leaf node="false" absolute="false" url="/Conselho.Representantes.Externo" proxy="grupos" id="pastaConselhoRepresentantesExterna" label=" -----> Documentação CR" remoteExtensionRoot="true" style="true" layout="true" /> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoGestao.html" proxy="estgp" id="orgaosConselhogestao" label="Conselho de Gestão"></leaf> |
<leaf node="false" absolute="false" url="/public/portal/orgaosConselhoInterdepartamental.html" proxy="estgp" id="orgaosConselhoInterdepartamental" label="Conselho Interdepartamental"></leaf> |
</leaf> |
<leaf node="true" label="Informação Académica" id="infoAcademica" group="2"> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/dir/student/infoAcademica/infoAcadCalendarioEscolar/public/portal/CL20102011.pdf" proxy="estgp" id="infoAcadCalendarioEscolar" label="Calendário Escolar"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=L" proxy="estgp" id="infoAcadLicenciaturas" label="Licenciaturas"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=M" proxy="estgp" id="infoAcadMestrados" label="Mestrados"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=P" proxy="estgp" id="infoAcadPgraduacoes" label="Pós-Graduações"></leaf> |
<leaf node="false" absolute="true" url="http://baco.estgp.pt/courses.do?type=E" proxy="estgp" id="infoAcadCET" label="CET"></leaf> |
</leaf> |
<leaf node="true" label="O IPP" id="IPP" group="1"> |
<leaf node="false" absolute="true" url="http://www.ipportalegre.pt/" proxy="estgp" id="ippIPP" label="IPP Serviços Centrais"></leaf> |
<leaf node="false" absolute="true" url="http://www.esep.pt/" proxy="estgp" id="ippESEP" label="Esc. Sup. de Educação"></leaf> |
<leaf node="false" absolute="true" url="http://www.esaelvas.pt/" proxy="estgp" id="ippESAE" label="Esc. Sup. Agrária"></leaf> |
<leaf node="false" absolute="true" url="http://www.essp.pt/" proxy="estgp" id="ippESSP" label="Esc. Sup. de Saúde"></leaf> |
<leaf node="false" absolute="true" url="http://www.ipportalegre.pt/sas/" proxy="estgp" id="ippSAS" label="Serviços de Ação Social"></leaf> |
</leaf> |
<leaf node="true" label="Departamentos" id="departamentos" group="2"> |
<leaf node="false" absolute="false" url="/public/departamentos/depTD.html" proxy="estgp" id="depTD" label="Departamento de TD"></leaf> |
<leaf node="false" absolute="false" url="/public/departamentos/depCESH.html" proxy="estgp" id="depCESH" label="Departamento de CESH"></leaf> |
</leaf> |
</directory> |
/impl/conf/directories/directoryBeforeConfiguration.xsd |
---|
New file |
0,0 → 1,180 |
<?xml version="1.0" encoding="UTF-8"?> |
<!-- edited with XMLSpy v2008 rel. 2 sp2 (http://www.altova.com) by Jorge Machado (Escola Superior de tecnologia e Gestao, Portalegre) --> |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.estgp.pt/baco/directory/" targetNamespace="http://www.estgp.pt/baco/directory/" elementFormDefault="qualified" attributeFormDefault="unqualified"> |
<xs:element name="directory"> |
<xs:annotation> |
<xs:documentation>This schema is to define information structured directories</xs:documentation> |
</xs:annotation> |
<xs:complexType> |
<xs:sequence> |
<xs:element name="groupsDeclaration" type="groupDeclarationT" minOccurs="0"/> |
<xs:choice maxOccurs="unbounded"> |
<xs:element name="node" type="nodeT"/> |
<xs:element name="leaf" type="leafT"/> |
</xs:choice> |
<xs:element name="rights" type="rightsT" minOccurs="0"/> |
</xs:sequence> |
<xs:attribute name="id" type="xs:ID" use="required"/> |
<xs:attribute name="label" use="required"/> |
<xs:attribute name="label_en" use="optional"/> |
<xs:attribute name="label_es" use="optional"/> |
<xs:attribute name="place" use="required"/> |
<xs:attribute name="style" use="required"/> |
<xs:attribute name="layout" use="required"/> |
<xs:attribute name="layoutRoot" use="required"/> |
<xs:attribute name="targetRole" use="required"/> |
<xs:attribute name="menuKey" use="required"/> |
</xs:complexType> |
</xs:element> |
<xs:complexType name="nodeT"> |
<xs:annotation> |
<xs:documentation>A node is a directory internal object, it has a label and an identifier and can have children nodes and/or leafs</xs:documentation> |
</xs:annotation> |
<xs:sequence> |
<xs:element name="groupsDeclaration" type="groupDeclarationT" minOccurs="0"/> |
<xs:choice maxOccurs="unbounded"> |
<xs:element name="node" type="nodeT"/> |
<xs:element name="leaf" type="leafT"/> |
</xs:choice> |
<xs:element name="rights" type="rightsT" minOccurs="0"/> |
</xs:sequence> |
<xs:attribute name="label" use="required"/> |
<xs:attribute name="label_en" use="optional"/> |
<xs:attribute name="label_es" use="optional"/> |
<xs:attribute name="group" use="optional"> |
<xs:annotation> |
<xs:documentation>Grouping purposes in styling</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="showNav" type="xs:boolean" use="optional"> |
<xs:annotation> |
<xs:documentation>Show link to this node in navigation menus, true by default</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="type" use="optional"> |
<xs:annotation> |
<xs:documentation>Type of node, by default HTTP link</xs:documentation> |
</xs:annotation> |
<xs:simpleType> |
<xs:restriction base="xs:string"> |
<xs:enumeration value="ftp"/> |
<xs:enumeration value="http"/> |
</xs:restriction> |
</xs:simpleType> |
</xs:attribute> |
<xs:attribute name="id" type="xs:ID" use="required"/> |
</xs:complexType> |
<xs:complexType name="leafT"> |
<xs:annotation> |
<xs:documentation>A leaf is an URL for an external or internal WEB site</xs:documentation> |
</xs:annotation> |
<xs:sequence> |
<xs:choice minOccurs="0" maxOccurs="unbounded"> |
<xs:annotation> |
<xs:documentation>A leaf can be a root of some diferent system like FTP server Directory</xs:documentation> |
</xs:annotation> |
<xs:element name="node" type="nodeT"/> |
<xs:element name="leaf" type="leafT"/> |
</xs:choice> |
<xs:element name="rights" type="rightsT" minOccurs="0"/> |
</xs:sequence> |
<xs:attribute name="url" type="xs:string" use="required"/> |
<xs:attribute name="id" type="xs:ID" use="required"/> |
<xs:attribute name="label" use="required"/> |
<xs:attribute name="label_en" use="optional"/> |
<xs:attribute name="label_es" use="optional"/> |
<xs:attribute name="xml" type="xs:boolean" use="optional"> |
<xs:annotation> |
<xs:documentation>False by default</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="layout" type="xs:boolean"> |
<xs:annotation> |
<xs:documentation>True by default, define if a source is to be included in layout or opened in all window</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="style" type="xs:boolean"> |
<xs:annotation> |
<xs:documentation>True by default, define if a source is to be styled by the XSLT. |
When style=false and layout=false external file will be directly writed in TopWindow</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="absolute" type="xs:boolean" use="required"> |
<xs:annotation> |
<xs:documentation>follow parameter will be evaluated only If this parameter is set to false</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="proxy" type="xs:string" use="optional"> |
<xs:annotation> |
<xs:documentation>Only consider a proxy if it is here defined</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="group" use="optional"> |
<xs:annotation> |
<xs:documentation>Grouping purposes in styling</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="remoteExtensionRoot" type="xs:boolean" use="optional"/> |
<!-- |
The next attributes are filled by system BACO when remoteExtensionPoint is reached |
--> |
<xs:attribute name="ftpDirectory" type="xs:boolean"/> |
<xs:attribute name="size" use="optional"> |
<xs:annotation> |
<xs:documentation>Size of content in Kb</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="mimeType" use="optional"> |
<xs:annotation> |
<xs:documentation>Mime Type of content in Kb</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="lastModification" use="optional"> |
<xs:annotation> |
<xs:documentation>Last Modification of content in Kb</xs:documentation> |
</xs:annotation> |
</xs:attribute> |
<xs:attribute name="visualization" use="optional"> |
<xs:annotation> |
<xs:documentation>Type of node, by default HTTP link</xs:documentation> |
</xs:annotation> |
<xs:simpleType> |
<xs:restriction base="xs:string"> |
<xs:enumeration value="filesystem"/> |
<xs:enumeration value="normal"/> |
</xs:restriction> |
</xs:simpleType> |
</xs:attribute> |
</xs:complexType> |
<xs:complexType name="groupDeclarationT"> |
<xs:sequence> |
<xs:element name="group" maxOccurs="unbounded"/> |
</xs:sequence> |
</xs:complexType> |
<xs:complexType name="rightsT"> |
<xs:annotation> |
<xs:documentation>Rights define who is authorized to enter in a node</xs:documentation> |
</xs:annotation> |
<xs:sequence> |
<xs:choice maxOccurs="unbounded"> |
<xs:element name="role" type="rightT1"/> |
<xs:element name="user" type="rightT1"/> |
</xs:choice> |
<xs:element name="internal" type="xs:boolean" minOccurs="0"/> |
</xs:sequence> |
</xs:complexType> |
<xs:complexType name="rightT1" mixed="true"> |
<xs:annotation> |
<xs:documentation>A right T1 can be to permit or restrict</xs:documentation> |
</xs:annotation> |
<xs:attribute name="type" use="required"> |
<xs:simpleType> |
<xs:restriction base="xs:string"> |
<xs:enumeration value="permit"/> |
<xs:enumeration value="restrict"/> |
</xs:restriction> |
</xs:simpleType> |
</xs:attribute> |
</xs:complexType> |
</xs:schema> |
Property changes: |
Added: svn:executable |
+ * |
/impl/conf/directories/editados/teacher.xml |
---|
1,4 → 1,4 |
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
<directory label="Docentes" place="home" layout="layout0" layoutRoot="layoutPortal" targetRole="teacher" id="teacher" menuKey="menu.docentes" style="style1.xsl" xmlns="http://www.estgp.pt/baco/directory/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.estgp.pt/baco/directory/ directory.xsd"> |
<groupsDeclaration> |
<group>1</group> |
/impl/conf/berserk/sd.xml |
---|
266,7 → 266,20 |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerAnnouncementsMax</name> |
<implementationClass>pt.estgp.estgweb.services.announcements.LoadOwnerAnnouncements</implementationClass> |
<description>Load owner Blogs</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadMax</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<!--Teste--> |
<service> |
<name>TesteSaver</name> |
421,7 → 434,20 |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadEditableBlogsMax</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadEditableBlogs</implementationClass> |
<description>Load editable Blogs</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadMax</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerBlogs</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadOwnerBlogs</implementationClass> |
<description>Load owner Blogs</description> |
433,6 → 459,18 |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerBlogsMax</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadOwnerBlogs</implementationClass> |
<description>Load owner Blogs</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadMax</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerBlogPosts</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadOwnerBlogPosts</implementationClass> |
<description>Load owner Blog Posts</description> |
443,6 → 481,18 |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerBlogPostsMax</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadOwnerBlogPosts</implementationClass> |
<description>Load owner Blog Posts</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadMax</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
845,6 → 895,18 |
</service> |
<service> |
<name>LoadCourseUnitInEvaluationBySigesCodes</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadCourseUnitsBySigesCodesService</implementationClass> |
<description>Load course old units</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadUnitInEvaluation</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
</filterChains> |
</service> |
<service> |
<name>LoadCourseUnitsBySigesCodesSemestreLastYear</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadCourseUnitsBySigesCodesService</implementationClass> |
<description>Load a unique unit by sigescode, semestre and course code</description> |
1062,6 → 1124,15 |
</filterChains> |
</service> |
<service> |
<name>LoadSubscribedUnitsGivenYear</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadSubscribedUnitsCurrentYearService</implementationClass> |
<description>Load student units in current Year</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>givenYear</defaultMethod> |
<filterChains> |
</filterChains> |
</service> |
<service> |
<name>LoadSubscribedUnitsOldYears</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadSubscribedUnitsOldYearsService</implementationClass> |
<description>Load student units in current Year</description> |
2026,5 → 2097,138 |
</service> |
<!--DIRECTORIES--> |
<service> |
<name>LoadDirectoryService</name> |
<implementationClass>pt.estgp.estgweb.services.directories.DirectoryService</implementationClass> |
<description>Loads a Directory</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadDirectory</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="ServicesOrAdmin"/> |
</filterChains> |
</service> |
<service> |
<name>LoadDirectoryServiceXml</name> |
<implementationClass>pt.estgp.estgweb.services.directories.DirectoryService</implementationClass> |
<description>Loads a Directory</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadDirectoryXml</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
</filterChains> |
</service> |
<service> |
<name>LoadDirectoryServiceHtml</name> |
<implementationClass>pt.estgp.estgweb.services.directories.DirectoryService</implementationClass> |
<description>Loads a Directory and style it with XSL</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadDirectoryHtml</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
</filterChains> |
</service> |
<service> |
<name>SaveDirectoryService</name> |
<implementationClass>pt.estgp.estgweb.services.directories.DirectoryService</implementationClass> |
<description>Save a Directory Object</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>saveDirectory</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="Admins"/> |
</filterChains> |
</service> |
<service> |
<name>LoadJobServiceTaskSchedullers</name> |
<implementationClass>pt.estgp.estgweb.services.jobs.JobServiceInterfaces</implementationClass> |
<description>Save a Directory Object</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadJobServiceTaskSchedullers</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="Admins"/> |
</filterChains> |
</service> |
<service> |
<name>LoadJobServiceTask</name> |
<implementationClass>pt.estgp.estgweb.services.jobs.JobServiceInterfaces</implementationClass> |
<description>Save a Directory Object</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadJobServiceTask</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="Admins"/> |
</filterChains> |
</service> |
<service> |
<name>LoadJobServiceTaskScheduler</name> |
<implementationClass>pt.estgp.estgweb.services.jobs.JobServiceInterfaces</implementationClass> |
<description>Save a Directory Object</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadJobServiceTaskScheduler</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="Admins"/> |
</filterChains> |
</service> |
<service> |
<name>RunNowJobServiceTaskScheduller</name> |
<implementationClass>pt.estgp.estgweb.services.jobs.JobScheduleService</implementationClass> |
<description></description> |
<isTransactional>true</isTransactional> |
<defaultMethod>runNow</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="Admins"/> |
</filterChains> |
</service> |
<service> |
<name>ToggleActiveJobServiceTaskScheduller</name> |
<implementationClass>pt.estgp.estgweb.services.jobs.JobScheduleService</implementationClass> |
<description></description> |
<isTransactional>true</isTransactional> |
<defaultMethod>toggleActive</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="Admins"/> |
</filterChains> |
</service> |
<service> |
<name>DeleteJobServiceTaskScheduller</name> |
<implementationClass>pt.estgp.estgweb.services.jobs.JobScheduleService</implementationClass> |
<description></description> |
<isTransactional>true</isTransactional> |
<defaultMethod>delete</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="Admins"/> |
</filterChains> |
</service> |
</serviceDefinitions> |
/impl/conf/berserk/fcd.xml |
---|
49,6 → 49,13 |
<filterClass>pt.estgp.estgweb.filters.chains.AdminControlFilter</filterClass> |
</filterChain> |
<filterChain> |
<name>ServicesOrAdmin</name> |
<expression>AuthenticatedUsers && (RoleUsers("admin") || RoleUsers("services"))</expression> |
<description>Validate if a user is coordinator or director</description> |
<invocationTiming>1</invocationTiming> |
<filterClass>pt.estgp.estgweb.filters.chains.AdminControlFilter</filterClass> |
</filterChain> |
<filterChain> |
<name>IdentifiersManager</name> |
<expression>AuthenticatedUsers && RoleUsers("identifiersManager")</expression> |
<description>Admins Control Chain</description> |
/impl/src/java/jomm/utils/AutoFillArrayList.java |
---|
20,7 → 20,7 |
{ |
super(); |
// this.c = c; |
for(int i=0;i<600;i++) |
for(int i=0;i<50;i++) |
{ |
try |
{ |
/impl/src/java/jomm/dao/impl/AbstractDao.java |
---|
13,9 → 13,7 |
import pt.estgp.estgweb.domain.DomainSerializableObject; |
import java.io.Serializable; |
import java.util.Collection; |
import java.util.Date; |
import java.util.List; |
import java.util.*; |
import static org.hibernate.criterion.Restrictions.eq; |
258,6 → 256,8 |
} |
} |
/** |
* Returns results as a page. |
* <p/> |
903,4 → 903,38 |
return criteria; |
} |
/** |
* return deleted objects |
* @param incompleteList |
* @param persistentList |
* @param comparator |
* @return |
*/ |
public List<CLAZZ> deleteMissing(Collection<CLAZZ> incompleteList, Collection<CLAZZ> persistentList,Comparator<CLAZZ> comparator) |
{ |
List<CLAZZ> deletedObjects = new ArrayList<CLAZZ>(); |
//Remover apagados |
Iterator<CLAZZ> iterPersistentObjects = persistentList.iterator(); |
while(iterPersistentObjects.hasNext()) |
{ |
CLAZZ persisitentObj = iterPersistentObjects.next(); |
boolean found = false; |
for(CLAZZ incompleteListObj: incompleteList) |
{ |
if(comparator.compare(incompleteListObj,persisitentObj)==0) |
{ |
found = true; |
break; |
} |
} |
if(!found) |
{ |
iterPersistentObjects.remove(); |
deletedObjects.add(persisitentObj); |
delete(persisitentObj); |
} |
} |
return deletedObjects; |
} |
} |
/impl/src/java/jomm/web/ftp/impl/FtpFile.java |
---|
189,7 → 189,8 |
IFile iFile; |
if (path.endsWith("/")) |
iFile = new FtpFile(ftpFile, server + URIUtil.encodePath(path +ftpFile.getName(),"ISO-8859-1"), path); |
else iFile = new FtpFile(ftpFile, server + URIUtil.encodePath(path + "/" + ftpFile.getName(),"ISO-8859-1"), path); |
else |
iFile = new FtpFile(ftpFile, server + URIUtil.encodePath(path + "/" + ftpFile.getName(),"ISO-8859-1"), path); |
iFiles.add(iFile); |
} |
return iFiles; |
/impl/src/java/pt/estgp/estgweb/utils/StringsUtils.java |
---|
25,6 → 25,21 |
return roles; |
} |
public static String getSerialLongs(List<Long> longs, String separator) |
{ |
if (longs == null) |
return null; |
String roles = null; |
for (Long role : longs) |
{ |
if (roles == null) |
roles = "" + role; |
else |
roles += separator + role; |
} |
return roles; |
} |
public static List<String> getStringsFromSerial(String stringsSerial, String separator) |
{ |
if (stringsSerial == null) |
38,6 → 53,19 |
return l; |
} |
public static List<Long> getLongsFromSerial(String stringsSerial, String separator) |
{ |
if (stringsSerial == null) |
return null; |
String[] roles = stringsSerial.split(separator); |
List<Long> l = new ArrayList<Long>(); |
for (String role : roles) |
{ |
l.add(Long.parseLong(role)); |
} |
return l; |
} |
//TODO ARRANJAR ISTO |
public static String getNormalizedName(String nome) |
{ |
/impl/src/java/pt/estgp/estgweb/utils/Dom4jUtil.java |
---|
256,7 → 256,7 |
private static Transformer getTransformerFromSystem(String xsltFile) throws TransformerConfigurationException, IOException |
{ |
Templates tpl= templates.get(xsltFile); |
Templates tpl = templates.get(xsltFile); |
if (tpl==null) |
{ |
String path = Globals.CLASSES_ABSOLUTE_PATH + xsltFile; |
/impl/src/java/pt/estgp/estgweb/utils/DynamicArrayList.java |
---|
New file |
0,0 → 1,70 |
package pt.estgp.estgweb.utils; |
import java.util.ArrayList; |
/** |
* Created by jorgemachado on 16/11/15. |
*/ |
public class DynamicArrayList<E> extends ArrayList<E> |
{ |
Class referenceClass; |
public DynamicArrayList(Class clazz) |
{ |
this.referenceClass = clazz; |
} |
@Override |
public E get(int i) { |
if(i >= size()) |
{ |
while(i >= size()) |
{ |
try { |
super.add((E)referenceClass.newInstance()); |
} catch (InstantiationException e) { |
e.printStackTrace(); |
} catch (IllegalAccessException e) { |
e.printStackTrace(); |
} |
} |
} |
return super.get(i); |
} |
@Override |
public void add(int i, E obj) { |
if(i >= size()) |
{ |
while(i >= size()) |
{ |
try { |
super.add((E)referenceClass.newInstance()); |
} catch (InstantiationException e) { |
e.printStackTrace(); |
} catch (IllegalAccessException e) { |
e.printStackTrace(); |
} |
} |
} |
super.add(i,obj); |
} |
@Override |
public E set(int i, E obj) { |
if(i >= size()) |
{ |
while(i >= size()) |
{ |
try { |
super.add((E)referenceClass.newInstance()); |
} catch (InstantiationException e) { |
e.printStackTrace(); |
} catch (IllegalAccessException e) { |
e.printStackTrace(); |
} |
} |
} |
return super.set(i,obj); |
} |
} |
/impl/src/java/pt/estgp/estgweb/Globals.java |
---|
1,13 → 1,8 |
package pt.estgp.estgweb; |
import pt.estgp.estgweb.domain.DirectoryImpl; |
import pt.estgp.estgweb.services.directories.DirectoryService; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import java.math.BigDecimal; |
import java.util.HashMap; |
import java.util.List; |
import java.util.Map; |
/** |
* @author Jorge Machado |
29,6 → 24,7 |
CLASSES_ABSOLUTE_PATH = CLASSES_ABSOLUTE_PATH.substring(0,CLASSES_ABSOLUTE_PATH.length()-1); |
} |
/* |
//place, List |
public static Map<String,List<DirectoryImpl>> DIRECTORIES = new HashMap<String,List<DirectoryImpl>>(); |
48,9 → 44,9 |
return directories; |
} |
} |
*/ |
public static final String ROLE_PROCESSES_ADMIN = "processes.admin"; |
public static final String INTRANET_IMPRESSAO_SERVICO_API = ConfigProperties.getProperty("impressao.servicos.api"); |
public static final boolean INTRANET_IMPRESSAO_SERVICO_AUTH = ConfigProperties.getBooleanProperty("impressao.servicos.auth"); |
162,9 → 158,10 |
public static final List<String> DEPARTAMENTOS = ConfigProperties.getListValues("departamento"); |
/*SIGES WEB SERVICES*/ |
public static final BigDecimal NATIONAL_INSTITUTION_CODE = new BigDecimal(ConfigProperties.getIntProperty("national.institution.code")); |
public static final BigDecimal SIGES_INSTITUTION_CODE = new BigDecimal(ConfigProperties.getIntProperty("siges.institution.code")); |
public static final String SIGES_WEBSERVICE_WSDL = ConfigProperties.getProperty("ws.siges.wsdl"); |
//NAO É URGENTE PARA ACTUALIZACOES VAMOS DEIXAR CARREGAR DA BD E NAS ACTUALIZAÇOES MUDA AQUI |
//public static BigDecimal NATIONAL_INSTITUTION_CODE = new BigDecimal(DaoFactory.getConfigurationDaoImpl().getNationalInstitutionCodeCreateTransaction()); |
// DONT USE NOW IN CONFIGURATION DAO public static final BigDecimal SIGES_INSTITUTION_CODE = new BigDecimal(ConfigProperties.getIntProperty("siges.institution.code")); |
// DONT USE ANY MORE NOW IS IN CONFIGURATION DAOpublic static final String SIGES_WEBSERVICE_WSDL = ConfigProperties.getProperty("ws.siges.wsdl"); |
public static final String SIGES_WEBSERVICE_TARGET_NAMESPACE = ConfigProperties.getProperty("ws.siges.target.namespace"); |
public static final String SIGES_WEBSERVICE_SECRET = ConfigProperties.getProperty("ws.siges.secret"); |
225,7 → 222,13 |
public static final String INTRANET_SEMESTRE_S2 = ConfigProperties.getProperty("intranet.semestre.S2"); |
public static final String INTRANET_SEMESTRE_A = ConfigProperties.getProperty("intranet.semestre.A"); |
public static final String INTRANET_SEMESTRE_T1 = ConfigProperties.getProperty("intranet.semestre.T1"); |
public static final String INTRANET_SEMESTRE_T2 = ConfigProperties.getProperty("intranet.semestre.T2"); |
public static final String INTRANET_SEMESTRE_T3 = ConfigProperties.getProperty("intranet.semestre.T3"); |
public static final String INTRANET_SEMESTRE_T4 = ConfigProperties.getProperty("intranet.semestre.T4"); |
public static final String INTRANET_SETUP_FILE = ConfigProperties.getProperty("intranet.setup.file"); |
public static final String INTRANET_USERS_SETUP_FILE_NAME = ConfigProperties.getProperty("intranet.setup.users.filename"); |
public static final String INTRANET_SETUP_FILE_NAME = ConfigProperties.getProperty("intranet.setup.filename"); |
353,6 → 356,10 |
public static final String EMAIL_UNDADE_EDITADA_TEMPLATE_PT = "unidadeEditada_pt.txt"; |
public static final String EMAIL_UNDADE_EDITADA_TEMPLATE_EN = "unidadeEditada_en.txt"; |
public static final String EMAIL_RELATORIO_AVALIACAO_UNDADE_EDITADA_TEMPLATE_PT = "unidadeRelatorioAvaliacaoEditado_pt.txt"; |
public static final String EMAIL_RELATORIO_AVALIACAO_UNDADE_EDITADA_TEMPLATE_EN = "unidadeRelatorioAvaliacaoEditado_en.txt"; |
public static final String EMAIL_UNDADE_VALIDADA_TEMPLATE_PT = "unidadeValidada_pt.txt"; |
public static final String EMAIL_UNDADE_VALIDADA_TEMPLATE_EN = "unidadeValidada_en.txt"; |
360,9 → 367,13 |
public static final String EMAIL_UNDADE_EDICAO_SUBJECT_PT = "email.unidade.edicao.subject.pt"; |
public static final String EMAIL_UNDADE_EDICAO_SUBJECT_EN = "email.unidade.edicao.subject.en"; |
public static final String EMAIL_RELATORIO_AVALIACAO_UNDADE_EDITADA_SUBJECT_PT = "email.relatorio.aval.unidade.editado.subject.pt"; |
public static final String EMAIL_RELATORIO_AVALIACAO_UNDADE_EDITADA_SUBJECT_EN = "email.relatorio.aval.unidade.editado.subject.en"; |
public static final String EMAIL_UNDADE_EDITADA_SUBJECT_PT = "email.unidade.editada.subject.pt"; |
public static final String EMAIL_UNDADE_EDITADA_SUBJECT_EN = "email.unidade.editada.subject.en"; |
public static final String EMAIL_UNDADE_VALIDADA_SUBJECT_PT = "email.unidade.validade.subject.pt"; |
public static final String EMAIL_UNDADE_VALIDADA_SUBJECT_EN = "email.unidade.validada.subject.en"; |
384,4 → 395,6 |
public static final String FTP_IONLINE_USER = ConfigProperties.getProperty("ionline.user"); |
public static final String FTP_IONLINE_PASS = ConfigProperties.getProperty("ionline.pass"); |
public static final String FTP_IONLINE_START_PATH = ConfigProperties.getProperty("server.ionline.start.path"); |
public static final String ROLE_INVITED = "invited"; |
} |
/impl/src/java/pt/estgp/estgweb/services/courses/CoursesCommonServices.java |
---|
115,7 → 115,7 |
// } |
// } |
} |
if(userSession.getUser().hasRole(Globals.COURSE_COMMISSION_PROGRAMS_ROLES)) |
/*if(userSession.getUser().hasRole(Globals.COURSE_COMMISSION_PROGRAMS_ROLES)) |
{ |
List<Course> courses = DaoFactory.getCourseDaoImpl().findAll(DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()); |
for(Course course: courses) |
125,18 → 125,18 |
int missing = DaoFactory.getCourseUnitDaoImpl().countMissingProgramGivenCourse(course.getId()); |
if(missing > 0) |
{ |
DefaultToDo defaultToDo = new DefaultToDo(course.getName(),null,null, "course.courseunit.program.objectives.todo",""+missing,"/user/startLoadCoursesProgramsFromHome.do#" + course.getId()); |
DefaultToDo defaultToDo = new DefaultToDo(course.getName(),null,null, "course.courseunit.program.objectives.todo",""+missing,"/user/startLoadCoursesProgramsFromHome.do?courseId=" + course.getId() + "#" + course.getId()); |
todos.add(defaultToDo); |
} |
int missingValidate = DaoFactory.getCourseUnitDaoImpl().countMissingProgramValidateCourse(course.getId()); |
if(missingValidate > 0) |
{ |
DefaultToDo defaultToDo = new DefaultToDo(course.getName(),null,null, "course.courseunit.program.validate.todo",""+missingValidate,"/user/startLoadCoursesProgramsFromHome.do#" + course.getId()); |
DefaultToDo defaultToDo = new DefaultToDo(course.getName(),null,null, "course.courseunit.program.validate.todo",""+missingValidate,"/user/startLoadCoursesProgramsFromHome.do?courseId=" + course.getId() + "#" + course.getId()); |
todos.add(defaultToDo); |
} |
} |
} |
} |
}*/ |
if(userSession.getUser().hasRole(Globals.SERVICES_PROGRAMS_ROLE)) |
{ |
List<Course> courses = DaoFactory.getCourseDaoImpl().findAll(DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()); |
145,7 → 145,7 |
int missing = DaoFactory.getCourseUnitDaoImpl().countMissingProgramGivenCourse(course.getId()); |
if(missing > 0) |
{ |
DefaultToDo defaultToDo = new DefaultToDo(course.getName(),null,null, "course.courseunit.program.objectives.todo",""+missing,"/user/startLoadCoursesProgramsFromHome.do#" + course.getId()); |
DefaultToDo defaultToDo = new DefaultToDo(course.getName(),null,null, "course.courseunit.program.objectives.todo",""+missing,"/user/startLoadCoursesProgramsFromHome.do?courseId=" + course.getId() + "#" + course.getId()); |
todos.add(defaultToDo); |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/courseunits/DirectedCoordinatedCourses.java |
---|
76,6 → 76,7 |
{ |
if(merge == null) |
merge = new AutoFillArrayList<CourseView>(CourseView.class); |
//merge = new ArrayList<CourseView>(); |
return merge; |
} |
/impl/src/java/pt/estgp/estgweb/services/courseunits/SaveCourseUnitEvaluation.java |
---|
84,18 → 84,31 |
cupv.setCourseUnitEvaluation(evaluation); |
} |
List<String> errors = new ArrayList<String>(); |
String estado = "POR ENTREGAR"; |
if(cupv.isFechar()) |
{ |
evaluation.setClosed(true); |
evaluation.setTeacherComplete(true); |
estado = "Aceite pela Comissão de Curso"; |
} |
else if(cupv.isTeacherComplete()) |
{ |
estado = "Entregue à Comissão de Curso pelo docente"; |
evaluation.setTeacherComplete(true); |
} |
else |
{ |
estado = "Alterado pelo docente"; |
evaluation.setClosed(false); |
//TODO novo |
evaluation.setTeacherComplete(false); |
} |
createPdf(evaluation,c,usession,errors); |
if(usession.getUser() instanceof Teacher) |
DirectedCoordinatedUnitsService.sendNotificationsEditedInterestedPeople(c,usession); |
if(usession != null && usession.getUser() != null && usession.getUser() instanceof Teacher) |
DirectedCoordinatedUnitsService.sendNotificationsCourseUnitEvaluationEditedInterestedPeople(c, estado, usession); |
else |
{ |
logger.info("Nao vai informar docentes"); |
119,11 → 132,50 |
)) |
{ |
evaluation.setClosed(false); |
evaluation.setTeacherComplete(false); |
} |
CourseUnitEvaluationView cupv = new CourseUnitEvaluationView(evaluation); |
if(usession != null && usession.getUser() != null && usession.getUser() instanceof Teacher) |
DirectedCoordinatedUnitsService.sendNotificationsCourseUnitEvaluationEditedInterestedPeople(c, "Aberto pela Comissão de Curso", usession); |
return cupv; |
} |
//TODO TEACHER COMPLETE OPEN not in use coordinatores open and close every fields |
public CourseUnitEvaluationView setTeacherIncomplete(Long coursUnitId, UserSession usession) throws ServiceException { |
CourseUnit c = DaoFactory.getCourseUnitDaoImpl().get(coursUnitId); |
CourseUnitEvaluation evaluation = c.getCourseUnitEvaluation(); |
//So responsaveis e profs desdemente que a avaliação nao esteja fechada |
//caso contrario so coordenadores |
boolean isTeacherOfCourseUnitAndEvaluationNotClosed = |
usession.getUser() instanceof Teacher |
&& |
( |
((Teacher)usession.getUser()).isTeacherOfCourseUnit(c.getId(),true) |
|| |
c.getResponsableTeacher()!=null && usession.getUser().getId() == c.getResponsableTeacher().getId() |
) |
&& !evaluation.isClosed(); |
boolean isCoordinatorOrCourseCommission = |
usession.getUser() instanceof Teacher |
&& |
( |
usession.getUser().hasRole(c.getCourse().getValidationRole()) |
|| |
((usession.getUser()) == c.getCourse().getCoordinator()) |
); |
if(isTeacherOfCourseUnitAndEvaluationNotClosed || isCoordinatorOrCourseCommission) |
{ |
evaluation.setTeacherComplete(false); |
} |
CourseUnitEvaluationView cupv = new CourseUnitEvaluationView(evaluation); |
return cupv; |
} |
public void createPdf(CourseUnitEvaluation cuv, CourseUnit cu, UserSession userSession,List<String> errors) throws IOException, TransformerException, FOPException { |
/impl/src/java/pt/estgp/estgweb/services/courseunits/courseunitsummaries.fo.xsl |
---|
88,7 → 88,7 |
<fo:table-row> |
<fo:table-cell padding-top="3pt"> |
<fo:block > |
Revisto a <xsl:value-of select="//updateDate"/> por <xsl:value-of select="$revisor"/> / Página <fo:page-number/> |
Atualizado a <xsl:value-of select="//updateDate"/> / Página <fo:page-number/> |
</fo:block> |
<fo:block font-size="5pt"> |
ESTG.SA.xxxx.1 |
114,6 → 114,7 |
<xsl:template match="/courseUnit"> |
<fo:table table-layout="fixed" border="0px solid black" margin="0.5em" font-size="8.5pt"> |
<xsl:call-template name="gen_cols"/> |
<fo:table-body text-align="left"> |
226,7 → 227,7 |
</fo:table-row> |
<xsl:if test="//summary"> |
<xsl:if test="//summary[./numeroAula != '-1']"> |
<fo:table-row background-color="#FFF" color="#000" padding="0"> |
<fo:table-cell padding="0" number-columns-spanned="2" border-right="1px solid gray" border-bottom="1px solid gray" display-align="center" > |
242,68 → 243,70 |
<fo:table-body> |
<xsl:for-each select="//summary"> |
<xsl:for-each select="//summary[./numeroAula != '-1']"> |
<xsl:sort select="dataAula" case-order="lower-first"/> |
<fo:table-row> |
<fo:table-cell border-bottom="0.5px solid gray"> |
<fo:block font-size="8pt"> |
<xsl:value-of select="./dataAula"/> |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="0.5px solid gray" > |
<fo:block font-size="8pt" > |
Aula <xsl:value-of select="./numeroAula"/> |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="0.5px solid gray" > |
<fo:block font-size="8pt"> |
<xsl:value-of select="./tipoAula"/> |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="0.5px solid gray"> |
<fo:block font-size="8pt"> |
<xsl:value-of select="./numeroHoras"/> Horas |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="0.5px solid gray" > |
<fo:block font-size="8pt"> |
<xsl:value-of select="./alunosPresentes"/> Alunos |
</fo:block> |
</fo:table-cell> |
</fo:table-row> |
<fo:table-row> |
<fo:table-cell border-bottom="0.5px solid gray"> |
<fo:block font-size="8pt"> |
<xsl:value-of select="./dataAula"/> |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="0.5px solid gray" > |
<fo:block font-size="8pt" > |
Aula <xsl:value-of select="./numeroAula"/> |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="0.5px solid gray" > |
<fo:block font-size="8pt"> |
<xsl:value-of select="./tipoAula"/> |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="0.5px solid gray"> |
<fo:block font-size="8pt"> |
<xsl:value-of select="./numeroHoras"/> Horas |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="0.5px solid gray" > |
<fo:block font-size="8pt"> |
<xsl:value-of select="./alunosPresentes"/> Alunos |
</fo:block> |
</fo:table-cell> |
<fo:table-row> |
<fo:table-cell border-bottom="0.5px solid gray"> |
<fo:block font-size="8pt"> |
Titulo |
</fo:block> |
</fo:table-cell> |
<fo:table-cell number-columns-spanned="4" border-bottom="0.5px solid gray"> |
<fo:block font-size="8pt"> |
<xsl:value-of select="./titulo"/> |
</fo:block> |
</fo:table-cell> |
</fo:table-row> |
</fo:table-row> |
<fo:table-row> |
<fo:table-cell border-bottom="1px solid gray" > |
<fo:block font-size="8pt"> |
Descrição |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="1px solid gray" number-columns-spanned="4"> |
<fo:block font-size="8pt"> |
<xsl:value-of select="./descricao"/> |
</fo:block> |
</fo:table-cell> |
</fo:table-row> |
<fo:table-row> |
<fo:table-cell border-bottom="0.5px solid gray"> |
<fo:block font-size="8pt"> |
Titulo |
</fo:block> |
</fo:table-cell> |
<fo:table-cell number-columns-spanned="4" border-bottom="0.5px solid gray"> |
<fo:block font-size="8pt"> |
<xsl:value-of select="./titulo"/> |
</fo:block> |
</fo:table-cell> |
</fo:table-row> |
<fo:table-row height='20px'> |
<fo:table-cell number-columns-spanned="5" > |
<fo:block ></fo:block> |
</fo:table-cell> |
</fo:table-row> |
<fo:table-row> |
<fo:table-cell border-bottom="1px solid gray" > |
<fo:block font-size="8pt"> |
Descrição |
</fo:block> |
</fo:table-cell> |
<fo:table-cell border-bottom="1px solid gray" number-columns-spanned="4"> |
<fo:block font-size="8pt"> |
<xsl:value-of select="./descricao"/> |
</fo:block> |
</fo:table-cell> |
</fo:table-row> |
<fo:table-row height='20px'> |
<fo:table-cell number-columns-spanned="5" > |
<fo:block ></fo:block> |
</fo:table-cell> |
</fo:table-row> |
</xsl:for-each> |
</fo:table-body> |
</fo:table> |
/impl/src/java/pt/estgp/estgweb/services/courseunits/CourseUnitsCommonServices.java |
---|
1,17 → 1,16 |
package pt.estgp.estgweb.services.courseunits; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.common.*; |
import pt.estgp.estgweb.services.common.impl.DefaultSearchResults; |
import pt.estgp.estgweb.services.common.impl.DefaultResult; |
import pt.estgp.estgweb.services.common.impl.DefaultSearchResults; |
import pt.estgp.estgweb.services.common.impl.DefaultToDo; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import org.apache.log4j.Logger; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.List; |
import java.util.ArrayList; |
import java.util.HashMap; |
import java.util.List; |
/* |
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
90,7 → 89,7 |
if(userSession.getUser() != null && userSession.getUser() instanceof Teacher) |
{ |
// HashMap<Long,Long> doneProgramCodes = new HashMap<Long,Long>(); |
List<CourseUnit> courseUnits = DaoFactory.getCourseUnitDaoImpl().loadMissingObjectivesOrPrograms(userSession.getUser().getId()); |
/*List<CourseUnit> courseUnits = DaoFactory.getCourseUnitDaoImpl().loadMissingObjectivesOrPrograms(userSession.getUser().getId()); |
for(CourseUnit c: courseUnits) |
{ |
DefaultToDo defaultToDo = new DefaultToDo(c.getName(),null,c.getCourseName(), "courseunit.program.objectives.todo","/user/startLoadCourseUnitFromHome.do?id=" + c.getId()); |
120,8 → 119,8 |
DefaultToDo defaultToDo = new DefaultToDo(c.getQuestion(),null,c.getCourseUnit().getName(), "courseunit.question.todo","/user/startLoadCourseUnitFromHome.do?id=" + c.getId()); |
todos.add(defaultToDo); |
} |
*/ |
} |
if(userSession.getUser() != null && userSession.getUser() instanceof Student) |
{ |
/impl/src/java/pt/estgp/estgweb/services/courseunits/DirectedCoordinatedUnitsService.java |
---|
96,6 → 96,13 |
if(importYear == null) |
importYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear(); |
DirectedCoordinatedCourses directedCoordinatedCourses; |
if(courseId <= 0) |
{ |
directedCoordinatedCourses = new DirectedCoordinatedCourses(); |
return directedCoordinatedCourses; |
} |
/** |
* Area and Course Initialization |
*/ |
142,7 → 149,7 |
courseViews.add(cV); |
} |
fill(courseViews, semestre, importYear, teachersSituationEnum); |
DirectedCoordinatedCourses directedCoordinatedCourses = new DirectedCoordinatedCourses(); |
directedCoordinatedCourses = new DirectedCoordinatedCourses(); |
directedCoordinatedCourses.setMerge(courseViews); |
directedCoordinatedCourses.setArea(area); |
directedCoordinatedCourses.setCourseId(courseId); |
161,20 → 168,55 |
cV.setCourseUnitsWithProgramNotCheckedS2(new ArrayList<CourseUnitView>()); |
for (CourseUnitView cUV : cV.getCourseUnits()) |
{ |
if (cUV.getProgramStreamId() == null) |
if (cUV.getSemestre().equals("S1")) |
{ |
try { |
((List<CourseUnitView>) |
(cV.getClass() |
.getMethod("getCourseUnitsWithNoProgram" + cUV.getSemestre()) |
.invoke(cV))) |
.add(cUV); |
} catch (Throwable e) { |
logger.error(e,e); |
} |
} |
/*if (cUV.getSemestre().equals("S1")) |
cV.getCourseUnitsWithNoProgramS1().add(cUV); |
else |
cV.getCourseUnitsWithNoProgramS2().add(cUV); |
cV.getCourseUnitsWithNoProgramS2().add(cUV);*/ |
else if (cUV.isValidProgram()) |
if (cUV.getSemestre().equals("S1")) |
{ |
try { |
((List<CourseUnitView>) |
(cV.getClass() |
.getMethod("getCourseUnitsWithProgramChecked" + cUV.getSemestre()) |
.invoke(cV))) |
.add(cUV); |
} catch (Throwable e) { |
logger.error(e,e); |
} |
} |
/*if (cUV.getSemestre().equals("S1")) |
cV.getCourseUnitsWithProgramCheckedS1().add(cUV); |
else |
cV.getCourseUnitsWithProgramCheckedS2().add(cUV); |
else if (cUV.getSemestre().equals("S1")) |
cV.getCourseUnitsWithProgramCheckedS2().add(cUV);*/ |
else |
try { |
((List<CourseUnitView>) |
(cV.getClass() |
.getMethod("getCourseUnitsWithProgramNotChecked" + cUV.getSemestre()) |
.invoke(cV))) |
.add(cUV); |
} catch (Throwable e) { |
logger.error(e,e); |
} |
/*if (cUV.getSemestre().equals("S1")) |
cV.getCourseUnitsWithProgramNotCheckedS1().add(cUV); |
else |
cV.getCourseUnitsWithProgramNotCheckedS2().add(cUV); |
cV.getCourseUnitsWithProgramNotCheckedS2().add(cUV);*/ |
} |
} |
} |
191,12 → 233,27 |
for (CourseView cV : courseViews) |
{ |
cV.setCourseUnitsWithNoProgramA(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithNoProgramS1(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithNoProgramS2(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithNoProgramT1(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithNoProgramT2(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithNoProgramT3(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithNoProgramT4(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramCheckedA(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramCheckedS1(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramCheckedS2(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramCheckedT1(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramCheckedT2(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramCheckedT3(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramCheckedT4(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramNotCheckedA(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramNotCheckedS1(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramNotCheckedS2(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramNotCheckedT1(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramNotCheckedT2(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramNotCheckedT3(new ArrayList<CourseUnitView>()); |
cV.setCourseUnitsWithProgramNotCheckedT4(new ArrayList<CourseUnitView>()); |
List<CourseUnit> courseUnits = DaoFactory.getCourseUnitDaoImpl().loadCourseUnits(cV.getId(),semestre,importYear,withTeacher,withNoTeacher); |
204,19 → 261,48 |
{ |
CourseUnitView cUV = new CourseUnitView(cU,true,false,false,false); |
if (cUV.getProgramStreamId() == null) |
if (cUV.getSemestre().equals("S1")) |
try { |
((List<CourseUnitView>) |
(cV.getClass() |
.getMethod("getCourseUnitsWithNoProgram" + cUV.getSemestre()) |
.invoke(cV))) |
.add(cUV); |
} catch (Throwable e) { |
logger.error(e,e); |
} |
/*if (cUV.getSemestre().equals("S1")) |
cV.getCourseUnitsWithNoProgramS1().add(cUV); |
else |
cV.getCourseUnitsWithNoProgramS2().add(cUV); |
cV.getCourseUnitsWithNoProgramS2().add(cUV);*/ |
else if (cUV.isValidProgram()) |
try { |
((List<CourseUnitView>) |
(cV.getClass() |
.getMethod("getCourseUnitsWithProgramChecked" + cUV.getSemestre()) |
.invoke(cV))) |
.add(cUV); |
} catch (Throwable e) { |
logger.error(e,e); |
} |
/* |
if (cUV.getSemestre().equals("S1")) |
cV.getCourseUnitsWithProgramCheckedS1().add(cUV); |
else |
cV.getCourseUnitsWithProgramCheckedS2().add(cUV); |
else if (cUV.getSemestre().equals("S1")) |
cV.getCourseUnitsWithProgramCheckedS2().add(cUV);*/ |
else |
try { |
((List<CourseUnitView>) |
(cV.getClass() |
.getMethod("getCourseUnitsWithProgramNotChecked" + cUV.getSemestre()) |
.invoke(cV))) |
.add(cUV); |
} catch (Throwable e) { |
logger.error(e,e); |
} |
/*if (cUV.getSemestre().equals("S1")) |
cV.getCourseUnitsWithProgramNotCheckedS1().add(cUV); |
else |
cV.getCourseUnitsWithProgramNotCheckedS2().add(cUV); |
cV.getCourseUnitsWithProgramNotCheckedS2().add(cUV);*/ |
} |
} |
} |
234,10 → 320,20 |
if(userSession.getUser().isAdmin() || userSession.getUser().hasRole("courseValidatePrograms") || userSession.getUser().hasRole(c.getValidationRole())) //NOVO para validação por programas |
{ |
counter+=updateList(courseView.getCourseUnitsWithProgramCheckedA(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramCheckedS1(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramCheckedS2(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramCheckedT1(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramCheckedT2(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramCheckedT3(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramCheckedT4(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramNotCheckedA(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramNotCheckedS1(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramNotCheckedS2(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramNotCheckedT1(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramNotCheckedT2(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramNotCheckedT3(),userSession); |
counter+=updateList(courseView.getCourseUnitsWithProgramNotCheckedT4(),userSession); |
} |
} |
} |
323,8 → 419,27 |
} |
} |
public static void sendNotificationsCourseUnitEvaluationEditedInterestedPeople(CourseUnit courseUnit,String estado,UserSession u) |
{ |
try{ |
SendEmailService sendEmailService = new SendEmailService(); |
List<String> emails = getEmailJobNotifications(courseUnit); |
EMAILJob emailJob = new EMAILJob(sendEmailService.getRelatorioAvaliacaoUnidadeEditadaEmail(emails,courseUnit,LangEnum.PORTUGUESE,estado)); |
JobScheduleService.getInstance().scheduleNow(emailJob,"New Notification EMAIL unit state changed to courseComission and teachers " ,u); |
}catch(Throwable t) |
{ |
logger.error(t,t); |
} |
} |
public static List<String> getEmailJobNotifications(CourseUnit courseUnit) { |
List<String> emails = DaoFactory.getCourseUnitDaoImpl().getTeachersEmails(courseUnit.getId()); |
List<String> emails = new ArrayList<String>(); |
for(Teacher t: courseUnit.getTeachers()) |
{ |
if(t.getEmail() != null) |
emails.add(t.getEmail()); |
} |
if(emails == null) |
emails = new ArrayList<String>(); |
if(courseUnit.getCourse().getCoordinator() != null && courseUnit.getCourse().getCoordinator().getEmail()!=null) |
/impl/src/java/pt/estgp/estgweb/services/courseunits/CreateCourseUnitDirPackageServiceBat.java |
---|
105,16 → 105,55 |
//FileWriter confWriterSemestre1 = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_S1 + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
//FileWriter confWriterSemestre2 = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_S2 + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
// FileWriter confWriterA = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_A + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
boolean at = false; |
boolean s1t = false; |
boolean s2t = false; |
boolean t1t = false; |
boolean t2t = false; |
boolean t3t = false; |
boolean t4t = false; |
for(CourseUnit courseUnit: courseUnits) |
{ |
if(courseUnit.getSemestre().equals("S1")) |
s1t = true; |
else if(courseUnit.getSemestre().equals("S2")) |
s2t = true; |
else if(courseUnit.getSemestre().equals("A")) |
at = true; |
else if(courseUnit.getSemestre().equals("T1")) |
t1t = true; |
else if(courseUnit.getSemestre().equals("T2")) |
t2t = true; |
else if(courseUnit.getSemestre().equals("T3")) |
t3t = true; |
else if(courseUnit.getSemestre().equals("T4")) |
t4t = true; |
} |
batRunner.write("md " + courseNormalizedName + "\\\n"); |
batRunner.write("md " + relativeDirCourse + "\\\n"); |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_S1 + "\\\n"); |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_S2 + "\\\n"); |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_A + "\\\n"); |
if(s1t) |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_S1 + "\\\n"); |
if(s2t) |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_S2 + "\\\n"); |
if(at) |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_A + "\\\n"); |
if(t1t) |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_T1 + "\\\n"); |
if(t2t) |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_T2 + "\\\n"); |
if(t3t) |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_T3 + "\\\n"); |
if(t4t) |
batRunner.write("md " + relativeDirCourse + "\\" + Globals.INTRANET_SEMESTRE_T4 + "\\\n"); |
batRunner.write("cd " + relativeDirCourse + "\\\n"); |
//back = "..\\..\\"; |
//batRunner.write("\n"); |
// List<CourseUnit> courseUnits = DaoFactory.getCourseUnitDaoImpl().loadByCourse(c.getId(),importYear); |
for(CourseUnit courseUnit: courseUnits) |
{ |
130,6 → 169,26 |
//nowWriter = confWriterSemestre2; |
semestre = Globals.INTRANET_SEMESTRE_S2; |
} |
else if(courseUnit.getSemestre().equals("T1")) |
{ |
//nowWriter = confWriterSemestre2; |
semestre = Globals.INTRANET_SEMESTRE_T1; |
} |
else if(courseUnit.getSemestre().equals("T2")) |
{ |
//nowWriter = confWriterSemestre2; |
semestre = Globals.INTRANET_SEMESTRE_T2; |
} |
else if(courseUnit.getSemestre().equals("T3")) |
{ |
//nowWriter = confWriterSemestre2; |
semestre = Globals.INTRANET_SEMESTRE_T3; |
} |
else if(courseUnit.getSemestre().equals("T4")) |
{ |
//nowWriter = confWriterSemestre2; |
semestre = Globals.INTRANET_SEMESTRE_T4; |
} |
else |
{ |
//nowWriter = confWriterA; |
/impl/src/java/pt/estgp/estgweb/services/courseunits/LoadCourseUnitsBySigesCodesService.java |
---|
1,19 → 1,15 |
package pt.estgp.estgweb.services.courseunits; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.CourseUnit; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.CourseUnitSummaryView; |
import pt.estgp.estgweb.domain.views.AnnouncementView; |
import pt.estgp.estgweb.domain.views.CourseUnitView; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.RepositoryFile; |
import pt.estgp.estgweb.domain.CourseUnitSummary; |
import pt.estgp.estgweb.domain.CourseUnit; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import org.apache.log4j.Logger; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.ArrayList; |
/** |
* @author Jorge Machado |
40,6 → 36,16 |
return courseUnitViews; |
} |
public CourseUnitView loadUnitInEvaluation(String code, String courseCode, UserSession userSession) throws ServiceException { |
CourseUnit c = DaoFactory.getCourseUnitDaoImpl().loadUnitInEvaluationBySigesCodes(code, courseCode); |
if(c == null) |
return null; |
return new CourseUnitView(c); |
} |
public CourseUnitView loadLastYear(String code, String courseCode, String semestre, UserSession userSession) throws ServiceException { |
if(semestre.equals("S3")) |
/impl/src/java/pt/estgp/estgweb/services/courseunits/LoadSubscribedUnitsCurrentYearService.java |
---|
5,6 → 5,7 |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.ArrayList; |
import java.util.List; |
/** |
18,6 → 19,7 |
{ |
Student t = DaoFactory.getStudentDaoImpl().load(studentId); |
List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadSubscribedImportYearUnits(studentId, DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()); |
units = new ArrayList<CourseUnit>(units); |
for(CourseUnit c: units) |
{ |
c.getName(); |
25,4 → 27,17 |
} |
return units; |
} |
public List<CourseUnit> givenYear(long studentId,String year) |
{ |
Student t = DaoFactory.getStudentDaoImpl().load(studentId); |
List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadSubscribedImportYearUnits(studentId, year); |
units = new ArrayList<CourseUnit>(units); |
for(CourseUnit c: units) |
{ |
c.getName(); |
c.getCourse().getName(); |
} |
return units; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/courseunits/CreateCourseUnitAdminService.java |
---|
1,7 → 1,6 |
package pt.estgp.estgweb.services.courseunits; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.CourseUnit; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
import pt.estgp.estgweb.domain.UserSession; |
49,7 → 48,7 |
} |
cUV.persistViewAdminInObject(courseUnit); |
courseUnit.setInstitutionCode("" + Globals.SIGES_INSTITUTION_CODE.intValue()); |
courseUnit.setInstitutionCode("" + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()); |
//por o curso |
//por os profs |
//por alunos |
/impl/src/java/pt/estgp/estgweb/services/courseunits/CreateCourseUnitDirPackageService.java |
---|
74,13 → 74,26 |
new File(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_S1).mkdirs(); |
new File(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_S2).mkdirs(); |
new File(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_A).mkdirs(); |
new File(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T1).mkdirs(); |
new File(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T2).mkdirs(); |
new File(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T3).mkdirs(); |
new File(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T4).mkdirs(); |
FilesUtils.copy(CreateCourseUnitDirPackageService.class.getResourceAsStream(Globals.INTRANET_SETUP_FILE),courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_S1 + "/" + Globals.INTRANET_SETUP_FILE_NAME); |
FilesUtils.copy(CreateCourseUnitDirPackageService.class.getResourceAsStream(Globals.INTRANET_SETUP_FILE),courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_S2 + "/" + Globals.INTRANET_SETUP_FILE_NAME); |
FilesUtils.copy(CreateCourseUnitDirPackageService.class.getResourceAsStream(Globals.INTRANET_SETUP_FILE),courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_A + "/" + Globals.INTRANET_SETUP_FILE_NAME); |
FilesUtils.copy(CreateCourseUnitDirPackageService.class.getResourceAsStream(Globals.INTRANET_SETUP_FILE),courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T1 + "/" + Globals.INTRANET_SETUP_FILE_NAME); |
FilesUtils.copy(CreateCourseUnitDirPackageService.class.getResourceAsStream(Globals.INTRANET_SETUP_FILE),courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T2 + "/" + Globals.INTRANET_SETUP_FILE_NAME); |
FilesUtils.copy(CreateCourseUnitDirPackageService.class.getResourceAsStream(Globals.INTRANET_SETUP_FILE),courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T3 + "/" + Globals.INTRANET_SETUP_FILE_NAME); |
FilesUtils.copy(CreateCourseUnitDirPackageService.class.getResourceAsStream(Globals.INTRANET_SETUP_FILE),courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T4 + "/" + Globals.INTRANET_SETUP_FILE_NAME); |
String callPathS1 = (courseImportYearPathDos + "\\" + Globals.INTRANET_SEMESTRE_S1 + "\\").substring(tmpDir.length() + 1); |
String callPathS2 = (courseImportYearPathDos + "\\" + Globals.INTRANET_SEMESTRE_S2 + "\\").substring(tmpDir.length() + 1); |
String callPathA = (courseImportYearPathDos + "\\" + Globals.INTRANET_SEMESTRE_A + "\\").substring(tmpDir.length() + 1); |
String callPathT1 = (courseImportYearPathDos + "\\" + Globals.INTRANET_SEMESTRE_T1 + "\\").substring(tmpDir.length() + 1); |
String callPathT2 = (courseImportYearPathDos + "\\" + Globals.INTRANET_SEMESTRE_T2 + "\\").substring(tmpDir.length() + 1); |
String callPathT3 = (courseImportYearPathDos + "\\" + Globals.INTRANET_SEMESTRE_T3 + "\\").substring(tmpDir.length() + 1); |
String callPathT4 = (courseImportYearPathDos + "\\" + Globals.INTRANET_SEMESTRE_T4 + "\\").substring(tmpDir.length() + 1); |
batRunner.write("cd " + back + callPathS1); |
back = "..\\..\\..\\"; |
batRunner.write("\n"); |
94,11 → 107,36 |
batRunner.write("\n"); |
batRunner.write(Globals.INTRANET_SETUP_FILE_NAME + " " + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
batRunner.write("\n"); |
batRunner.write("cd " + back + callPathT1); |
batRunner.write("\n"); |
batRunner.write(Globals.INTRANET_SETUP_FILE_NAME + " " + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
batRunner.write("\n"); |
batRunner.write("cd " + back + callPathT2); |
batRunner.write("\n"); |
batRunner.write(Globals.INTRANET_SETUP_FILE_NAME + " " + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
batRunner.write("\n"); |
batRunner.write("cd " + back + callPathT3); |
batRunner.write("\n"); |
batRunner.write(Globals.INTRANET_SETUP_FILE_NAME + " " + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
batRunner.write("\n"); |
batRunner.write("cd " + back + callPathT4); |
batRunner.write("\n"); |
batRunner.write(Globals.INTRANET_SETUP_FILE_NAME + " " + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
batRunner.write("\n"); |
FileWriter confWriterSemestre1 = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_S1 + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
FileWriter confWriterSemestre2 = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_S2 + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
FileWriter confWriterA = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_A + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
FileWriter confWriterTrimestre1 = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T1 + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
FileWriter confWriterTrimestre2 = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T2 + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
FileWriter confWriterTrimestre3 = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T3 + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
FileWriter confWriterTrimestre4 = new FileWriter(courseImportYearPath + "/" + Globals.INTRANET_SEMESTRE_T4 + "/" + Globals.INTRANET_USERS_SETUP_FILE_NAME); |
// List<CourseUnit> courseUnits = DaoFactory.getCourseUnitDaoImpl().loadByCourse(c.getId(),importYear); |
for(CourseUnit courseUnit: courseUnits) |
{ |
114,6 → 152,27 |
nowWriter = confWriterSemestre2; |
semestre = Globals.INTRANET_SEMESTRE_S2; |
} |
else if(courseUnit.getSemestre().equals("T1")) |
{ |
nowWriter = confWriterTrimestre1; |
semestre = Globals.INTRANET_SEMESTRE_T1; |
} |
else if(courseUnit.getSemestre().equals("T2")) |
{ |
nowWriter = confWriterTrimestre2; |
semestre = Globals.INTRANET_SEMESTRE_T2; |
} |
else if(courseUnit.getSemestre().equals("T3")) |
{ |
nowWriter = confWriterTrimestre3; |
semestre = Globals.INTRANET_SEMESTRE_T3; |
} |
else if(courseUnit.getSemestre().equals("T4")) |
{ |
nowWriter = confWriterTrimestre4; |
semestre = Globals.INTRANET_SEMESTRE_T4; |
} |
else |
{ |
nowWriter = confWriterA; |
145,9 → 204,17 |
} |
confWriterSemestre1.flush(); |
confWriterSemestre2.flush(); |
confWriterTrimestre1.flush(); |
confWriterTrimestre2.flush(); |
confWriterTrimestre3.flush(); |
confWriterTrimestre4.flush(); |
confWriterA.flush(); |
confWriterSemestre1.close(); |
confWriterSemestre2.close(); |
confWriterTrimestre1.close(); |
confWriterTrimestre2.close(); |
confWriterTrimestre3.close(); |
confWriterTrimestre4.close(); |
confWriterA.close(); |
} |
catch (IOException e) |
/impl/src/java/pt/estgp/estgweb/services/email/SendEmailService.java |
---|
580,6 → 580,36 |
return new Email(subject ,recipients, Globals.SYSTEM_EMAIL_BOX,template,arguments); |
} |
public Email getRelatorioAvaliacaoUnidadeEditadaEmail(List<String> emails, CourseUnit c, LangEnum langEnum,String estado) |
{ |
List<String> arguments = new ArrayList<String>(); |
String subject; |
String template; |
if(langEnum == LangEnum.PORTUGUESE) |
{ |
template = Globals.EMAIL_RELATORIO_AVALIACAO_UNDADE_EDITADA_TEMPLATE_PT; |
subject = Globals.EMAIL_RELATORIO_AVALIACAO_UNDADE_EDITADA_SUBJECT_PT; |
} |
else |
{ |
template = Globals.EMAIL_RELATORIO_AVALIACAO_UNDADE_EDITADA_TEMPLATE_EN; |
subject = Globals.EMAIL_RELATORIO_AVALIACAO_UNDADE_EDITADA_SUBJECT_EN; |
} |
subject = MessageFormat.format(ConfigProperties.getProperty(subject),new String[]{c.getName()}); |
arguments.add(c.getCourseName()); |
arguments.add(c.getName()); |
arguments.add(estado); |
List<String> recipients = new ArrayList<String>(); |
for(String email:emails) |
recipients.add(email); |
return new Email(subject ,recipients, Globals.SYSTEM_EMAIL_BOX,template,arguments); |
} |
public boolean sendNewGrades(List<String[]> grades, LangEnum langEnum, String studentEmail, String studentName) |
{ |
try |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportGradesService.java |
---|
22,6 → 22,7 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import javax.xml.namespace.QName; |
import java.math.BigDecimal; |
import java.net.MalformedURLException; |
import java.net.URL; |
import java.util.*; |
37,22 → 38,51 |
private static final Logger logger = Logger.getLogger(ImportGradesService.class); |
private static final int MAX_COMMIT = 100; |
private static final int MAX_COMMIT = 20; |
private HashMap<Long,List<Long>> newGrades = new HashMap<Long,List<Long>>(); |
public ILogMessages run(String year) throws ServiceException |
{ |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.grades", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logger.info("starting grades import"); |
logMessages.addMessage(new DefaultLogMessage("import.grades", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode() + " ano : " + year)); |
logger.info("starting grades import " + year); |
try |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
logger.info("Loading Epocas de avaliacao"); |
List<ConfigurationGradesEpocaAvaliacao> epocas = DaoFactory.getConfigurationGradesEpocaAvaliacaoDaoImpl().findAll(); |
if(epocas == null || epocas.size() == 0) |
{ |
logMessages.addMessage(new DefaultLogMessage("import.grades",LogMessageTypeEnum.WARNING,"Sem Epocas de Avaliacao, por favor adicione as epocas ao sistema")); |
logger.warn("Sem Epocas de Avaliacao, por favor adicione as epocas ao sistema"); |
return logMessages; |
} |
List<ConfigurationGradesStatusEpoca> statusEpocas = DaoFactory.getConfigurationGradesStatusEpocaDaoImpl().findAll(); |
if(statusEpocas == null || statusEpocas.size() == 0) |
{ |
logMessages.addMessage(new DefaultLogMessage("import.grades",LogMessageTypeEnum.WARNING,"Sem Status de epocas de avaliacao, por favor adicione as epocas ao sistema")); |
logger.warn("Sem Status de epocas de avaliacao, por favor adicione as epocas ao sistema"); |
return logMessages; |
} |
HashMap<String,String> mapaEpocasAvaliacao = new HashMap<String, String>(); |
for(ConfigurationGradesEpocaAvaliacao epoca: epocas) |
{ |
mapaEpocasAvaliacao.put(epoca.getCodigoEpoca() + "-" + epoca.getCodigoMomento(), epoca.getDescricao()); |
} |
HashMap<String,String> mapaStatusEpocas = new HashMap<String, String>(); |
for(ConfigurationGradesStatusEpoca statusEpoca: statusEpocas) |
{ |
mapaStatusEpocas.put(statusEpoca.getStatus(), statusEpoca.getDescricao()); |
} |
//AbstractDao.getCurrentSession().beginTransaction(); |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
SiGesWEB service; |
try |
{ |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
60,7 → 90,7 |
logger.fatal(e, e); |
return logMessages; |
} |
ArrayOfNota arrayOfNotas = service.getSiGesWEBSoap().getNotas(Globals.SIGES_INSTITUTION_CODE, year); |
ArrayOfNota arrayOfNotas = service.getSiGesWEBSoap().getNotas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
List<Nota> notas = arrayOfNotas.getNota(); |
int i = 0; |
for (Nota nota : notas) |
72,6 → 102,16 |
AbstractDao.getCurrentSession().beginTransaction(); |
} |
/** |
* n.codigo_aluno = getDecimal("CD_ALUNO",aReader); ----- OK |
n.codigo_curso = getDecimal("CD_CURSO", aReader); ----- OK |
n.codigo_disciplina = getDecimal("CD_DISCIP", aReader);- OK |
n.nota = getDecimal("NR_AVALIA", aReader); ---------- OK |
n.data_avaliacao = getDateTime("DT_AVALIA", aReader); - OK |
n.status_epoca = getDecimal("CD_STA_EPO", aReader); -- OK |
n.cd_duracao = getString("CD_DURACAO",aReader); - ------ OK |
*/ |
int codAluno = nota.getCodigoAluno().intValue(); |
int codUnidade = nota.getCodigoDisciplina().intValue(); |
int codCurso = nota.getCodigoCurso().intValue(); |
79,18 → 119,23 |
int valor = nota.getNota().intValue(); |
int statusEpoca = nota.getStatusEpoca().intValue(); |
Date data = nota.getDataAvaliacao().toGregorianCalendar().getTime(); |
int momento = nota.getMomentoAvaliacao().intValue(); |
int epoca = nota.getEpocaAvaliacao().intValue(); |
//boolean eFinal = nota.get |
String descricaoEpoca = mapaEpocasAvaliacao.get(epoca + "-" + momento); |
String descricaoStatusEpoca = mapaStatusEpocas.get(""+statusEpoca) == null ? ""+statusEpoca : mapaStatusEpocas.get(statusEpoca+""); |
Student s = DaoFactory.getStudentDaoImpl().loadBySigesCode(codAluno); |
if(s != null) |
if(descricaoEpoca!= null && s != null) |
{ |
CourseUnit courseUnit; |
try{ |
courseUnit = DaoFactory.getCourseUnitDaoImpl().loadBySigesCodeUniqueSubscribed("" + codUnidade, year, "" + codCurso,s.getId(),cdDuracao); |
if(courseUnit != null) |
{ |
CourseUnitGrade grade = DaoFactory.getCourseUnitGradeDaoImpl().find(courseUnit.getId(),s.getId()); |
CourseUnitGrade grade = DaoFactory.getCourseUnitGradeDaoImpl().find(courseUnit.getId(),s.getId(),""+momento,""+epoca); |
if(grade == null) |
{ |
grade = DomainObjectFactory.createCourseUnitGradeImpl(); |
98,8 → 143,14 |
grade.setCourseUnit(courseUnit); |
grade.setNormalizedCourseUnitName(courseUnit.getNormalizedName()); |
grade.setImportYear(year); |
grade.setCodigoEpoca("" + epoca); |
grade.setCodigoMomento("" + momento); |
grade.setDescEpoca(descricaoEpoca); |
grade.setStatusEpoca(statusEpoca); |
grade.setDescStatusEpoca(descricaoStatusEpoca); |
DaoFactory.getCourseUnitGradeDaoImpl().save(grade); |
if(grade.getGrade() > 0) |
if(grade.getGrade() >= 0) |
addGrade(grade); |
} |
if(grade.getGrade() != valor || grade.getStatusEpoca() != statusEpoca || (grade.getPublishDate() != null && grade.getPublishDate().getTime() != data.getTime())) |
107,14 → 158,16 |
grade.setPublishDate(data); |
grade.setGrade(valor); |
grade.setStatusEpoca(statusEpoca); |
if(grade.getGrade() > 0) |
grade.setDescStatusEpoca(descricaoStatusEpoca); |
if(grade.getGrade() >= 0) |
addGrade(grade); |
} |
} |
else |
{ |
logMessages.addMessage(new DefaultLogMessage("import.warning","","CourseUnit: " + codUnidade + ": course: " + codCurso + " does not exist or is not subscribed by student: " + codAluno + " with id:" + s.getId(), LogMessageTypeEnum.WARNING)); |
logger.warn("CourseUnit: " + codUnidade + ": course: " + codCurso + " does not exist"); |
logMessages.addMessage(new DefaultLogMessage("import.warning","","CourseUnit: " + codUnidade + " course: " + codCurso + " student: " + s.getSigesCode() + " semestre: " + cdDuracao + " year: " + year + " does not exist", LogMessageTypeEnum.WARNING)); |
logger.warn("CourseUnit: " + codUnidade + " course: " + codCurso + " student: " + s.getSigesCode() + " semestre: " + cdDuracao + " year: " + year + " does not exist"); |
} |
}catch(Exception e) |
{ |
124,20 → 177,28 |
} |
else |
{ |
logMessages.addMessage(new DefaultLogMessage("import.warning","","Student: " + codAluno + " does not exist", LogMessageTypeEnum.WARNING)); |
logger.warn("Student: " + codAluno + " does not exist"); |
if(descricaoEpoca == null) |
{ |
logger.info(epoca + "-" + momento + " nao esta catalogada para atribuicao de nota"); |
logMessages.addMessage(new DefaultLogMessage("import.warning","",epoca + "-" + momento + " nao esta catalogada para atribuicao de nota", LogMessageTypeEnum.WARNING)); |
}else |
{ |
logMessages.addMessage(new DefaultLogMessage("import.warning","","Student: " + codAluno + " does not exist", LogMessageTypeEnum.WARNING)); |
logger.warn("Student: " + codAluno + " does not exist"); |
} |
} |
} |
sendSms(null); |
sendEmail(null); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
//AbstractDao.getCurrentSession().getTransaction().commit(); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
AbstractDao.getCurrentSession().getTransaction().rollback(); |
//AbstractDao.getCurrentSession().getTransaction().rollback(); |
logMessages.addMessage(new DefaultLogMessage("import.error", e.toString(), "see log for details", LogMessageTypeEnum.ERROR)); |
throw new ServiceException(e.toString(), e); |
} |
187,6 → 248,7 |
private void sendEmail(UserSession userSession) |
{ |
if(Globals.EMAIL_NEW_GRADES && newGrades.size() > 0) |
{ |
Set<Map.Entry<Long,List<Long>>> set = newGrades.entrySet(); |
200,7 → 262,7 |
for(long gradeId: studentGrades) |
{ |
CourseUnitGrade grade = DaoFactory.getCourseUnitGradeDaoImpl().get(gradeId); |
String[] gradeArray = new String[] {grade.getNormalizedCourseUnitName(),""+grade.getGrade()}; |
String[] gradeArray = new String[] {grade.getNormalizedCourseUnitName(),""+grade.getGrade(),grade.getDescEpoca()}; |
gradesArray.add(gradeArray); |
} |
EMAILJob emailJob = new EMAILJob(sendEmailService.getNewGradesEmail(gradesArray, LangEnum.PORTUGUESE,s.getEmail(),s.getName())); |
220,7 → 282,9 |
String year = DaoFactory.getConfigurationDaoImpl().getImportsDefaultImportYearCreateTransaction();; |
if(args != null && args.length > 0) |
year = args[0]; |
AbstractDao.getCurrentSession().beginTransaction(); |
new ImportGradesService().run(year); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
} |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportSumaries.java |
---|
24,6 → 24,7 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import javax.xml.namespace.QName; |
import java.math.BigDecimal; |
import java.net.MalformedURLException; |
import java.net.URL; |
import java.util.ArrayList; |
49,15 → 50,16 |
public ILogMessages run(String year) throws ServiceException |
{ |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
logger.info("starting summaries import"); |
try |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
SiGesWEB service; |
try |
{ |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
87,7 → 89,7 |
//comentario de teste |
try |
{ |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(Globals.SIGES_INSTITUTION_CODE, year,c.getCode(),DatesUtils.getSemestre()); |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year,c.getCode(),DatesUtils.getSemestre(),null); |
break; |
} |
catch(Throwable t) |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportStudentsService.java |
---|
38,7 → 38,7 |
{ |
private static final Logger logger = Logger.getLogger(ImportStudentsService.class); |
private static final int MAX_COMMIT = 100; |
private static final int MAX_COMMIT = 20; |
int studentsMerged = 0; |
int studentsNew = 0; |
65,20 → 65,23 |
studentsChangeBI = 0; |
unitsAddedToStudents = 0; |
String activeImportYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear(); |
String msgS = "STARTING STUDENTS IMPORT SERVICE FOR YEAR: " + year; |
serviceLogInfo(msgS); |
logger.info(msgS); |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.students", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.students", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
try |
{ |
SiGesWEB service; |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
try |
{ |
serviceLogInfo("STARTING WEB SERVICE AT " + Globals.SIGES_WEBSERVICE_WSDL); |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
serviceLogInfo("STARTING WEB SERVICE AT " + WSDL); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
88,7 → 91,7 |
return logMessages; |
} |
ArrayOfDecimal codigosAlunos = service.getSiGesWEBSoap().getCodigosAlunosInscritosDaInstituicao(Globals.SIGES_INSTITUTION_CODE, year); |
ArrayOfDecimal codigosAlunos = service.getSiGesWEBSoap().getCodigosAlunosInscritosDaInstituicao(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
List<BigDecimal> codigos = codigosAlunos.getDecimal(); |
int i = 1; |
98,12 → 101,11 |
if (i++ > MAX_COMMIT) |
{ |
i = 0; |
setProgress((int) (((float)alunosFound)/((float)codigos.size())*100.0f)); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
AbstractDao.getCurrentSession().beginTransaction(); |
setProgress((int) (((float) alunosFound) / ((float) codigos.size()) * 100.0f)); |
commitPartially(); |
} |
Aluno alunoSiges = service.getSiGesWEBSoap().getAlunoInscrito(c, Globals.SIGES_INSTITUTION_CODE, year); |
Aluno alunoSiges = service.getSiGesWEBSoap().getAlunoInscrito(c, new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
User u = DaoFactory.getUserDaoImpl().loadByUsernameOrSigesCode(alunoSiges.getCodigo().intValue()); |
Student s = null; |
boolean newUser = false; |
147,7 → 149,7 |
DaoFactory.getStudentDaoImpl().save(s); |
newUser = true; |
} |
persist(alunoSiges, s, newUser,year); |
persist(alunoSiges, s, newUser,year,activeImportYear); |
//Advising CommonsServicesManager before change password |
if (newUser) |
186,8 → 188,7 |
logger.error(e,e); |
logMessages.addMessage(new DefaultLogMessage("import.error",e.toString(), "see log for details", LogMessageTypeEnum.ERROR)); |
serviceLogError(e.toString(),e); |
String cause = e.getCause() == null ? "" : e.getCause().toString(); |
sendNotificationAdmin("Erro de importacao de alunos",cause); |
sendNotificationAdmin("Erro de importacao de alunos",e.toString()); |
} |
202,17 → 203,36 |
serviceLogInfo("#Units removed to Students: " + unitsRemovedToStudents); |
serviceLogInfo("#Units not Removed because localy added: " + unitsLocalAddedNotRemoved); |
serviceLogInfo("#Units not Added because localy removed: " + unitsLocallyRemovedNotAdded); |
logger.info("############################"); |
logger.info("############################"); |
logger.info("#Students found: " + alunosFound); |
logger.info("#Students New: " + studentsNew); |
logger.info("#Students Merged: " + studentsMerged); |
logger.info("#Students Zero Units: " + studentsZeroUnits); |
logger.info("#Units not found: " + unitsNotFound); |
logger.info("#Units added to Students: " + unitsAddedToStudents); |
logger.info("#Units removed to Students: " + unitsRemovedToStudents); |
logger.info("#Units not Removed because localy added: " + unitsLocalAddedNotRemoved); |
logger.info("#Units not Added because localy removed: " + unitsLocallyRemovedNotAdded); |
if(studentsChangeBI>0) |
{ |
serviceLogInfo("#>>>>>AVISO AVISO<<<<<<<<<: "); |
serviceLogInfo("#>>>>>AVISO AVISO<<<<<<<<<: "); |
serviceLogInfo("#>>>>>NUMEROS DE ALUNOS MUDARAM DE BI<<<<<<<<<: CONSULTAR LOG"); |
serviceLogInfo("#CODIGO SIGES COM BIs DIFERENTES:" + studentsChangeBI); |
logger.info("#>>>>>AVISO AVISO<<<<<<<<<: "); |
logger.info("#>>>>>AVISO AVISO<<<<<<<<<: "); |
logger.info("#>>>>>NUMEROS DE ALUNOS MUDARAM DE BI<<<<<<<<<: CONSULTAR LOG"); |
logger.info("#CODIGO SIGES COM BIs DIFERENTES:" + studentsChangeBI); |
} |
setProgress(100); |
return logMessages; |
} |
/** |
* Envio de Notificação aos operadores do CI |
* @param subject |
229,6 → 249,7 |
List<String> arguments = new ArrayList<String>(); |
arguments.add(cause.replace("\n","<br/>")); |
Email email = new Email(subject,emails,Globals.SYSTEM_EMAIL_BOX,"messageToAdmin_pt.txt",arguments); |
email.setHtml(true); |
try { |
new SendEmailService().sendEmail(email); |
} catch (ServiceException e) { |
237,6 → 258,7 |
} |
/** |
* Nao esta testado |
* jm |
244,7 → 266,7 |
* @param alunoSiges Aluno |
* @param student Student |
*/ |
private void persist(Aluno alunoSiges, Student student, boolean newUser, String year) |
private void persist(Aluno alunoSiges, Student student, boolean newUser, String year, String activeImportYear) |
{ |
if(newUser) |
{ |
261,19 → 283,20 |
builder.append("ATENCAO NUMERO DE ALUNO " + alunoSiges.getCodigo() + " MUDOU DE DONO VAI SER BLOQUEADO IMEDIATAMENTE\n"); |
builder.append("ALTERANDO DADOS DO ALUNO " + alunoSiges.getCodigo() + "\n"); |
builder.append("<<<<<<<ANTES: " + "\n"); |
builder.append("<<<<<<<BI: " + student.getBi() + "\n"); |
builder.append("<<<<<<<Nome: " + student.getName() + "\n"); |
builder.append("<<<<<<<Username: " + student.getUserNameNetpa() + "\n"); |
builder.append("<<<<<<<Address: " + student.getAddress() + "\n"); |
builder.append("<<<<<<<Zip: " + student.getZip() + "\n"); |
builder.append("<<<<<<<Email: " + student.getEmail() + "\n"); |
builder.append("<<<<<<<Phone: " + student.getPhonenumber() + "\n"); |
builder.append("-----ANTES: " + "\n"); |
builder.append("-----BI: " + student.getBi() + "\n"); |
builder.append("-----Nome: " + student.getName() + "\n"); |
builder.append("-----Username: " + student.getUserNameNetpa() + "\n"); |
builder.append("-----Address: " + student.getAddress() + "\n"); |
builder.append("-----Zip: " + student.getZip() + "\n"); |
builder.append("-----Email: " + student.getEmail() + "\n"); |
builder.append("-----Phone: " + student.getPhonenumber() + "\n"); |
cloneFields(alunoSiges, student); |
student.setAutoBlockMode(false); |
student.setManualBlock(true); |
//todo verificar isto |
//student.setAutoBlockMode(false); |
//student.setManualBlock(true); |
builder.append("DEPOIS: " + "\n"); |
builder.append("BI: " + student.getBi() + "\n"); |
291,6 → 314,35 |
} |
if(alunoSiges.getHistoricos() == null || alunoSiges.getHistoricos().getAlunoHistorico() == null || alunoSiges.getHistoricos().getAlunoHistorico().size() == 0) |
{ |
student.setPropinasEmDia(false); |
serviceLogWarn("ATENTION Estudante sem historico de Matriculas para aferir propinas: codigo " + alunoSiges.getCodigo()); |
logger.warn("ATENTION Estudante sem historico de Matriculas para aferir propinas: codigo " + alunoSiges.getCodigo()); |
} |
else |
{ |
student.setPropinasEmDia(false); |
student.setPropinasEmDiaYear(activeImportYear); |
for(AlunoHistorico hist: alunoSiges.getHistoricos().getAlunoHistorico()) |
{ |
if(hist.getCodigoLectivo()!=null && hist.getCodigoLectivo().equals(activeImportYear)) |
{ |
if(hist.getPropinaEmDia().equalsIgnoreCase("s")) |
{ |
student.setPropinasEmDia(true); |
student.setPropinasEmDiaYear(activeImportYear); |
} |
break; |
} |
} |
if(!student.isPropinasEmDia()) |
{ |
serviceLogWarn("ATENTION Estudante sem propina em dia: codigo " + alunoSiges.getCodigo()); |
logger.warn("ATENTION Estudante sem propina em dia: codigo " + alunoSiges.getCodigo()); |
} |
} |
/*Desta forma as relacoes antigas sao ignoradas cria-se uma lista nova e atribui-se ao Teacher, o Hibernate faz resto e apaga as chaves estrangeiras antigas */ |
if (alunoSiges.getDisciplinasInscrito() == null || alunoSiges.getDisciplinasInscrito().getDisciplina() == null || alunoSiges.getDisciplinasInscrito().getDisciplina().size() == 0) |
{ |
433,10 → 485,11 |
public static final String JOB_importYear_KEY = "JOB_importYear_KEY"; |
@Override |
protected void runJobServiceTask() throws Throwable { |
protected ILogMessages runJobServiceTask() throws Throwable { |
String importYear = (String) getParametersMap().get(JOB_importYear_KEY).getObject(); |
run(importYear); |
String importYear = getParametersMap().get(JOB_importYear_KEY).getObject(); |
ILogMessages messages = run(importYear); |
return messages; |
} |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/LoadSumariesToPDF.java |
---|
24,6 → 24,7 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import javax.xml.namespace.QName; |
import java.math.BigDecimal; |
import java.net.MalformedURLException; |
import java.net.URL; |
import java.util.ArrayList; |
66,7 → 67,7 |
} |
AbstractDao.getCurrentSession().beginTransaction(); |
CourseUnit c = DaoFactory.getCourseUnitDaoImpl().get(courseUnitId); |
ArrayOfAula arrayOfAulas = service.getSiGesWEBSoap().getAulas(Globals.SIGES_INSTITUTION_CODE, c.getImportYear(),c.getCode(),c.getSemestre()); |
ArrayOfAula arrayOfAulas = service.getSiGesWEBSoap().getAulas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), c.getImportYear(),c.getCode(),c.getSemestre(),c.getCourse().getCode()); |
if(arrayOfAulas != null && arrayOfAulas.getAula() != null) |
{ |
99,15 → 100,16 |
public ILogMessages run(String year) throws ServiceException |
{ |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
logger.info("starting summaries import"); |
try |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
SiGesWEB service; |
try |
{ |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
137,7 → 139,7 |
//comentario de teste |
try |
{ |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(Globals.SIGES_INSTITUTION_CODE, year,c.getCode(),DatesUtils.getSemestre()); |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year,c.getCode(),DatesUtils.getSemestre(),c.getCourse().getCode()); |
break; |
} |
catch(Throwable t) |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/SincronizeLastYearCourseUnitProgramsService.java |
---|
3,7 → 3,6 |
import jomm.dao.impl.AbstractDao; |
import org.apache.fop.apps.FOPException; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.CourseUnitView; |
77,12 → 76,14 |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
try |
{ |
logMessages.addMessage(new DefaultLogMessage("courseunitprograms.sincronization", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("courseunitprograms.sincronization", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
serviceLogInfo(logMessages.getLastMessage()); |
int i = 0; |
List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadYear(year); |
for (CourseUnit cu: units) |
List<Long> units = DaoFactory.getCourseUnitDaoImpl().loadIds(year); |
//List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadYear(year); |
for (Long cuId: units) |
// for (CourseUnit cu: units) |
{ |
SaveCourseUnitProgram service = new SaveCourseUnitProgram(); |
93,10 → 94,9 |
{ |
i = 0; |
setProgress((int) (((float)foundTotal)/((float)units.size())*100.0f)); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
AbstractDao.getCurrentSession().beginTransaction(); |
serviceLogInfo("Commiting database"); |
commitPartially(); |
} |
CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().load(cuId); |
if(cu.getCourseUnitProgram() == null || !cloneOnlyNews) |
{ |
184,6 → 184,7 |
//cu.setValidProgram(true); |
} |
setProgress(100); |
logger.info("######################################"); |
serviceLogInfo("######################################"); |
logger.info("######################################"); |
264,7 → 265,6 |
logger.info("terminating programs sincronization"); |
serviceLogInfo("terminating programs sincronization"); |
logMessages.addMessage(new DefaultLogMessage("courseunitprograms.sincronization.terminating", LogMessageTypeEnum.INFO)); |
setProgress(100); |
return logMessages; |
} |
400,13 → 400,16 |
* @throws Throwable |
*/ |
@Override |
protected void runJobServiceTask() throws Throwable |
protected ILogMessages runJobServiceTask() throws Throwable |
{ |
String importYear = (String) getParametersMap().get(JOB_importYear_KEY).getObject(); |
Boolean cloneOnlyNews = (Boolean) getParametersMap().get(JOB_cloneOnlyNews_KEY).getObject(); |
Boolean generateAllPdfs = (Boolean) getParametersMap().get(JOB_generateAllPdfs_KEY).getObject(); |
Boolean validate = (Boolean) getParametersMap().get(JOB_validate_KEY).getObject(); |
run(importYear,cloneOnlyNews,generateAllPdfs,validate); |
String importYear = getParametersMap().get(JOB_importYear_KEY).getObject(); |
String cloneOnlyNewsStr = getParametersMap().get(JOB_cloneOnlyNews_KEY).getObject(); |
String generateAllPdfsStr = getParametersMap().get(JOB_generateAllPdfs_KEY).getObject(); |
String validateStr = getParametersMap().get(JOB_validate_KEY).getObject(); |
boolean cloneOnlyNews = cloneOnlyNewsStr != null && Boolean.parseBoolean(cloneOnlyNewsStr); |
boolean generateAllPdfs = generateAllPdfsStr != null && Boolean.parseBoolean(generateAllPdfsStr); |
boolean validate = validateStr != null && Boolean.parseBoolean(validateStr); |
return run(importYear,cloneOnlyNews,generateAllPdfs,validate); |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportTeachersService.java |
---|
40,7 → 40,7 |
private static final Logger logger = Logger.getLogger(ImportTeachersService.class); |
private static final int MAX_COMMIT = 100; |
private static final int MAX_COMMIT = 20; |
//int studentsMerged = 0; |
int teachersNew = 0; |
73,15 → 73,16 |
logger.info(msgS); |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.teachers", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.teachers", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
try |
{ |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
SiGesWEB service; |
try |
{ |
serviceLogInfo("STARTING WEB SERVICE AT " + Globals.SIGES_WEBSERVICE_WSDL); |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
serviceLogInfo("STARTING WEB SERVICE AT " + WSDL); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
90,7 → 91,7 |
serviceLogFatal(logMessages.getLastMessage(), e); |
return logMessages; |
} |
ArrayOfDecimal codigosDocentes = service.getSiGesWEBSoap().getCodigosDocentesInscritosDaInstituicao(Globals.SIGES_INSTITUTION_CODE, year); |
ArrayOfDecimal codigosDocentes = service.getSiGesWEBSoap().getCodigosDocentesInscritosDaInstituicao(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
List<BigDecimal> codigos = codigosDocentes.getDecimal(); |
int i = 1; |
102,12 → 103,11 |
{ |
i = 0; |
setProgress((int) (((float)teachersFound)/((float)codigos.size())*100.0f)); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
AbstractDao.getCurrentSession().beginTransaction(); |
commitPartially(); |
} |
Docente d = service.getSiGesWEBSoap().getDocente(c, Globals.SIGES_INSTITUTION_CODE, year); |
Docente d = service.getSiGesWEBSoap().getDocente(c, new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
logger.info("Codigo Funcionario Importado: SIGES(" + d.getCodigoFuncionario().intValue() + ") email IPP SIGES: " + d.getEmail()); |
logger.info("SIGES IMPORTED INFO: " + docenteToString(d)); |
Teacher t = DaoFactory.getTeacherDaoImpl().loadBySigesCode(d.getCodigoFuncionario().intValue()); |
176,6 → 176,11 |
throw new ServiceException(e.toString(), e); |
} |
serviceLogInfo("############################"); |
serviceLogInfo("############################"); |
serviceLogInfo("#Teachers found: " + teachersFound); |
187,12 → 192,29 |
serviceLogInfo("#Units not Removed because localy added: " + unitsLocalAddedNotRemoved); |
serviceLogInfo("#Units not Added because localy removed: " + unitsLocallyRemovedNotAdded); |
logger.info("############################"); |
logger.info("############################"); |
logger.info("#Teachers found: " + teachersFound); |
logger.info("#Teachers New: " + teachersNew); |
logger.info("#Teachers Zero Units: " + teachersZeroUnits); |
logger.info("#Units not found: " + unitsNotFound); |
logger.info("#Units removed to Teachers: " + unitsRemovedToTeachers); |
logger.info("#Units added to Teachers: " + unitsAddedToTeachers); |
logger.info("#Units not Removed because localy added: " + unitsLocalAddedNotRemoved); |
logger.info("#Units not Added because localy removed: " + unitsLocallyRemovedNotAdded); |
if(teachersChangeBI>0) |
{ |
serviceLogInfo("#>>>>>AVISO AVISO<<<<<<<<<: "); |
serviceLogInfo("#>>>>>AVISO AVISO<<<<<<<<<: "); |
serviceLogInfo("#>>>>>NUMEROS DE PROFESSORES MUDARAM DE BI<<<<<<<<<: CONSULTAR LOG"); |
serviceLogInfo("#CODIGO SIGES COM BIs DIFERENTES:" + teachersChangeBI); |
logger.info("#>>>>>AVISO AVISO<<<<<<<<<: "); |
logger.info("#>>>>>AVISO AVISO<<<<<<<<<: "); |
logger.info("#>>>>>NUMEROS DE PROFESSORES MUDARAM DE BI<<<<<<<<<: CONSULTAR LOG"); |
logger.info("#CODIGO SIGES COM BIs DIFERENTES:" + teachersChangeBI); |
} |
setProgress(100); |
221,6 → 243,7 |
List<String> arguments = new ArrayList<String>(); |
arguments.add(cause.replace("\n","<br/>")); |
Email email = new Email(subject,emails,Globals.SYSTEM_EMAIL_BOX,"messageToAdmin_pt.txt",arguments); |
email.setHtml(true); |
try { |
new SendEmailService().sendEmail(email); |
} catch (ServiceException e) { |
324,14 → 347,14 |
builder.append("ATENCAO NUMERO DE PROFESSOR " + teacherSiges.getCodigoFuncionario() + " MUDOU DE DONO VAI SER BLOQUEADO IMEDIATAMENTE\n"); |
builder.append("ALTERANDO DADOS DO PROFESSOR " + teacherSiges.getCodigoFuncionario() + "\n"); |
builder.append("<<<<<<<ANTES: " + "\n"); |
builder.append("<<<<<<<BI: " + teacher.getBi() + "\n"); |
builder.append("<<<<<<<Nome: " + teacher.getName() + "\n"); |
builder.append("<<<<<<<Username: " + teacher.getUserNameNetpa() + "\n"); |
builder.append("<<<<<<<Address: " + teacher.getAddress() + "\n"); |
builder.append("<<<<<<<Zip: " + teacher.getZip() + "\n"); |
builder.append("<<<<<<<Email: " + teacher.getEmail() + "\n"); |
builder.append("<<<<<<<Phone: " + teacher.getPhonenumber() + "\n"); |
builder.append("-------ANTES: " + "\n"); |
builder.append("-------BI: " + teacher.getBi() + "\n"); |
builder.append("-------Nome: " + teacher.getName() + "\n"); |
builder.append("-------Username: " + teacher.getUserNameNetpa() + "\n"); |
builder.append("-------Address: " + teacher.getAddress() + "\n"); |
builder.append("-------Zip: " + teacher.getZip() + "\n"); |
builder.append("-------Email: " + teacher.getEmail() + "\n"); |
builder.append("-------Phone: " + teacher.getPhonenumber() + "\n"); |
cloneFields(teacherSiges, teacher); |
548,11 → 571,10 |
} |
@Override |
protected void runJobServiceTask() throws Throwable { |
protected ILogMessages runJobServiceTask() throws Throwable { |
String importYear = (String) getParametersMap().get(JOB_importYear_KEY).getObject(); |
run(importYear); |
String importYear = getParametersMap().get(JOB_importYear_KEY).getObject(); |
return run(importYear); |
} |
public static final String JOB_importYear_KEY = "JOB_importYear_KEY"; |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportCourseService.java |
---|
25,6 → 25,7 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import javax.xml.namespace.QName; |
import java.math.BigDecimal; |
import java.net.MalformedURLException; |
import java.net.URL; |
import java.util.*; |
52,23 → 53,28 |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
try |
{ |
logMessages.addMessage(new DefaultLogMessage("import.semestre.separated", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.semestre.separated", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
serviceLogInfo(logMessages.getLastMessage()); |
HashMap<String, Disciplina> disciplinasMap = new HashMap<String, Disciplina>(); |
HashMap<String, Disciplina> disciplinasMapS1 = new HashMap<String, Disciplina>(); |
HashMap<String, Disciplina> disciplinasMapS2 = new HashMap<String, Disciplina>(); |
HashMap<String, Disciplina> disciplinasMapA = new HashMap<String, Disciplina>(); |
HashMap<String, Disciplina> disciplinasMapT1 = new HashMap<String, Disciplina>(); |
HashMap<String, Disciplina> disciplinasMapT2 = new HashMap<String, Disciplina>(); |
HashMap<String, Disciplina> disciplinasMapT3 = new HashMap<String, Disciplina>(); |
HashMap<String, Disciplina> disciplinasMapT4 = new HashMap<String, Disciplina>(); |
HashMap<String, Disciplina> cursosMap = new HashMap<String, Disciplina>(); |
/** |
* Build Course Units Maps |
*/ |
SiGesWEB service; |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
try |
{ |
serviceLogInfo("STARTING WEB SERVICE AT " + Globals.SIGES_WEBSERVICE_WSDL); |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
serviceLogInfo("STARTING WEB SERVICE AT " + WSDL); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
81,6 → 87,10 |
importUnitsSemestre(service, "S1", year, disciplinasMap, disciplinasMapS1, cursosMap, logMessages); |
importUnitsSemestre(service, "S2", year, disciplinasMap, disciplinasMapS2, cursosMap, logMessages); |
importUnitsSemestre(service, "A", year, disciplinasMap, disciplinasMapA, cursosMap, logMessages); |
importUnitsSemestre(service, "T1", year, disciplinasMap, disciplinasMapT1, cursosMap, logMessages); |
importUnitsSemestre(service, "T2", year, disciplinasMap, disciplinasMapT2, cursosMap, logMessages); |
importUnitsSemestre(service, "T3", year, disciplinasMap, disciplinasMapT3, cursosMap, logMessages); |
importUnitsSemestre(service, "T4", year, disciplinasMap, disciplinasMapT4, cursosMap, logMessages); |
/** |
* Import Courses |
118,6 → 128,10 |
updateCourseUnits(disciplinasMapS1, "S1",logMessages,year); |
updateCourseUnits(disciplinasMapS2, "S2",logMessages,year); |
updateCourseUnits(disciplinasMapA, "A",logMessages,year); |
updateCourseUnits(disciplinasMapT1, "T1",logMessages,year); |
updateCourseUnits(disciplinasMapT2, "T2",logMessages,year); |
updateCourseUnits(disciplinasMapT3, "T3",logMessages,year); |
updateCourseUnits(disciplinasMapT4, "T4",logMessages,year); |
serviceLogInfo("######################################"); |
serviceLogInfo("######################################"); |
125,10 → 139,27 |
serviceLogInfo("#Units Imported S1:" + disciplinasMapS1.size()); |
serviceLogInfo("#Units Imported S2:" + disciplinasMapS2.size()); |
serviceLogInfo("#Units Imported A:" + disciplinasMapA.size()); |
serviceLogInfo("#Units Imported T1:" + disciplinasMapT1.size()); |
serviceLogInfo("#Units Imported T2:" + disciplinasMapT2.size()); |
serviceLogInfo("#Units Imported T3:" + disciplinasMapT3.size()); |
serviceLogInfo("#Units Imported T4:" + disciplinasMapT4.size()); |
serviceLogInfo("#New Courses Found:" + newCourses); |
serviceLogInfo("#New Units Found:" + newUnits); |
logger.info("######################################"); |
logger.info("######################################"); |
logger.info("#Courses Imported:" + cursosMap.size()); |
logger.info("#Units Imported S1:" + disciplinasMapS1.size()); |
logger.info("#Units Imported S2:" + disciplinasMapS2.size()); |
logger.info("#Units Imported A:" + disciplinasMapA.size()); |
logger.info("#Units Imported T1:" + disciplinasMapT1.size()); |
logger.info("#Units Imported T2:" + disciplinasMapT2.size()); |
logger.info("#Units Imported T3:" + disciplinasMapT3.size()); |
logger.info("#Units Imported T4:" + disciplinasMapT4.size()); |
logger.info("#New Courses Found:" + newCourses); |
logger.info("#New Units Found:" + newUnits); |
} |
catch (Throwable e) |
{ |
152,8 → 183,8 |
*/ |
private void sendNotificationAdmin(String subject, String cause) |
{ |
//todo JOB |
List<String> emails = ConfigProperties.getListValues("admin.email"); |
for(String email:emails) |
{ |
163,6 → 194,7 |
List<String> arguments = new ArrayList<String>(); |
arguments.add(cause.replace("\n","<br/>")); |
Email email = new Email(subject,emails,Globals.SYSTEM_EMAIL_BOX,"messageToAdmin_pt.txt",arguments); |
email.setHtml(true); |
try { |
new SendEmailService().sendEmail(email); |
} catch (ServiceException e) { |
182,7 → 214,7 |
logMessages.addMessage(new DefaultLogMessage("import.semestre.course.units." + semestre, LogMessageTypeEnum.INFO)); |
serviceLogInfo("importing " + semestre + " course units"); |
logger.info("importing " + semestre + " course units"); |
ArrayOfDisciplina arrayOfDisciplina = service.getSiGesWEBSoap().getDisciplinasDaInstituicaoSemestre(Globals.SIGES_INSTITUTION_CODE, year, semestre); |
ArrayOfDisciplina arrayOfDisciplina = service.getSiGesWEBSoap().getDisciplinasDaInstituicaoSemestre(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year, semestre); |
List<Disciplina> disciplinas = arrayOfDisciplina.getDisciplina(); |
for (Disciplina d : disciplinas) |
{ |
224,7 → 256,7 |
newUnits++; |
} |
c.setName(d.getNome()); |
c.setInstitutionCode("" + Globals.SIGES_INSTITUTION_CODE); |
c.setInstitutionCode("" + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()); |
c.setCode("" + d.getCodigo().intValue()); |
c.setCourseCode("" + d.getCodigoCurso()); |
c.setCourseName("" + d.getNomeCurso()); |
239,10 → 271,11 |
public static final String JOB_importYear_KEY = "JOB_importYear_KEY"; |
@Override |
protected void runJobServiceTask() throws Throwable { |
protected ILogMessages runJobServiceTask() throws Throwable { |
String importYear = (String) getParametersMap().get(JOB_importYear_KEY).getObject(); |
run(importYear); |
String importYear = getParametersMap().get(JOB_importYear_KEY).getObject(); |
ILogMessages messages = run(importYear); |
return messages; |
} |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportSumariesJson.java |
---|
39,6 → 39,7 |
import java.io.FileInputStream; |
import java.io.FileOutputStream; |
import java.io.IOException; |
import java.math.BigDecimal; |
import java.net.URL; |
import java.util.ArrayList; |
import java.util.HashMap; |
56,7 → 57,7 |
private static final Logger logger = Logger.getLogger(ImportSumariesJson.class); |
private static final int MAX_COMMIT = 100; |
private static final int MAX_COMMIT = 10; |
public ILogMessages run(String year,String semestre) throws ServiceException |
71,13 → 72,14 |
logger.info(msgS); |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
serviceLogInfo(logMessages.getLastMessage()); |
int countUnits = 0; |
int countUnitsOk = 0; |
int countUnitsZeroSummaries = 0; |
int countUnitsZeroValidSummaries = 0; |
List<String> unitsZeroSummaries = new ArrayList<String>(); |
List<String> unitsFailed = new ArrayList<String>(); |
85,10 → 87,11 |
{ |
SiGesWEB service; |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
try |
{ |
serviceLogInfo("STARTING WEB SERVICE AT " + Globals.SIGES_WEBSERVICE_WSDL); |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
serviceLogInfo("STARTING WEB SERVICE AT " + WSDL); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (Throwable e) |
{ |
113,9 → 116,7 |
{ |
i = 0; |
setProgress((int) (((float)countUnits)/((float)cUs.size())*100.0f)); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
AbstractDao.getCurrentSession().beginTransaction(); |
serviceLogInfo("Commiting database"); |
commitPartially(); |
} |
CourseUnit c = DaoFactory.getCourseUnitDaoImpl().load(cId); |
nowCode = c.getCode(); |
130,7 → 131,7 |
//comentario de teste |
try |
{ |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(Globals.SIGES_INSTITUTION_CODE, year,c.getCode(),semestre); |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year,c.getCode(),semestre,c.getCourse().getCode()); |
break; |
} |
catch(Throwable t) |
161,6 → 162,7 |
JSONObject summariesJson = new JSONObject(); |
JSONArray summaries = new JSONArray(); |
summariesJson.put("summary",summaries); |
int summariesValid = 0; |
for(Aula aula: arrayOfAulas.getAula()) |
{ |
186,12 → 188,23 |
s.setNumeroHoras("" + aula.getNumeroCelulas().intValue()); |
summaries.put(s.getJson()); |
courseUnitSummaries.add(s); |
if(s.getNumeroAula() > 0) |
summariesValid++; |
} |
if(courseUnitSummaries.size() == 0) |
{ |
countUnitsZeroSummaries++; |
unitsZeroSummaries.add(c.getCode()); |
logger.info("ZERO SUMARIES unit:" + c.getCode() + " course: " + c.getCourseCode()); |
serviceLogInfo("ZERO SUMARIES unit:" + c.getCode() + " course: " + c.getCourseCode()); |
} |
else if(summariesValid == 0) |
{ |
countUnitsZeroValidSummaries++; |
unitsZeroSummaries.add(c.getCode()); |
logger.info("ZERO VALID SUMARIES unit:" + c.getCode() + " course: " + c.getCourseCode()); |
serviceLogInfo("ZERO VALID SUMARIES unit:" + c.getCode() + " course: " + c.getCourseCode()); |
} |
else |
{ |
countUnitsOk++; |
247,7 → 260,17 |
serviceLogInfo("UNITS FAILED: " + (countUnits - countUnitsZeroSummaries - countUnitsOk)); |
serviceLogInfo("UNITS IMPORT OK: " + countUnitsOk); |
serviceLogInfo("UNITS ZERO SUMARIES: " + countUnitsZeroSummaries); |
serviceLogInfo("UNITS ZERO VALID SUMARIES: " + countUnitsZeroValidSummaries); |
serviceLogInfo("#######################################"); |
logger.info("#######################################"); |
logger.info("#######################################"); |
logger.info("UNITS PROCESSED: " + countUnits); |
logger.info("UNITS FAILED: " + (countUnits - countUnitsZeroSummaries - countUnitsOk)); |
logger.info("UNITS IMPORT OK: " + countUnitsOk); |
logger.info("UNITS ZERO SUMARIES: " + countUnitsZeroSummaries); |
logger.info("UNITS ZERO VALID SUMARIES: " + countUnitsZeroValidSummaries); |
logger.info("#######################################"); |
return logMessages; |
} |
376,14 → 399,15 |
public static final String JOB_sendEmail_KEY = "JOB_sendEmail_KEY"; |
@Override |
protected void runJobServiceTask() throws Throwable { |
protected ILogMessages runJobServiceTask() throws Throwable { |
String importYear = (String) getParametersMap().get(JOB_importYear_KEY).getObject(); |
String semestre = (String) getParametersMap().get(JOB_semestre_KEY).getObject(); |
Boolean sendIonline = (Boolean) getParametersMap().get(JOB_sendIonline_KEY).getObject(); |
Boolean sendEmail = (Boolean) getParametersMap().get(JOB_sendEmail_KEY).getObject(); |
run(importYear,semestre,sendIonline,sendEmail); |
String importYear = getParametersMap().get(JOB_importYear_KEY).getObject(); |
String semestre = getParametersMap().get(JOB_semestre_KEY).getObject(); |
String sendIonlineStr = getParametersMap().get(JOB_sendIonline_KEY).getObject(); |
String sendEmailStr = getParametersMap().get(JOB_sendEmail_KEY).getObject(); |
boolean sendIonline = sendIonlineStr != null && Boolean.parseBoolean(sendIonlineStr); |
boolean sendEmail = sendEmailStr != null && Boolean.parseBoolean(sendEmailStr); |
return run(importYear,semestre,sendIonline,sendEmail); |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/ftpservices/FtpService.java |
---|
69,13 → 69,13 |
{ |
} |
else if(passwordCode != null) |
else |
{ |
logger.info("using saved password"); |
password = DesUtils.getInstance().decrypt(passwordCode); |
//System.out.println("SAVEDPASS:" + password); |
} |
else if(userSession.getUser().getPop3password() != null && userSession.getUser().getPop3password().length() > 0) |
/*else if(userSession.getUser().getPop3password() != null && userSession.getUser().getPop3password().length() > 0) |
{ |
logger.info("trying pop 3 password"); |
password = DesUtils.getInstance().decrypt(userSession.getUser().getPop3password()); |
84,7 → 84,7 |
{ |
logger.info("trying last used login password"); |
password = DesUtils.getInstance().decrypt(userSession.getUser().getPassword()); |
} |
}*/ |
username = ftpRequestForm.getUsername(); |
if(username == null || username.trim().length() == 0) |
username = userSession.getUsername(); |
/impl/src/java/pt/estgp/estgweb/services/jobs/JobServiceInterfaces.java |
---|
New file |
0,0 → 1,51 |
package pt.estgp.estgweb.services.jobs; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.JobServiceTaskImpl; |
import pt.estgp.estgweb.domain.JobServiceTaskScheduler; |
import pt.estgp.estgweb.domain.JobServiceTaskSchedulerImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.List; |
/** |
* Created by jorgemachado on 02/11/15. |
* |
* Todos os serviços podem correr em BackGround através da chamada ao JobRunner |
* desde que implementem esta interface |
*/ |
public class JobServiceInterfaces implements IService |
{ |
/*Class regular log*/ |
private static final Logger logger = Logger.getLogger(JobServiceInterfaces.class); |
public JobServiceTaskSchedulerImpl loadJobServiceTaskScheduler(Long id, UserSession sess) |
{ |
JobServiceTaskSchedulerImpl job = (JobServiceTaskSchedulerImpl) DaoFactory.getJobServiceTaskSchedulerDaoImpl().get(id); |
if(job.getLastJobServiceTask() != null) |
job.getLastJobServiceTask().getId(); |
return job; |
} |
public JobServiceTaskImpl loadJobServiceTask(Long id, UserSession sess) |
{ |
JobServiceTaskImpl job = (JobServiceTaskImpl) DaoFactory.getJobServiceTaskDaoImpl().get(id); |
return job; |
} |
public List<JobServiceTaskScheduler> loadJobServiceTaskSchedullers(UserSession sess) |
{ |
List<JobServiceTaskScheduler> tasks = DaoFactory.getJobServiceTaskSchedulerDaoImpl().findAll(); |
for(JobServiceTaskScheduler jobServiceTaskScheduler: tasks) |
{ |
jobServiceTaskScheduler.getLastJobServiceTask().getId(); |
} |
return tasks; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/jobs/JobScheduleService.java |
---|
1,6 → 1,7 |
package pt.estgp.estgweb.services.jobs; |
import jomm.dao.impl.AbstractDao; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.sigesimports.*; |
18,6 → 19,8 |
public class JobScheduleService implements IService |
{ |
private static final Logger logger = Logger.getLogger(JobScheduleService.class); |
private static JobScheduleService instance = new JobScheduleService(); |
public static JobScheduleService getInstance() |
103,10 → 106,50 |
} |
} |
public void runNow(Long schedulerId, UserSession sess) |
{ |
JobServiceTaskScheduler persistent = DaoFactory.getJobServiceTaskSchedulerDaoImpl().load(schedulerId); |
logger.info("Will run now task " + persistent.getTargetService() + " id:" + schedulerId); |
persistent.setNow(true); |
} |
public JobServiceTaskScheduler toggleActive(Long schedulerId, UserSession sess) |
{ |
JobServiceTaskScheduler persistent = DaoFactory.getJobServiceTaskSchedulerDaoImpl().load(schedulerId); |
if(persistent.isActive()) |
logger.info("Will deactivate task " + persistent.getTargetService() + " id:" + schedulerId); |
else |
logger.info("Will activate task " + persistent.getTargetService() + " id:" + schedulerId); |
persistent.setActive(!persistent.isActive()); |
return persistent; |
} |
public void delete(Long schedulerId, UserSession sess) |
{ |
JobServiceTaskScheduler persistent = DaoFactory.getJobServiceTaskSchedulerDaoImpl().load(schedulerId); |
logger.warn("Will delete task " + persistent.getTargetService() + " id:" + schedulerId); |
Set<JobServiceTaskSchedulerParameter> params = persistent.getServiceTaskSchedulerParameters(); |
if(params != null) |
{ |
Iterator<JobServiceTaskSchedulerParameter> iterParam = params.iterator(); |
while(iterParam.hasNext()) { |
JobServiceTaskSchedulerParameter next = iterParam.next(); |
next.setJobServiceTaskScheduler(null); |
iterParam.remove(); |
DaoFactory.getJobServiceTaskSchedulerParameterDaoImpl().delete(next); |
} |
} |
DaoFactory.getJobServiceTaskSchedulerDaoImpl().delete(persistent); |
} |
public static void main(String[] args) throws SQLException |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
scheduleImportSummaries(); |
scheduleImportTeachers(); |
scheduleImportCourses(); |
scheduleImportStudents(); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
} |
130,10 → 173,10 |
param2.setDescription("desc2"); |
param3.setDescription("desc3"); |
param4.setDescription("desc4"); |
param1.setObject(new Boolean(false)); |
param2.setObject(new Boolean(true)); |
param1.setObject("false"); |
param2.setObject("true"); |
param3.setObject("201415"); |
param4.setObject(new Boolean(true)); |
param4.setObject("true"); |
Set<JobServiceTaskSchedulerParameter> params = new HashSet<JobServiceTaskSchedulerParameter>(); |
params.add(param1); |
params.add(param2); |
142,7 → 185,7 |
jobServiceTaskScheduler.setServiceTaskSchedulerParameters(params); |
jobServiceTaskScheduler.setDaily(true); |
jobServiceTaskScheduler.setMonthday(GregorianCalendar.NOVEMBER); |
jobServiceTaskScheduler.setMonthday(1); |
jobServiceTaskScheduler.setWeekday(GregorianCalendar.MONDAY); |
jobServiceTaskScheduler.setHour(01); |
jobServiceTaskScheduler.setMinute(0); |
181,10 → 224,10 |
param2.setDescription("desc2"); |
param3.setDescription("desc3"); |
param4.setDescription("desc4"); |
param1.setObject("201415"); |
param1.setObject("201516"); |
param2.setObject("S1"); |
param3.setObject(new Boolean(false)); |
param4.setObject(new Boolean(false)); |
param3.setObject("false"); |
param4.setObject("true"); |
Set<JobServiceTaskSchedulerParameter> params = new HashSet<JobServiceTaskSchedulerParameter>(); |
params.add(param1); |
params.add(param2); |
193,9 → 236,11 |
jobServiceTaskScheduler.setServiceTaskSchedulerParameters(params); |
jobServiceTaskScheduler.setDaily(true); |
jobServiceTaskScheduler.setMonthday(GregorianCalendar.NOVEMBER); |
jobServiceTaskScheduler.setWeekly(false); |
jobServiceTaskScheduler.setMonthly(false); |
jobServiceTaskScheduler.setMonthday(1); |
jobServiceTaskScheduler.setWeekday(GregorianCalendar.MONDAY); |
jobServiceTaskScheduler.setHour(01); |
jobServiceTaskScheduler.setHour(05); |
jobServiceTaskScheduler.setMinute(0); |
jobServiceTaskScheduler.setSecond(0); |
jobServiceTaskScheduler.setTargetService(ImportSumariesJson.class.getName()); |
207,7 → 252,7 |
} |
}; |
sess.setUser(u); |
jobServiceTaskScheduler.setDescription("TESTE Sumaries"); |
jobServiceTaskScheduler.setDescription("Sumarios"); |
new JobScheduleService().createOrUpdateScheduleServiceTask(jobServiceTaskScheduler,sess); |
} |
220,13 → 265,14 |
param1.setJobServiceTaskScheduler(jobServiceTaskScheduler); |
param1.setName(ImportCourseService.JOB_importYear_KEY); |
param1.setDescription("desc1"); |
param1.setObject("201415"); |
param1.setObject("201516"); |
Set<JobServiceTaskSchedulerParameter> params = new HashSet<JobServiceTaskSchedulerParameter>(); |
params.add(param1); |
jobServiceTaskScheduler.setServiceTaskSchedulerParameters(params); |
jobServiceTaskScheduler.setDaily(true); |
jobServiceTaskScheduler.setMonthday(GregorianCalendar.NOVEMBER); |
jobServiceTaskScheduler.setMonthly(false); |
jobServiceTaskScheduler.setMonthday(1); |
jobServiceTaskScheduler.setWeekday(GregorianCalendar.MONDAY); |
jobServiceTaskScheduler.setHour(01); |
jobServiceTaskScheduler.setMinute(0); |
240,11 → 286,13 |
} |
}; |
sess.setUser(u); |
jobServiceTaskScheduler.setDescription("TESTE Courses"); |
jobServiceTaskScheduler.setDescription("Cursos"); |
new JobScheduleService().createOrUpdateScheduleServiceTask(jobServiceTaskScheduler,sess); |
} |
public static void scheduleImportStudents() |
{ |
JobServiceTaskScheduler jobServiceTaskScheduler = DomainObjectFactory.createJobServiceTaskSchedulerImpl(); |
253,15 → 301,17 |
param1.setJobServiceTaskScheduler(jobServiceTaskScheduler); |
param1.setName(ImportStudentsService.JOB_importYear_KEY); |
param1.setDescription("desc1"); |
param1.setObject("201415"); |
param1.setObject("201516"); |
Set<JobServiceTaskSchedulerParameter> params = new HashSet<JobServiceTaskSchedulerParameter>(); |
params.add(param1); |
jobServiceTaskScheduler.setServiceTaskSchedulerParameters(params); |
jobServiceTaskScheduler.setDaily(true); |
jobServiceTaskScheduler.setMonthly(false); |
jobServiceTaskScheduler.setWeekly(false); |
jobServiceTaskScheduler.setMonthday(GregorianCalendar.NOVEMBER); |
jobServiceTaskScheduler.setWeekday(GregorianCalendar.MONDAY); |
jobServiceTaskScheduler.setHour(01); |
jobServiceTaskScheduler.setHour(03); |
jobServiceTaskScheduler.setMinute(0); |
jobServiceTaskScheduler.setSecond(0); |
jobServiceTaskScheduler.setTargetService(ImportStudentsService.class.getName()); |
273,7 → 323,7 |
} |
}; |
sess.setUser(u); |
jobServiceTaskScheduler.setDescription("TESTE Students"); |
jobServiceTaskScheduler.setDescription("Estudantes"); |
new JobScheduleService().createOrUpdateScheduleServiceTask(jobServiceTaskScheduler,sess); |
} |
286,15 → 336,17 |
param1.setJobServiceTaskScheduler(jobServiceTaskScheduler); |
param1.setName(ImportTeachersService.JOB_importYear_KEY); |
param1.setDescription("desc1"); |
param1.setObject("201415"); |
param1.setObject("201516"); |
Set<JobServiceTaskSchedulerParameter> params = new HashSet<JobServiceTaskSchedulerParameter>(); |
params.add(param1); |
jobServiceTaskScheduler.setServiceTaskSchedulerParameters(params); |
jobServiceTaskScheduler.setDaily(true); |
jobServiceTaskScheduler.setWeekly(false); |
jobServiceTaskScheduler.setMonthly(false); |
jobServiceTaskScheduler.setMonthday(GregorianCalendar.NOVEMBER); |
jobServiceTaskScheduler.setWeekday(GregorianCalendar.MONDAY); |
jobServiceTaskScheduler.setHour(01); |
jobServiceTaskScheduler.setHour(02); |
jobServiceTaskScheduler.setMinute(0); |
jobServiceTaskScheduler.setSecond(0); |
jobServiceTaskScheduler.setTargetService(ImportTeachersService.class.getName()); |
306,7 → 358,7 |
} |
}; |
sess.setUser(u); |
jobServiceTaskScheduler.setDescription("TESTE Teachers"); |
jobServiceTaskScheduler.setDescription("Professores"); |
new JobScheduleService().createOrUpdateScheduleServiceTask(jobServiceTaskScheduler,sess); |
} |
/impl/src/java/pt/estgp/estgweb/services/jobs/ServiceJob.java |
---|
1,5 → 1,6 |
package pt.estgp.estgweb.services.jobs; |
import jomm.dao.impl.AbstractDao; |
import org.apache.log4j.FileAppender; |
import org.apache.log4j.Logger; |
import org.apache.log4j.PatternLayout; |
7,6 → 8,7 |
import pt.estgp.estgweb.domain.JobServiceTask; |
import pt.estgp.estgweb.domain.JobServiceTaskImpl; |
import pt.estgp.estgweb.domain.JobServiceTaskParameter; |
import pt.estgp.estgweb.services.logresults.ILogMessages; |
import java.io.IOException; |
import java.util.*; |
97,10 → 99,16 |
jobServiceTask.setStatusEnum(JobServiceTaskImpl.JobStatus.STARTED); |
jobServiceTask.setServiceStartDate(new Date()); |
jobServiceTask.setServiceLastUpdateDate(new Date()); |
commitPartially(); |
try { |
//call the implementation of service this will update serviceLog and progress |
runJobServiceTask(); |
jobServiceTask.setStatusEnum(JobServiceTaskImpl.JobStatus.FINISHED); |
ILogMessages messages = runJobServiceTask(); |
if(messages.hasErrors()) |
jobServiceTask.setStatusEnum(JobServiceTaskImpl.JobStatus.FINISHED_ERRORS); |
else if(messages.hasWarnings()) |
jobServiceTask.setStatusEnum(JobServiceTaskImpl.JobStatus.FINISHED_WARNINGS); |
else |
jobServiceTask.setStatusEnum(JobServiceTaskImpl.JobStatus.FINISHED); |
jobServiceTask.setServiceLastUpdateDate(new Date()); |
jobServiceTask.setServiceFinishDate(new Date()); |
serviceLog.info("FINISHING SERVICE"); |
125,5 → 133,11 |
public void serviceLogFatal(String str, Throwable e){ if(jobServiceTask != null) serviceLog.fatal(str,e);} |
//Implemented in SubService to run the Job |
protected abstract void runJobServiceTask() throws Throwable; |
protected abstract ILogMessages runJobServiceTask() throws Throwable; |
protected void commitPartially() { |
AbstractDao.getCurrentSession().getTransaction().commit(); |
AbstractDao.getCurrentSession().beginTransaction(); |
AbstractDao.getCurrentSession().update(jobServiceTask); |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/jobs/JobDeamon.java |
---|
107,10 → 107,9 |
if(isRunnableNow(schedule, last)) |
{ |
logger.info("Schedulling one job " + schedule.getTargetService() + " to run"); |
JobServiceTaskImpl jobServiceTask = DomainObjectFactory.createJobServiceTaskImpl(); |
DaoFactory.getJobServiceTaskDaoImpl().save(jobServiceTask); |
jobServiceTask.setStartDate(new Date()); |
DaoFactory.getJobServiceTaskDaoImpl().flush(); |
jobServiceTask.setTargetService(schedule.getTargetService()); |
jobServiceTask.setCreatedBy(schedule.getCreatedBy()); |
jobServiceTask.setExecuted(false); |
121,6 → 120,9 |
jobServiceTask.setRequestStop(false); |
jobServiceTask.setOwner(schedule.getCreatedBy()); |
jobServiceTask.setJobHandler(new SerializableNullJobHandler()); |
jobServiceTask.setProgress(0); |
DaoFactory.getJobServiceTaskDaoImpl().save(jobServiceTask); |
schedule.setLastJobServiceTask(jobServiceTask); |
try { |
String filePath = Class.forName(schedule.getTargetService()).getSimpleName() + "-" + DatesUtils.getFormatedFileSystem(new Date()); |
jobServiceTask.setLogFilePath( filePath + ".log"); |
139,25 → 141,26 |
paramJob.setJobServiceTask(jobServiceTask); |
DaoFactory.getJobServiceTaskParameterDaoImpl().save(paramJob); |
} |
DaoFactory.getJobServiceTaskParameterDaoImpl().flush(); |
jobServiceTask.setServiceTaskParameters(paramsJob); |
DaoFactory.getJobServiceTaskDaoImpl().saveOrUpdate(jobServiceTask); |
//DaoFactory.getJobServiceTaskDaoImpl().saveOrUpdate(jobServiceTask); |
//a last schedule date e a hora a que foi marcado para correr a ultima vez |
//a partir do momento que e' agendado o trabalho ele vai correr portanto |
//e' esta a hora que se considera para a corrida |
schedule.setLastScheduleDate(new Date()); |
if(schedule.isNow()) |
{ |
schedule.setNow(false); |
} |
} |
//Remove Now Schedules |
if(schedule.isNow()) |
{ |
DaoFactory.getJobServiceTaskSchedulerDaoImpl().delete(schedule); |
} |
} |
} |
private boolean isRunnableNow(JobServiceTaskScheduler schedule,Date lastDate) |
{ |
if(!schedule.isActive()) |
return false; |
if(lastDate == null) |
lastDate = new Date(0); |
GregorianCalendar gC = new GregorianCalendar(); |
/impl/src/java/pt/estgp/estgweb/services/sms/SmsService.java |
---|
1,5 → 1,6 |
package pt.estgp.estgweb.services.sms; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.Globals; |
26,9 → 27,10 |
try |
{ |
SiGesWEB service; |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
try |
{ |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
/impl/src/java/pt/estgp/estgweb/services/logresults/impl/DefaultLogMessages.java |
---|
3,6 → 3,7 |
import pt.estgp.estgweb.domain.CourseUnitSummary; |
import pt.estgp.estgweb.services.logresults.ILogMessages; |
import pt.estgp.estgweb.services.logresults.ILogMessage; |
import pt.estgp.estgweb.services.logresults.LogMessageTypeEnum; |
import java.util.List; |
import java.util.ArrayList; |
40,6 → 41,26 |
return summaries; |
} |
@Override |
public boolean hasErrors() { |
if(logMessages == null) |
return false; |
for(ILogMessage m:logMessages) |
if(m.getType() == LogMessageTypeEnum.ERROR || m.getType() == LogMessageTypeEnum.FATAL) |
return true; |
return false; |
} |
@Override |
public boolean hasWarnings() { |
if(logMessages == null) |
return false; |
for(ILogMessage m:logMessages) |
if(m.getType() == LogMessageTypeEnum.WARNING) |
return true; |
return false; |
} |
public void setSummaries(List<CourseUnitSummary> summaries) { |
this.summaries = summaries; |
} |
/impl/src/java/pt/estgp/estgweb/services/logresults/ILogMessages.java |
---|
13,4 → 13,6 |
{ |
public List<ILogMessage> getLogMessages(); |
List<CourseUnitSummary> getSummaries(); |
public boolean hasErrors(); |
public boolean hasWarnings(); |
} |
/impl/src/java/pt/estgp/estgweb/services/blogs/LoadEditableBlogs.java |
---|
1,16 → 1,15 |
package pt.estgp.estgweb.services.blogs; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.domain.views.BlogView; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.Globals; |
import org.apache.log4j.Logger; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.ArrayList; |
/** |
* @author Jorge Machado |
34,4 → 33,18 |
} |
return blogViews; |
} |
public List<BlogView> loadMax(Integer max,UserSession userSession) throws ServiceException |
{ |
boolean internal = true; |
if (userSession.getUser() == null) |
internal = false; |
List<BlogImpl> blogs = DaoFactory.getBlogDaoImpl().findBlogs(userSession.getUser().getRolesList(), internal,max); |
List<BlogView> blogViews = new ArrayList<BlogView>(); |
for(BlogImpl b: blogs) |
{ |
blogViews.add(new BlogView(b)); |
} |
return blogViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/blogs/LoadOwnerBlogs.java |
---|
30,4 → 30,14 |
} |
return blogViews; |
} |
public List<BlogView> loadMax(Integer max, UserSession userSession) throws ServiceException |
{ |
List<BlogImpl> blogs = DaoFactory.getBlogDaoImpl().loadOwnedBlogs(userSession.getUser().getId(),max); |
List<BlogView> blogViews = new ArrayList<BlogView>(); |
for(BlogImpl b: blogs) |
{ |
blogViews.add(new BlogView(b)); |
} |
return blogViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/blogs/LoadOwnerBlogPosts.java |
---|
1,17 → 1,15 |
package pt.estgp.estgweb.services.blogs; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.domain.views.BlogPostView; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.BlogPostImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.BlogPostImpl; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.BlogPostView; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import org.apache.log4j.Logger; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.ArrayList; |
/** |
* @author Jorge Machado |
32,4 → 30,15 |
} |
return blogViews; |
} |
public List<BlogPostView> loadMax(Integer max, UserSession userSession) throws ServiceException |
{ |
List<BlogPostImpl> blogs = DaoFactory.getBlogPostDaoImpl().loadOwnedBlogPostsMax(userSession.getUser().getId(), max); |
List<BlogPostView> blogViews = new ArrayList<BlogPostView>(); |
for(BlogPostImpl b: blogs) |
{ |
blogViews.add(new BlogPostView(b)); |
} |
return blogViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/directories/DirectoryService.java |
---|
3,23 → 3,35 |
import org.apache.log4j.Logger; |
import org.dom4j.Document; |
import org.dom4j.DocumentException; |
import pt.estgp.estgweb.domain.DirectoryImpl; |
import pt.estgp.estgweb.domain.ConfigurationDirectoryImpl; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.filters.exceptions.NotFoundException; |
import pt.estgp.estgweb.services.directories.xsd.Directory; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.utils.Dom4jUtil; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.io.File; |
import java.net.MalformedURLException; |
import java.util.ArrayList; |
import java.util.List; |
import javax.xml.bind.JAXBContext; |
import javax.xml.bind.JAXBException; |
import javax.xml.bind.Marshaller; |
import javax.xml.bind.Unmarshaller; |
import java.io.StringReader; |
import java.io.StringWriter; |
import java.util.HashMap; |
import java.util.Map; |
/** |
* @author Jorge Machado |
*/ |
public class DirectoryService |
public class DirectoryService implements IService |
{ |
private static final Logger logger = Logger.getLogger(DirectoryService.class); |
/* |
public List<DirectoryImpl> loadDirectories(String classesPath, String place) |
{ |
List<DirectoryImpl> directories = new ArrayList<DirectoryImpl>(); |
68,4 → 80,159 |
} |
return directories; |
} |
*/ |
public Directory loadDirectory(String identifier, UserSession sess) |
{ |
Directory directory = null; |
ConfigurationDirectoryImpl dir = DaoFactory.getConfigurationDirectoryDaoImpl().loadDirectory(identifier); |
JAXBContext jc; |
if(dir == null) |
{ |
try |
{ |
jc = JAXBContext.newInstance(Directory.class); |
Unmarshaller unmarshaller = jc.createUnmarshaller(); |
directory = (Directory) unmarshaller.unmarshal(DirectoryService.class.getResourceAsStream("/pt/estgp/estgweb/directories/" + identifier + ".xml")); |
dir = DomainObjectFactory.createConfigurationDirectoryImpl(); |
dir.setDescricao(""); |
dir.setIdDir(identifier); |
Marshaller marshaller = jc.createMarshaller(); |
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); |
StringWriter sw = new StringWriter(); |
marshaller.marshal(directory, sw); |
dir.setXml(sw.toString()); |
DaoFactory.getConfigurationDirectoryDaoImpl().save(dir); |
return directory; |
} catch (JAXBException e) { |
logger.error(e,e); |
} |
} |
else |
{ |
try |
{ |
jc = JAXBContext.newInstance(Directory.class); |
Unmarshaller unmarshaller = jc.createUnmarshaller(); |
StringReader r = new StringReader(dir.getXml()); |
directory = (Directory) unmarshaller.unmarshal(r); |
return directory; |
} catch (JAXBException e) { |
logger.error(e,e); |
} |
} |
return directory; |
} |
public String loadDirectoryXml(String identifier, UserSession sess) |
{ |
ConfigurationDirectoryImpl dir = DaoFactory.getConfigurationDirectoryDaoImpl().loadDirectory(identifier); |
JAXBContext jc; |
if(dir == null) |
{ |
try |
{ |
jc = JAXBContext.newInstance(Directory.class); |
Unmarshaller unmarshaller = jc.createUnmarshaller(); |
Directory directory = (Directory) unmarshaller.unmarshal(DirectoryService.class.getResourceAsStream("/pt/estgp/estgweb/directories/" + identifier + ".xml")); |
dir = DomainObjectFactory.createConfigurationDirectoryImpl(); |
dir.setDescricao(""); |
dir.setIdDir(identifier); |
Marshaller marshaller = jc.createMarshaller(); |
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); |
StringWriter sw = new StringWriter(); |
marshaller.marshal(directory, sw); |
dir.setXml(sw.toString()); |
DaoFactory.getConfigurationDirectoryDaoImpl().save(dir); |
return sw.toString(); |
} catch (JAXBException e) { |
logger.error(e,e); |
} |
} |
else |
{ |
return dir.getXml(); |
} |
return null; |
} |
private static Map<String,String> cachedHtml = new HashMap<String, String>(); |
private static synchronized String getOrAddOrRemove(String id,String html,boolean remove) |
{ |
if(remove) |
cachedHtml.remove(id); |
else if(html != null) |
cachedHtml.put(id,html); |
else |
return cachedHtml.get(id); |
return null; |
} |
public String loadDirectoryHtml(String identifier, Map<String,Object> parameters, UserSession sess) throws ServiceException { |
String html = getOrAddOrRemove(identifier,null,false); |
if(html != null) |
return html; |
String xml = loadDirectoryXml(identifier,sess); |
try |
{ |
JAXBContext jc = JAXBContext.newInstance(Directory.class); |
Unmarshaller unmarshaller = jc.createUnmarshaller(); |
Directory directory = (Directory) unmarshaller.unmarshal(DirectoryService.class.getResourceAsStream("/pt/estgp/estgweb/directories/" + identifier + ".xml")); |
Document dom = Dom4jUtil.parse(xml); |
html = Dom4jUtil.styleDocument(dom,"/pt/estgp/estgweb/directories/" + directory.getStyle(), parameters); |
getOrAddOrRemove(identifier,html,false); |
} catch (JAXBException e) { |
logger.error(e,e); |
throw new ServiceException("Cant load Menu"); |
} catch (DocumentException e) { |
logger.error(e, e); |
throw new ServiceException("Cant load Menu"); |
} catch (Exception e) { |
logger.error(e, e); |
throw new ServiceException("Cant load Menu"); |
} |
return html; |
} |
public void saveDirectory(Directory directory,UserSession sess) throws NotFoundException, ServiceException { |
ConfigurationDirectoryImpl dir = DaoFactory.getConfigurationDirectoryDaoImpl().loadDirectory(directory.getId()); |
if(dir != null) |
{ |
JAXBContext jc = null; |
try { |
jc = JAXBContext.newInstance(Directory.class); |
Marshaller marshaller = jc.createMarshaller(); |
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); |
StringWriter sw = new StringWriter(); |
marshaller.marshal(directory, sw); |
dir.setXml(sw.toString()); |
getOrAddOrRemove(directory.getId(),null,true); |
} |
catch (JAXBException e) |
{ |
logger.error(e,e); |
throw new ServiceException(e.toString(),e); |
} |
} |
else |
{ |
throw new NotFoundException("Directory does not exist with that ID " + directory.getId()); |
} |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/directories/xsd/RightImpl.java |
---|
New file |
0,0 → 1,7 |
package pt.estgp.estgweb.services.directories.xsd; |
/** |
* Created by jorgemachado on 16/11/15. |
*/ |
public class RightImpl extends RightsT.Right { |
} |
/impl/src/java/pt/estgp/estgweb/services/directories/xsd/TestDynamicLists.java |
---|
New file |
0,0 → 1,43 |
package pt.estgp.estgweb.services.directories.xsd; |
import junit.framework.TestCase; |
/** |
* Created by jorgemachado on 16/11/15. |
*/ |
public class TestDynamicLists extends TestCase |
{ |
public void testLists() |
{ |
Directory d = new DirectoryImpl(); |
d.getGroupsDeclaration().getGroup().get(0).setName("teste"); |
d.getGroupsDeclaration().getGroup().get(1).setName("teste"); |
d.getRights().getRight().get(0).setName("teste"); |
d.getRights().getRight().get(1).setName("teste"); |
d.getLeaf().get(0).setAbsolute(true); |
d.getLeaf().get(1).setAbsolute(true); |
d.getLeaf().get(2).setAbsolute(true); |
d.getLeaf().get(2).getLeaf().get(3).setAbsolute(true); |
d.getLeaf().get(2).getLeaf().get(2).setAbsolute(false); |
d.getLeaf().get(2).getLeaf().get(1).setAbsolute(true); |
d.getLeaf().get(2).getLeaf().get(0).setAbsolute(false); |
assertTrue(d.getGroupsDeclaration().getGroup().size() == 2); |
assertTrue(d.getRights().getRight().size() == 2); |
assertTrue(d.getLeaf().size() == 3); |
assertTrue(d.getLeaf().get(2).getLeaf().get(0).getAbsolute() == false); |
assertTrue(d.getLeaf().get(2).getLeaf().get(1).getAbsolute() == true); |
assertTrue(d.getLeaf().get(2).getLeaf().get(2).getAbsolute() == false); |
assertTrue(d.getLeaf().get(2).getLeaf().get(3).getAbsolute() == true); |
d.getLeaf().get(3).getRights().getRight().get(0).setName("teste55"); |
assertEquals(d.getLeaf().get(3).getRights().getRight().get(0).getName(), "teste55"); |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/directories/xsd/DirectoryImpl.java |
---|
New file |
0,0 → 1,32 |
package pt.estgp.estgweb.services.directories.xsd; |
import pt.estgp.estgweb.utils.DynamicArrayList; |
/** |
* Created by jorgemachado on 16/11/15. |
*/ |
public class DirectoryImpl extends Directory |
{ |
public DirectoryImpl() |
{ |
super(); |
setRights(new RightsTImpl()); |
setGroupsDeclaration(new GroupsDeclarationTImpl()); |
leaf = new DynamicArrayList<LeafT>(LeafTImpl.class); |
} |
public boolean isGroupDeclarationEmpty() |
{ |
return groupsDeclaration == null || groupsDeclaration.getGroup() == null || groupsDeclaration.getGroup().size() == 0; |
} |
public boolean isRightsEmpty() |
{ |
return rights == null || rights.getRight() == null || rights.getRight().size() == 0; |
} |
public boolean isLeafEmpty() |
{ |
return leaf == null || leaf.size() == 0; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/directories/xsd/RightsTImpl.java |
---|
New file |
0,0 → 1,22 |
package pt.estgp.estgweb.services.directories.xsd; |
import pt.estgp.estgweb.utils.DynamicArrayList; |
/** |
* Created by jorgemachado on 16/11/15. |
*/ |
public class RightsTImpl extends RightsT { |
public RightsTImpl() |
{ |
super(); |
right = new DynamicArrayList<Right>(RightImpl.class); |
} |
public boolean isRightEmpty() |
{ |
return right == null || right.size() == 0; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/directories/xsd/GroupsDeclarationTImpl.java |
---|
New file |
0,0 → 1,20 |
package pt.estgp.estgweb.services.directories.xsd; |
import pt.estgp.estgweb.utils.DynamicArrayList; |
/** |
* Created by jorgemachado on 16/11/15. |
*/ |
public class GroupsDeclarationTImpl extends GroupDeclarationT |
{ |
public GroupsDeclarationTImpl() |
{ |
super(); |
group = new DynamicArrayList<Group>(GroupImpl.class); |
} |
public boolean isGroupEmpty() |
{ |
return group == null || group.size() == 0; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/directories/xsd/LeafTImpl.java |
---|
New file |
0,0 → 1,89 |
package pt.estgp.estgweb.services.directories.xsd; |
import pt.estgp.estgweb.utils.DynamicArrayList; |
import java.util.Iterator; |
import java.util.List; |
/** |
* Created by jorgemachado on 16/11/15. |
*/ |
public class LeafTImpl extends LeafT |
{ |
public LeafTImpl() |
{ |
super(); |
setRights(new RightsTImpl()); |
setGroupsDeclaration(new GroupsDeclarationTImpl()); |
leaf = new DynamicArrayList<LeafT>(LeafTImpl.class); |
} |
public boolean isGroupDeclarationEmpty() |
{ |
return groupsDeclaration == null || groupsDeclaration.getGroup() == null || groupsDeclaration.getGroup().size() == 0; |
} |
public boolean isRightsEmpty() |
{ |
return rights == null || rights.getRight() == null || rights.getRight().size() == 0; |
} |
public boolean isLeafEmpty() |
{ |
return leaf == null || leaf.size() == 0; |
} |
public static LeafT findLeaf(Directory d,String id) |
{ |
return findLeafT(d.getLeaf(),id); |
} |
public static LeafT removeLeaf(Directory d,String id) |
{ |
return removeLeafT(d.getLeaf(), id); |
} |
public static LeafT removeLeaf(LeafT l,String id) |
{ |
return removeLeafT(l.getLeaf(), id); |
} |
public static LeafT findLeaf(LeafT l,String id) |
{ |
return findLeafT(l.getLeaf(),id); |
} |
private static LeafT findLeafT(List<LeafT> leafs,String id) |
{ |
if(leafs == null || leafs.size() == 0) |
return null; |
for(LeafT l: leafs) |
{ |
if(l.getId().equals(id)) |
return l; |
LeafT inside = findLeafT(l.getLeaf(),id); |
if(inside != null) |
return inside; |
} |
return null; |
} |
private static LeafT removeLeafT(List<LeafT> leafs,String id) |
{ |
if(leafs == null || leafs.size() == 0) |
return null; |
Iterator<LeafT> iter = leafs.iterator(); |
while(iter.hasNext()) |
{ |
LeafT l = iter.next(); |
if(l.getId().equals(id)) |
{ |
iter.remove(); |
return l; |
} |
LeafT inside = removeLeafT(l.getLeaf(),id); |
if(inside != null) |
return inside; |
} |
return null; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/directories/xsd/GroupImpl.java |
---|
New file |
0,0 → 1,9 |
package pt.estgp.estgweb.services.directories.xsd; |
/** |
* Created by jorgemachado on 16/11/15. |
*/ |
public class GroupImpl extends GroupDeclarationT.Group |
{ |
} |
/impl/src/java/pt/estgp/estgweb/services/announcements/CreateAnnouncementService.java |
---|
91,6 → 91,7 |
List<User> usersToConsume = new ArrayList<User>(); |
for(User u: users) |
usersToConsume.add(u); |
logger.info("Scheduling mail jobs to " + usersToConsume.size() + " recipients"); |
while(usersToConsume.size() > 0) |
{ |
Iterator<User> iter = usersToConsume.iterator(); |
/impl/src/java/pt/estgp/estgweb/services/announcements/LoadOwnerAnnouncements.java |
---|
1,18 → 1,16 |
package pt.estgp.estgweb.services.announcements; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.AnnouncementImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.AnnouncementView; |
import pt.estgp.estgweb.services.blogs.LoadBlogService; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.domain.views.AnnouncementView; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.AnnouncementImpl; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import org.apache.log4j.Logger; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.ArrayList; |
/** |
* @author Jorge Machado |
33,4 → 31,16 |
} |
return announcementViews; |
} |
public List<AnnouncementView> loadMax(Integer max, UserSession userSession) throws ServiceException |
{ |
List<AnnouncementImpl> announcements = DaoFactory.getAnnouncementDaoImpl().loadOwnedAnnouncements(userSession.getUser().getId(),max); |
List<AnnouncementView> announcementViews = new ArrayList<AnnouncementView>(); |
for(AnnouncementImpl announcement: announcements) |
{ |
announcementViews.add(new AnnouncementView(announcement)); |
} |
return announcementViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/authenticate/AuthenticateService.java |
---|
4,6 → 4,7 |
import openldap.ILdapManager; |
import openldap.LdapManagerFactory; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.common.CommonServicesManager; |
125,6 → 126,8 |
userSession.setName(u.getName()); |
userSession.setUsername(u.getUsername()); |
userSession.setUser(u); |
if(u.getRoles() == null || u.getRoles().trim().length() == 0) |
u.setRoles(Globals.ROLE_INVITED); |
DaoFactory.getUserSessionDaoImpl().reattach(userSession); |
return userSession; |
/impl/src/java/pt/estgp/estgweb/domain/StudentImpl.java |
---|
7,7 → 7,9 |
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
import java.util.ArrayList; |
import java.util.HashMap; |
import java.util.List; |
import java.util.Map; |
/** |
* @author Jorge Machado |
66,6 → 68,26 |
return getUnitsSemestre("A",getSubscribedUnitsView()); |
} |
public List<CourseUnit> getSubscribedUnitsViewT1() |
{ |
return getUnitsSemestre("T1",getSubscribedUnitsView()); |
} |
public List<CourseUnit> getSubscribedUnitsViewT2() |
{ |
return getUnitsSemestre("T2",getSubscribedUnitsView()); |
} |
public List<CourseUnit> getSubscribedUnitsViewT3() |
{ |
return getUnitsSemestre("T3",getSubscribedUnitsView()); |
} |
public List<CourseUnit> getSubscribedUnitsViewT4() |
{ |
return getUnitsSemestre("T4",getSubscribedUnitsView()); |
} |
public List<CourseUnit> getSubscribedUnitsView() |
{ |
if(subscribedUnitsView == null) |
95,6 → 117,23 |
return subscribedUnitsView; |
} |
public List<CourseUnit> getSubscribedUnitsCurrentYearViewT1() |
{ |
return getUnitsSemestre("T1",getSubscribedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getSubscribedUnitsCurrentYearViewT2() |
{ |
return getUnitsSemestre("T2",getSubscribedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getSubscribedUnitsCurrentYearViewT3() |
{ |
return getUnitsSemestre("T3",getSubscribedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getSubscribedUnitsCurrentYearViewT4() |
{ |
return getUnitsSemestre("T4",getSubscribedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getSubscribedUnitsCurrentYearViewS1() |
{ |
return getUnitsSemestre("S1",getSubscribedUnitsCurrentYearView()); |
137,6 → 176,61 |
return subscribedUnitsCurrentYearView; |
} |
Map<String,List<CourseUnit>> subscribedUnitsYear = new HashMap<String,List<CourseUnit>>(); |
public List<CourseUnit> getSubscribedUnitsView(String year) |
{ |
List<CourseUnit> cuYear = subscribedUnitsYear.get(year); |
if(cuYear == null) |
{ |
try |
{ |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"serializable","year"}; |
Object[] args = new Object[]{getId(),year}; |
cuYear = (List<CourseUnit>) sm.execute(null, "LoadSubscribedUnitsGivenYear", args, names); |
if(cuYear != null) |
subscribedUnitsYear.put(year,cuYear); |
else |
subscribedUnitsYear.put(year,new ArrayList<CourseUnit>()); |
} |
catch (Throwable e) |
{ |
logger.error(e,e); |
} |
} |
return cuYear; |
} |
public List<CourseUnit> getSubscribedUnitsViewA(String year) |
{ |
return getUnitsSemestre("A", getSubscribedUnitsView(year)); |
} |
public List<CourseUnit> getSubscribedUnitsViewS1(String year) |
{ |
return getUnitsSemestre("S1",getSubscribedUnitsView(year)); |
} |
public List<CourseUnit> getSubscribedUnitsViewS2(String year) |
{ |
return getUnitsSemestre("S2",getSubscribedUnitsView(year)); |
} |
public List<CourseUnit> getSubscribedUnitsViewT1(String year) |
{ |
return getUnitsSemestre("T1",getSubscribedUnitsView(year)); |
} |
public List<CourseUnit> getSubscribedUnitsViewT2(String year) |
{ |
return getUnitsSemestre("T2",getSubscribedUnitsView(year)); |
} |
public List<CourseUnit> getSubscribedUnitsViewT3(String year) |
{ |
return getUnitsSemestre("T3",getSubscribedUnitsView(year)); |
} |
public List<CourseUnit> getSubscribedUnitsViewT4(String year) |
{ |
return getUnitsSemestre("T4",getSubscribedUnitsView(year)); |
} |
public List<CourseUnit> getSubscribedUnitsOldYearsViewS1() |
{ |
return getUnitsSemestre("S1",getSubscribedUnitsOldYearsView()); |
/impl/src/java/pt/estgp/estgweb/domain/CourseUnitProgramImpl.java |
---|
5,7 → 5,6 |
import org.dom4j.*; |
import org.hibernate.NonUniqueResultException; |
import org.hibernate.Session; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.courseunits.SaveCourseUnitProgram; |
624,7 → 623,7 |
cu.setCode(line.codigoSIGESUnidade); |
cu.setCourseCode(line.codigoCurso); |
cu.setName(line.nomeUnidadeCurricular); |
cu.setInstitutionCode("" + Globals.SIGES_INSTITUTION_CODE); |
cu.setInstitutionCode("" + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()); |
setCourse(cu, line); |
DaoFactory.getCourseUnitDaoImpl().save(cu); |
/impl/src/java/pt/estgp/estgweb/domain/ConfigurationGradesStatusEpocaImpl.java |
---|
New file |
0,0 → 1,27 |
package pt.estgp.estgweb.domain; |
import java.io.Serializable; |
import java.util.Date; |
/** |
* Created by jorgemachado on 02/11/15. |
*/ |
public class ConfigurationGradesStatusEpocaImpl extends ConfigurationGradesStatusEpoca { |
public ConfigurationGradesStatusEpocaImpl() |
{ |
} |
@Override |
public Serializable getSerializable() { |
return getId(); |
} |
public static ConfigurationGradesStatusEpocaImpl create(String status, String descricao) |
{ |
ConfigurationGradesStatusEpocaImpl obj = DomainObjectFactory.createConfigurationGradesStatusEpocaImpl(); |
obj.setStatus(status); |
obj.setDescricao(descricao); |
obj.setSaveDate(new Date()); |
return obj; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/TeacherImpl.java |
---|
70,6 → 70,27 |
{ |
return getUnitsSemestre("A",getTeachedUnitsView()); |
} |
public List<CourseUnit> getTeachedUnitsViewT1() |
{ |
return getUnitsSemestre("T1",getTeachedUnitsView()); |
} |
public List<CourseUnit> getTeachedUnitsViewT2() |
{ |
return getUnitsSemestre("T2",getTeachedUnitsView()); |
} |
public List<CourseUnit> getTeachedUnitsViewT3() |
{ |
return getUnitsSemestre("T3",getTeachedUnitsView()); |
} |
public List<CourseUnit> getTeachedUnitsViewT4() |
{ |
return getUnitsSemestre("T4",getTeachedUnitsView()); |
} |
public List<CourseUnit> getTeachedUnitsView() |
{ |
if(teachedUnitsView == null) |
112,8 → 133,28 |
return getUnitsSemestre("A",getTeachedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getTeachedUnitsCurrentYearViewT1() |
{ |
return getUnitsSemestre("T1",getTeachedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getTeachedUnitsCurrentYearViewT2() |
{ |
return getUnitsSemestre("T2",getTeachedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getTeachedUnitsCurrentYearViewT3() |
{ |
return getUnitsSemestre("T3",getTeachedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getTeachedUnitsCurrentYearViewT4() |
{ |
return getUnitsSemestre("T4",getTeachedUnitsCurrentYearView()); |
} |
public List<CourseUnit> getTeachedUnitsViewS1(String year) |
{ |
return getUnitsSemestre("S1",getTeachedUnitsView(year)); |
127,6 → 168,26 |
return getUnitsSemestre("A",getTeachedUnitsView(year)); |
} |
public List<CourseUnit> getTeachedUnitsViewT1(String year) |
{ |
return getUnitsSemestre("T1",getTeachedUnitsView(year)); |
} |
public List<CourseUnit> getTeachedUnitsViewT2(String year) |
{ |
return getUnitsSemestre("T2",getTeachedUnitsView(year)); |
} |
public List<CourseUnit> getTeachedUnitsViewT3(String year) |
{ |
return getUnitsSemestre("T3",getTeachedUnitsView(year)); |
} |
public List<CourseUnit> getTeachedUnitsViewT4(String year) |
{ |
return getUnitsSemestre("T4",getTeachedUnitsView(year)); |
} |
Map<String,List<CourseUnit>> teachedUnitsYear = new HashMap<String,List<CourseUnit>>(); |
Map<String,List<Course>> teachedCourseYear = new HashMap<String,List<Course>>(); |
/impl/src/java/pt/estgp/estgweb/domain/UserManagedRoleImpl.java |
---|
1,12 → 1,12 |
package pt.estgp.estgweb.domain; |
import jomm.utils.StringsUtils; |
import pt.estgp.estgweb.utils.RoleManager; |
import java.util.*; |
import java.util.ArrayList; |
import java.util.Iterator; |
import java.util.List; |
import pt.estgp.estgweb.utils.RoleManager; |
public abstract class UserManagedRoleImpl extends UserImpl |
{ |
61,6 → 61,7 |
} |
} |
} |
return super.getRoles(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/JobServiceTaskSchedulerView.java |
---|
New file |
0,0 → 1,130 |
package pt.estgp.estgweb.domain.views; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.JobServiceTaskScheduler; |
import pt.estgp.estgweb.domain.JobServiceTaskSchedulerImpl; |
import pt.estgp.estgweb.domain.JobServiceTaskSchedulerParameter; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.utils.DynamicArrayList; |
import java.io.Serializable; |
import java.util.ArrayList; |
import java.util.Comparator; |
import java.util.Date; |
import java.util.List; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
* @time 19:34:49 |
* @see pt.estgp.estgweb.domain.views |
*/ |
public class JobServiceTaskSchedulerView extends DomainObjectView |
{ |
private static Logger logger = Logger.getLogger(JobServiceTaskSchedulerView.class); |
JobServiceTaskSchedulerImpl jobServiceTaskScheduler; |
List<JobServiceTaskSchedulerParameter> parameters; |
@Override |
public Class getReferenceClass() { |
return JobServiceTaskScheduler.class; |
} |
@Override |
public Serializable getSerializable() |
{ |
return jobServiceTaskScheduler.getId(); |
} |
public JobServiceTaskSchedulerView() |
{ |
} |
public JobServiceTaskSchedulerView(JobServiceTaskSchedulerImpl jobServiceTaskScheduler) |
{ |
super(jobServiceTaskScheduler); |
init(jobServiceTaskScheduler); |
} |
public void init(JobServiceTaskSchedulerImpl jobServiceTaskScheduler) |
{ |
parameters = new ArrayList<JobServiceTaskSchedulerParameter>(); |
if(jobServiceTaskScheduler.getServiceTaskSchedulerParameters() != null) |
{ |
parameters.addAll(jobServiceTaskScheduler.getServiceTaskSchedulerParameters()); |
} |
} |
public void persistViewInObject(JobServiceTaskScheduler jobServiceTaskScheduler) |
{ |
jobServiceTaskScheduler.setDescription(this.jobServiceTaskScheduler.getDescription()); |
jobServiceTaskScheduler.setTargetService(this.jobServiceTaskScheduler.getTargetService()); |
jobServiceTaskScheduler.setWeekly(this.jobServiceTaskScheduler.isWeekly()); |
jobServiceTaskScheduler.setWeekday(this.jobServiceTaskScheduler.getWeekday()); |
jobServiceTaskScheduler.setDaily(this.jobServiceTaskScheduler.isDaily()); |
jobServiceTaskScheduler.setHour(this.jobServiceTaskScheduler.getHour()); |
jobServiceTaskScheduler.setMinute(this.jobServiceTaskScheduler.getMinute()); |
jobServiceTaskScheduler.setSecond(this.jobServiceTaskScheduler.getSecond()); |
jobServiceTaskScheduler.setMonthly(this.jobServiceTaskScheduler.isMonthly()); |
jobServiceTaskScheduler.setMonthday(this.jobServiceTaskScheduler.getMonthday()); |
jobServiceTaskScheduler.setNow(this.jobServiceTaskScheduler.isNow()); |
//Remover apagados |
List<JobServiceTaskSchedulerParameter> deleted = DaoFactory.getJobServiceTaskSchedulerParameterDaoImpl() |
.deleteMissing( |
this.parameters, |
jobServiceTaskScheduler.getServiceTaskSchedulerParameters(), |
new Comparator<JobServiceTaskSchedulerParameter>() |
{ |
@Override |
public int compare(JobServiceTaskSchedulerParameter j1, JobServiceTaskSchedulerParameter j2) { |
return (int) (j1.getId() - j2.getId()); |
} |
}); |
for(JobServiceTaskSchedulerParameter d: deleted) |
d.setJobServiceTaskScheduler(null); |
for(JobServiceTaskSchedulerParameter newParam: parameters) |
{ |
if(newParam.getId() <= 0) |
{ |
newParam.setJobServiceTaskScheduler(jobServiceTaskScheduler); |
jobServiceTaskScheduler.getServiceTaskSchedulerParameters().add(newParam); |
newParam.setSaveDate(new Date()); |
DaoFactory.getJobServiceTaskSchedulerParameterDaoImpl().save(newParam); |
} |
else |
{ |
JobServiceTaskSchedulerParameter persistentParam = DaoFactory.getJobServiceTaskSchedulerParameterDaoImpl().load(newParam.getId()); |
persistentParam.setDescription(newParam.getDescription()); |
persistentParam.setName(newParam.getName()); |
persistentParam.setObject(newParam.getObject()); |
} |
} |
} |
public JobServiceTaskSchedulerImpl getJobServiceTaskScheduler() { |
return jobServiceTaskScheduler; |
} |
public void setJobServiceTaskScheduler(JobServiceTaskSchedulerImpl jobServiceTaskScheduler) { |
this.jobServiceTaskScheduler = jobServiceTaskScheduler; |
} |
public List<JobServiceTaskSchedulerParameter> getParameters() { |
if(parameters == null) |
parameters = new DynamicArrayList<JobServiceTaskSchedulerParameter>(JobServiceTaskSchedulerParameter.class); |
return parameters; |
} |
public void setParameters(List<JobServiceTaskSchedulerParameter> parameters) { |
this.parameters = parameters; |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitEvaluationView.java |
---|
18,6 → 18,7 |
private CourseUnitEvaluation courseUnitEvaluation; |
private boolean fechar = false; |
private boolean teacherComplete = false; |
public Class getReferenceClass() |
{ |
74,4 → 75,12 |
public void setFechar(boolean fechar) { |
this.fechar = fechar; |
} |
public boolean isTeacherComplete() { |
return teacherComplete; |
} |
public void setTeacherComplete(boolean teacherComplete) { |
this.teacherComplete = teacherComplete; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/ConfigurationGradesView.java |
---|
New file |
0,0 → 1,64 |
package pt.estgp.estgweb.domain.views; |
import pt.estgp.estgweb.domain.*; |
import java.io.Serializable; |
import java.util.ArrayList; |
import java.util.List; |
/** |
* Created by jorgemachado on 12/11/15. |
*/ |
public class ConfigurationGradesView extends DomainObjectView { |
long id; |
List<ConfigurationGradesStatusEpoca> statusEpocas; |
List<ConfigurationGradesEpocaAvaliacao> epocasAvaliacao; |
@Override |
public Class getReferenceClass() { |
return ConfigurationGrades.class; |
} |
@Override |
public Serializable getSerializable() { |
return id; |
} |
public void init(ConfigurationGrades configurationGrades) |
{ |
this.id = configurationGrades.getId(); |
statusEpocas = new ArrayList<ConfigurationGradesStatusEpoca>(configurationGrades.getStatusEpoca()); |
epocasAvaliacao = new ArrayList<ConfigurationGradesEpocaAvaliacao>(configurationGrades.getEpocasAvaliacao()); |
} |
public long getId() { |
return id; |
} |
public void setId(long id) { |
this.id = id; |
} |
public List<ConfigurationGradesStatusEpoca> getStatusEpocas() { |
return statusEpocas; |
} |
public void setStatusEpocas(List<ConfigurationGradesStatusEpoca> statusEpocas) { |
this.statusEpocas = statusEpocas; |
} |
public List<ConfigurationGradesEpocaAvaliacao> getEpocasAvaliacao() { |
return epocasAvaliacao; |
} |
public void setEpocasAvaliacao(List<ConfigurationGradesEpocaAvaliacao> epocasAvaliacao) { |
this.epocasAvaliacao = epocasAvaliacao; |
} |
public void persist(ConfigurationGrades grades) |
{ |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/CourseView.java |
---|
35,12 → 35,35 |
private UserView coordinator; |
private UserView director; |
private List<CourseUnitView> courseUnits; |
private List<CourseUnitView> courseUnitsWithNoProgramA; |
private List<CourseUnitView> courseUnitsWithProgramCheckedA; |
private List<CourseUnitView> courseUnitsWithProgramNotCheckedA; |
private List<CourseUnitView> courseUnitsWithNoProgramS1; |
private List<CourseUnitView> courseUnitsWithProgramCheckedS1; |
private List<CourseUnitView> courseUnitsWithProgramNotCheckedS1; |
private List<CourseUnitView> courseUnitsWithNoProgramS2; |
private List<CourseUnitView> courseUnitsWithProgramCheckedS2; |
private List<CourseUnitView> courseUnitsWithProgramNotCheckedS2; |
private List<CourseUnitView> courseUnitsWithNoProgramT1; |
private List<CourseUnitView> courseUnitsWithProgramCheckedT1; |
private List<CourseUnitView> courseUnitsWithProgramNotCheckedT1; |
private List<CourseUnitView> courseUnitsWithNoProgramT2; |
private List<CourseUnitView> courseUnitsWithProgramCheckedT2; |
private List<CourseUnitView> courseUnitsWithProgramNotCheckedT2; |
private List<CourseUnitView> courseUnitsWithNoProgramT3; |
private List<CourseUnitView> courseUnitsWithProgramCheckedT3; |
private List<CourseUnitView> courseUnitsWithProgramNotCheckedT3; |
private List<CourseUnitView> courseUnitsWithNoProgramT4; |
private List<CourseUnitView> courseUnitsWithProgramCheckedT4; |
private List<CourseUnitView> courseUnitsWithProgramNotCheckedT4; |
private String studiesPlanStreamId; |
private RepositoryFileImpl studiesPlan; |
private String htmlResult; |
380,10 → 403,28 |
} |
public List<CourseUnitView> getCourseUnitsWithNoProgramS1() |
public List<CourseUnitView> getCourseUnitsWithNoProgramA() { return courseUnitsWithNoProgramA; } |
public List<CourseUnitView> getCourseUnitsWithNoProgramS1() { return courseUnitsWithNoProgramS1; } |
public List<CourseUnitView> getCourseUnitsWithNoProgramS2() |
{ |
return courseUnitsWithNoProgramS1; |
return courseUnitsWithNoProgramS2; |
} |
public List<CourseUnitView> getCourseUnitsWithNoProgramT1() |
{ |
return courseUnitsWithNoProgramT1; |
} |
public List<CourseUnitView> getCourseUnitsWithNoProgramT2() |
{ |
return courseUnitsWithNoProgramT2; |
} |
public List<CourseUnitView> getCourseUnitsWithNoProgramT3() |
{ |
return courseUnitsWithNoProgramT3; |
} |
public List<CourseUnitView> getCourseUnitsWithNoProgramT4() |
{ |
return courseUnitsWithNoProgramT4; |
} |
public String getValidationRole() { |
394,23 → 435,144 |
this.validationRole = validationRole; |
} |
public void setCourseUnitsWithNoProgramA(List<CourseUnitView> courseUnitsWithNoProgramA) |
{ |
this.courseUnitsWithNoProgramA = courseUnitsWithNoProgramA; |
} |
public void setCourseUnitsWithNoProgramS1(List<CourseUnitView> courseUnitsWithNoProgramS1) |
{ |
this.courseUnitsWithNoProgramS1 = courseUnitsWithNoProgramS1; |
} |
public void setCourseUnitsWithNoProgramS2(List<CourseUnitView> courseUnitsWithNoProgramS2) |
{ |
this.courseUnitsWithNoProgramS2 = courseUnitsWithNoProgramS2; |
} |
public void setCourseUnitsWithNoProgramT1(List<CourseUnitView> courseUnitsWithNoProgramT1) |
{ |
this.courseUnitsWithNoProgramT1 = courseUnitsWithNoProgramT1; |
} |
public void setCourseUnitsWithNoProgramT2(List<CourseUnitView> courseUnitsWithNoProgramT2) |
{ |
this.courseUnitsWithNoProgramT2 = courseUnitsWithNoProgramT2; |
} |
public void setCourseUnitsWithNoProgramT3(List<CourseUnitView> courseUnitsWithNoProgramT3) |
{ |
this.courseUnitsWithNoProgramT3 = courseUnitsWithNoProgramT3; |
} |
public void setCourseUnitsWithNoProgramT4(List<CourseUnitView> courseUnitsWithNoProgramT4) |
{ |
this.courseUnitsWithNoProgramT4 = courseUnitsWithNoProgramT4; |
} |
public boolean getHasA() { return getHasCourseUnitsWithNoProgramA() || getHasCourseUnitsWithProgramCheckedA() || getHasCourseUnitsWithProgramNotCheckedA(); } |
public boolean getHasS1() { return getHasCourseUnitsWithNoProgramS1() || getHasCourseUnitsWithProgramCheckedS1() || getHasCourseUnitsWithProgramNotCheckedS1(); } |
public boolean getHasS2() { return getHasCourseUnitsWithNoProgramS2() || getHasCourseUnitsWithProgramCheckedS2() || getHasCourseUnitsWithProgramNotCheckedS2(); } |
public boolean getHasT1() { return getHasCourseUnitsWithNoProgramT1() || getHasCourseUnitsWithProgramCheckedT1() || getHasCourseUnitsWithProgramNotCheckedT1(); } |
public boolean getHasT2() { return getHasCourseUnitsWithNoProgramT2() || getHasCourseUnitsWithProgramCheckedT2() || getHasCourseUnitsWithProgramNotCheckedT2(); } |
public boolean getHasT3() { return getHasCourseUnitsWithNoProgramT3() || getHasCourseUnitsWithProgramCheckedT3() || getHasCourseUnitsWithProgramNotCheckedT3(); } |
public boolean getHasT4() { return getHasCourseUnitsWithNoProgramT4() || getHasCourseUnitsWithProgramCheckedT4() || getHasCourseUnitsWithProgramNotCheckedT4(); } |
public boolean getHasCourseUnitsWithProgramCheckedA() { return courseUnitsWithProgramCheckedA!=null && courseUnitsWithProgramCheckedA.size() > 0; } |
public boolean getHasCourseUnitsWithProgramCheckedS1() { return courseUnitsWithProgramCheckedS1!=null && courseUnitsWithProgramCheckedS1.size() > 0; } |
public boolean getHasCourseUnitsWithProgramCheckedS2() { return courseUnitsWithProgramCheckedS2!=null && courseUnitsWithProgramCheckedS2.size() > 0; } |
public boolean getHasCourseUnitsWithProgramCheckedT1() { return courseUnitsWithProgramCheckedT1!=null && courseUnitsWithProgramCheckedT1.size() > 0; } |
public boolean getHasCourseUnitsWithProgramCheckedT2() { return courseUnitsWithProgramCheckedT2!=null && courseUnitsWithProgramCheckedT2.size() > 0; } |
public boolean getHasCourseUnitsWithProgramCheckedT3() { return courseUnitsWithProgramCheckedT3!=null && courseUnitsWithProgramCheckedT3.size() > 0; } |
public boolean getHasCourseUnitsWithProgramCheckedT4() { return courseUnitsWithProgramCheckedT4!=null && courseUnitsWithProgramCheckedT4.size() > 0; } |
public boolean getHasCourseUnitsWithProgramNotCheckedA() { return courseUnitsWithProgramNotCheckedA!=null && courseUnitsWithProgramNotCheckedA.size() > 0; } |
public boolean getHasCourseUnitsWithProgramNotCheckedS1() { return courseUnitsWithProgramNotCheckedS1!=null && courseUnitsWithProgramNotCheckedS1.size() > 0; } |
public boolean getHasCourseUnitsWithProgramNotCheckedS2() { return courseUnitsWithProgramNotCheckedS2!=null && courseUnitsWithProgramNotCheckedS2.size() > 0; } |
public boolean getHasCourseUnitsWithProgramNotCheckedT1() { return courseUnitsWithProgramNotCheckedT1!=null && courseUnitsWithProgramNotCheckedT1.size() > 0; } |
public boolean getHasCourseUnitsWithProgramNotCheckedT2() { return courseUnitsWithProgramNotCheckedT2!=null && courseUnitsWithProgramNotCheckedT2.size() > 0; } |
public boolean getHasCourseUnitsWithProgramNotCheckedT3() { return courseUnitsWithProgramNotCheckedT3!=null && courseUnitsWithProgramNotCheckedT3.size() > 0; } |
public boolean getHasCourseUnitsWithProgramNotCheckedT4() { return courseUnitsWithProgramNotCheckedT4!=null && courseUnitsWithProgramNotCheckedT4.size() > 0; } |
public boolean getHasCourseUnitsWithNoProgramA() { return courseUnitsWithNoProgramA!=null && courseUnitsWithNoProgramA.size() > 0; } |
public boolean getHasCourseUnitsWithNoProgramS1() { return courseUnitsWithNoProgramS1!=null && courseUnitsWithNoProgramS1.size() > 0; } |
public boolean getHasCourseUnitsWithNoProgramS2() { return courseUnitsWithNoProgramS2!=null && courseUnitsWithNoProgramS2.size() > 0; } |
public boolean getHasCourseUnitsWithNoProgramT1() { return courseUnitsWithNoProgramT1!=null && courseUnitsWithNoProgramT1.size() > 0; } |
public boolean getHasCourseUnitsWithNoProgramT2() { return courseUnitsWithNoProgramT2!=null && courseUnitsWithNoProgramT2.size() > 0; } |
public boolean getHasCourseUnitsWithNoProgramT3() { return courseUnitsWithNoProgramT3!=null && courseUnitsWithNoProgramT3.size() > 0; } |
public boolean getHasCourseUnitsWithNoProgramT4() { return courseUnitsWithNoProgramT4!=null && courseUnitsWithNoProgramT4.size() > 0; } |
public List<CourseUnitView> getCourseUnitsWithProgramCheckedA() |
{ |
if(courseUnitsWithProgramCheckedA==null) |
courseUnitsWithProgramCheckedA = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramCheckedA; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramCheckedS1() |
{ |
if(courseUnitsWithProgramCheckedS1==null) |
courseUnitsWithProgramCheckedS1 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramCheckedS1; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramCheckedS2() |
{ |
if(courseUnitsWithProgramCheckedS2==null) |
courseUnitsWithProgramCheckedS2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramCheckedS2; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramCheckedT1() |
{ |
if(courseUnitsWithProgramCheckedT1==null) |
courseUnitsWithProgramCheckedT1 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramCheckedT1; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramCheckedT2() |
{ |
if(courseUnitsWithProgramCheckedT2==null) |
courseUnitsWithProgramCheckedT2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramCheckedT2; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramCheckedT3() |
{ |
if(courseUnitsWithProgramCheckedT3==null) |
courseUnitsWithProgramCheckedT3 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramCheckedT3; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramCheckedT4() |
{ |
if(courseUnitsWithProgramCheckedT4==null) |
courseUnitsWithProgramCheckedT4 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramCheckedT4; |
} |
public void setCourseUnitsWithProgramCheckedS1(List<CourseUnitView> courseUnitsWithProgramCheckedS1) |
public void setCourseUnitsWithProgramCheckedA(List<CourseUnitView> courseUnitsWithProgramCheckedA) { this.courseUnitsWithProgramCheckedA = courseUnitsWithProgramCheckedA; } |
public void setCourseUnitsWithProgramCheckedS1(List<CourseUnitView> courseUnitsWithProgramCheckedS1) { this.courseUnitsWithProgramCheckedS1 = courseUnitsWithProgramCheckedS1; } |
public void setCourseUnitsWithProgramCheckedS2(List<CourseUnitView> courseUnitsWithProgramCheckedS2) |
{ |
this.courseUnitsWithProgramCheckedS1 = courseUnitsWithProgramCheckedS1; |
this.courseUnitsWithProgramCheckedS2 = courseUnitsWithProgramCheckedS2; |
} |
public void setCourseUnitsWithProgramCheckedT1(List<CourseUnitView> courseUnitsWithProgramCheckedT1) |
{ |
this.courseUnitsWithProgramCheckedT1 = courseUnitsWithProgramCheckedT1; |
} |
public void setCourseUnitsWithProgramCheckedT2(List<CourseUnitView> courseUnitsWithProgramCheckedT2) |
{ |
this.courseUnitsWithProgramCheckedT2 = courseUnitsWithProgramCheckedT2; |
} |
public void setCourseUnitsWithProgramCheckedT3(List<CourseUnitView> courseUnitsWithProgramCheckedT3) |
{ |
this.courseUnitsWithProgramCheckedT3 = courseUnitsWithProgramCheckedT3; |
} |
public void setCourseUnitsWithProgramCheckedT4(List<CourseUnitView> courseUnitsWithProgramCheckedT4) |
{ |
this.courseUnitsWithProgramCheckedT4 = courseUnitsWithProgramCheckedT4; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedA() |
{ |
if(courseUnitsWithProgramNotCheckedA==null) |
courseUnitsWithProgramNotCheckedA = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramNotCheckedA; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedS1() |
{ |
if(courseUnitsWithProgramNotCheckedS1==null) |
418,45 → 580,83 |
return courseUnitsWithProgramNotCheckedS1; |
} |
public void setCourseUnitsWithProgramNotCheckedS1(List<CourseUnitView> courseUnitsWithProgramNotCheckedS1) |
public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedS2() |
{ |
this.courseUnitsWithProgramNotCheckedS1 = courseUnitsWithProgramNotCheckedS1; |
if(courseUnitsWithProgramNotCheckedS2==null) |
courseUnitsWithProgramNotCheckedS2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramNotCheckedS2; |
} |
public List<CourseUnitView> getCourseUnitsWithNoProgramS2() |
public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedT1() |
{ |
return courseUnitsWithNoProgramS2; |
if(courseUnitsWithProgramNotCheckedT1==null) |
courseUnitsWithProgramNotCheckedT1 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramNotCheckedT1; |
} |
public void setCourseUnitsWithNoProgramS2(List<CourseUnitView> courseUnitsWithNoProgramS2) |
public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedT2() |
{ |
this.courseUnitsWithNoProgramS2 = courseUnitsWithNoProgramS2; |
if(courseUnitsWithProgramNotCheckedT2==null) |
courseUnitsWithProgramNotCheckedT2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramNotCheckedT2; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramCheckedS2() |
public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedT3() |
{ |
if(courseUnitsWithProgramCheckedS2==null) |
courseUnitsWithProgramCheckedS2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramCheckedS2; |
if(courseUnitsWithProgramNotCheckedT3==null) |
courseUnitsWithProgramNotCheckedT3 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramNotCheckedT3; |
} |
public void setCourseUnitsWithProgramCheckedS2(List<CourseUnitView> courseUnitsWithProgramCheckedS2) |
public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedT4() |
{ |
this.courseUnitsWithProgramCheckedS2 = courseUnitsWithProgramCheckedS2; |
if(courseUnitsWithProgramNotCheckedT4==null) |
courseUnitsWithProgramNotCheckedT4 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramNotCheckedT4; |
} |
public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedS2() |
public void setCourseUnitsWithProgramNotCheckedA(List<CourseUnitView> courseUnitsWithProgramNotCheckedA) |
{ |
if(courseUnitsWithProgramNotCheckedS2==null) |
courseUnitsWithProgramNotCheckedS2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class); |
return courseUnitsWithProgramNotCheckedS2; |
this.courseUnitsWithProgramNotCheckedA = courseUnitsWithProgramNotCheckedA; |
} |
public void setCourseUnitsWithProgramNotCheckedS1(List<CourseUnitView> courseUnitsWithProgramNotCheckedS1) |
{ |
this.courseUnitsWithProgramNotCheckedS1 = courseUnitsWithProgramNotCheckedS1; |
} |
public void setCourseUnitsWithProgramNotCheckedS2(List<CourseUnitView> courseUnitsWithProgramNotCheckedS2) |
{ |
this.courseUnitsWithProgramNotCheckedS2 = courseUnitsWithProgramNotCheckedS2; |
} |
public void setCourseUnitsWithProgramNotCheckedT1(List<CourseUnitView> courseUnitsWithProgramNotCheckedT1) |
{ |
this.courseUnitsWithProgramNotCheckedT1 = courseUnitsWithProgramNotCheckedT1; |
} |
public void setCourseUnitsWithProgramNotCheckedT2(List<CourseUnitView> courseUnitsWithProgramNotCheckedT2) |
{ |
this.courseUnitsWithProgramNotCheckedT2 = courseUnitsWithProgramNotCheckedT2; |
} |
public void setCourseUnitsWithProgramNotCheckedT3(List<CourseUnitView> courseUnitsWithProgramNotCheckedT3) |
{ |
this.courseUnitsWithProgramNotCheckedT3 = courseUnitsWithProgramNotCheckedT3; |
} |
public void setCourseUnitsWithProgramNotCheckedT4(List<CourseUnitView> courseUnitsWithProgramNotCheckedT4) |
{ |
this.courseUnitsWithProgramNotCheckedT4 = courseUnitsWithProgramNotCheckedT4; |
} |
public String getUserGroupStudents() { |
return userGroupStudents; |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitGradeView.java |
---|
1,15 → 1,12 |
package pt.estgp.estgweb.domain.views; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.CourseUnitGrade; |
import pt.estgp.estgweb.domain.CourseUnitGradeImpl; |
import pt.estgp.estgweb.services.courseunits.LoadCourseUnitAnnouncements; |
import org.apache.log4j.Logger; |
import java.util.List; |
import java.util.Set; |
import java.util.HashSet; |
import java.io.Serializable; |
import java.util.Date; |
import java.io.Serializable; |
/** |
* @author Jorge Machado |
31,6 → 28,8 |
private int statusEpoca; |
private UserView student; |
private Date publishDate; |
private String descEpoca; |
private String descStatusEpoca; |
private CourseUnitGrade courseUnitGrade; |
57,6 → 56,8 |
grade = courseUnitGrade.getGrade(); |
statusEpoca = courseUnitGrade.getStatusEpoca(); |
publishDate = courseUnitGrade.getPublishDate(); |
descEpoca = courseUnitGrade.getDescEpoca(); |
descStatusEpoca = courseUnitGrade.getDescStatusEpoca(); |
} |
126,4 → 127,20 |
return df.format(publishDate); |
return ""; |
} |
public String getDescEpoca() { |
return descEpoca; |
} |
public void setDescEpoca(String descEpoca) { |
this.descEpoca = descEpoca; |
} |
public String getDescStatusEpoca() { |
return descStatusEpoca; |
} |
public void setDescStatusEpoca(String descStatusEpoca) { |
this.descStatusEpoca = descStatusEpoca; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/UserView.java |
---|
1,18 → 1,17 |
package pt.estgp.estgweb.domain.views; |
import jomm.utils.BytesUtils; |
import jomm.utils.DesUtils; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.enums.RecordEnum; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.utils.RoleManager; |
import pt.estgp.estgweb.Globals; |
import java.io.Serializable; |
import java.util.*; |
import jomm.utils.DesUtils; |
import jomm.utils.BytesUtils; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
73,6 → 72,8 |
private List<CourseUnitView> responsableCourseUnits; |
private boolean propinasEmDia = false; |
public UserView() |
{} |
122,6 → 123,7 |
{ |
mainArea = ((Student)user).getMainArea(); |
code = ((Student)user).getSigesCode(); |
propinasEmDia = ((Student)user).isPropinasEmDia(); |
} |
} |
718,7 → 720,15 |
this.deleted = deleted; |
} |
// public List<Course> getCourses() |
public boolean isPropinasEmDia() { |
return propinasEmDia; |
} |
public void setPropinasEmDia(boolean propinasEmDia) { |
this.propinasEmDia = propinasEmDia; |
} |
// public List<Course> getCourses() |
// { |
// if(courses == null) |
// { |
/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitView.java |
---|
25,6 → 25,7 |
LoadCourseUnitAnnouncements loadCourseUnitAnnouncements = new LoadCourseUnitAnnouncements(); |
private long id; |
private String name; |
private String code; |
55,6 → 56,7 |
private String evaluationStreamId; |
private boolean validProgram; |
private UserView validatorUser; |
private boolean teacherCompleteEvaluation = false; |
private boolean validEvaluation = false; |
private int programSize; |
private String extension; |
65,6 → 67,10 |
private CourseView courseView; |
private String interfaceImportYear = null; |
private boolean evaluationOpenByAdmin = false; |
public Class getReferenceClass() |
{ |
return CourseUnitImpl.class; |
115,6 → 121,9 |
private void init(CourseUnit courseUnit, boolean initTeachers, boolean initStudents, boolean initBlog, boolean validatorUser) |
{ |
this.interfaceImportYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear(); |
this.pathIntranet = courseUnit.getPathIntranet(); |
this.normalizedName = courseUnit.getNormalizedName(); |
this.courseUnit = courseUnit; |
126,6 → 135,7 |
this.courseCode = courseUnit.getCourseCode(); |
this.summariesJson = courseUnit.getSummariesJson(); |
this.sumariosPathFileIntranet = ((CourseUnitImpl)courseUnit).getSummariosPathFileIntranet(); |
this.evaluationOpenByAdmin = courseUnit.isEvaluationOpenByAdmin(); //nao tem persistencia propria tem de ser feito num serviço |
// this.objectives = courseUnit.getObjectives(); DEPRECATED |
if(courseUnit.getCourseUnitProgram() !=null && courseUnit.getCourseUnitProgram().getCourseUnitProgramPart2() != null) |
148,6 → 158,7 |
{ |
evaluationStreamId = courseUnit.getEvaluationStreamId(); |
validEvaluation = courseUnit.getCourseUnitEvaluation().isClosed(); |
teacherCompleteEvaluation = courseUnit.getCourseUnitEvaluation().isTeacherComplete(); |
} |
// if(courseUnit.getBlog() != null) |
193,6 → 204,9 |
return evaluationStreamId; |
} |
public boolean isTeacherCompleteEvaluation() { |
return teacherCompleteEvaluation; |
} |
public String getSumariosPathFileIntranet() { |
return sumariosPathFileIntranet; |
482,10 → 496,13 |
* @return sumaries or null if there are no summaries in Json |
*/ |
int lateSummaries = 0; |
List<String> lateSummariesDates = new ArrayList<String>(); |
public List<CourseUnitSummaryView> getSummariesFromJson() { |
public synchronized List<CourseUnitSummaryView> getSummariesFromJson() { |
if(summariesFromJson != null) |
return summariesFromJson; |
lateSummaries = 0; |
summariesFromJson = new ArrayList<CourseUnitSummaryView>(); |
if(summariesJson != null && summariesJson.length() > 0) |
{ |
496,10 → 513,23 |
{ |
JSONObject summary = summaries.getJSONObject(i); |
CourseUnitSummaryImpl sum = DomainObjectFactory.createCourseUnitSummaryImpl(); |
if(sum.updateWithJson(summary)){ |
CourseUnitSummaryView view = new CourseUnitSummaryView(sum); |
summariesFromJson.add(view); |
} |
else if(importYear.equals(interfaceImportYear)) |
//so verifica atrasados para unidades do ano corrente a titulo informativo |
{ |
CourseUnitSummaryView view = new CourseUnitSummaryView(sum); |
if(view.getNumber() < 0 && view.getOriginalDate().getTime() + 48*60*60*1000 < System.currentTimeMillis()) |
{ |
//System.out.println(view.getNumber() + " " + view.getDate() + " " + view.getOriginalDate()); |
lateSummaries++; |
lateSummariesDates.add(view.getDate()); |
} |
} |
} |
} catch (JSONException e) { |
logger.error(e,e); |
520,21 → 550,14 |
return null; |
} |
public List<String> getLateSummariesDates() { |
return lateSummariesDates; |
} |
public int getLateSummaries() |
{ |
getSummariesFromJson(); |
int contSummariesLate = 0; |
if(summariesFromJson.size() > 0) |
{ |
for(CourseUnitSummaryView courseUnitSummaryView: summariesFromJson ) |
{ |
if(courseUnitSummaryView.getNumber() < 0 && courseUnitSummaryView.getOriginalDate().getTime() < System.currentTimeMillis()) |
{ |
contSummariesLate++; |
} |
} |
} |
return contSummariesLate; |
return lateSummaries; |
} |
635,6 → 658,15 |
return summaries; |
} |
public boolean isEvaluationOpenByAdmin() { |
return evaluationOpenByAdmin; |
} |
public void setEvaluationOpenByAdmin(boolean evaluationOpenByAdmin) { |
this.evaluationOpenByAdmin = evaluationOpenByAdmin; |
} |
public String getTeachersSnipet() |
{ |
String sep = ""; |
/impl/src/java/pt/estgp/estgweb/domain/DomainObjectFactory.java |
---|
337,4 → 337,24 |
{ |
return new JobServiceTaskSchedulerParameterImpl(); |
} |
public static ConfigurationGradesImpl createConfigurationGradesImpl() |
{ |
return new ConfigurationGradesImpl(); |
} |
public static ConfigurationGradesStatusEpocaImpl createConfigurationGradesStatusEpocaImpl() |
{ |
return new ConfigurationGradesStatusEpocaImpl(); |
} |
public static ConfigurationGradesEpocaAvaliacaoImpl createConfigurationGradesEpocaAvaliacaoImpl() |
{ |
return new ConfigurationGradesEpocaAvaliacaoImpl(); |
} |
public static ConfigurationDirectoryImpl createConfigurationDirectoryImpl() |
{ |
return new ConfigurationDirectoryImpl(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/UserImpl.java |
---|
15,6 → 15,8 |
} |
public boolean isNewUser() |
{ |
return newUser; |
/impl/src/java/pt/estgp/estgweb/domain/JobServiceTaskImpl.java |
---|
43,6 → 43,8 |
PENDING, |
STARTED, |
FINISHED, |
FINISHED_ERRORS, |
FINISHED_WARNINGS, |
FAILED, |
UNKNOWN_ERROR; |
56,6 → 58,10 |
return STARTED; |
if(status.equals(FINISHED.name())) |
return FINISHED; |
if(status.equals(FINISHED_ERRORS.name())) |
return FINISHED_ERRORS; |
if(status.equals(FINISHED_WARNINGS.name())) |
return FINISHED_WARNINGS; |
if(status.equals(FAILED.name())) |
return FAILED; |
return UNKNOWN_ERROR; |
74,4 → 80,21 |
setStatus(statusEnum.name()); |
} |
public String getServiceLastUpdateDateFormated() { |
if(getServiceLastUpdateDate() == null) |
return ""; |
return pt.estgp.estgweb.web.utils.DatesUtils.getStringFromDateWithMinutesAndSeconds(getServiceLastUpdateDate()); |
} |
public String getServiceFinishDateFormated() { |
if(getServiceFinishDate() == null) |
return ""; |
return pt.estgp.estgweb.web.utils.DatesUtils.getStringFromDateWithMinutesAndSeconds(getServiceFinishDate()); |
} |
public String getServiceStartDateFormated() { |
if(getServiceStartDate() == null) |
return ""; |
return pt.estgp.estgweb.web.utils.DatesUtils.getStringFromDateWithMinutesAndSeconds(getServiceStartDate()); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/ConfigurationDirectoryImpl.java |
---|
New file |
0,0 → 1,26 |
package pt.estgp.estgweb.domain; |
import org.apache.log4j.Logger; |
import java.io.Serializable; |
/** |
* Created by IntelliJ IDEA. |
* User: Filipe Matos |
* Date: 4/Abr/2013 |
* Time: 17:02:06 |
* To change this template use File | Settings | File Templates. |
*/ |
public class ConfigurationDirectoryImpl extends ConfigurationDirectory |
{ |
private static final Logger logger = Logger.getLogger(ConfigurationDirectoryImpl.class); |
@Override |
public Serializable getSerializable() { |
return getId(); |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ConfigurationGradesStatusEpocaDaoImpl.java |
---|
New file |
0,0 → 1,21 |
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 ConfigurationGradesStatusEpocaDaoImpl extends ConfigurationGradesStatusEpocaDao |
{ |
public static ConfigurationGradesStatusEpocaDaoImpl getInstance() |
{ |
if (myInstance == null) |
myInstance = new ConfigurationGradesStatusEpocaDaoImpl(); |
return (ConfigurationGradesStatusEpocaDaoImpl) myInstance; |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/JobServiceTaskDaoImpl.java |
---|
1,5 → 1,9 |
package pt.estgp.estgweb.domain.dao.impl; |
import org.hibernate.criterion.Order; |
import java.util.List; |
/** |
* @author Jorge Machado |
* @date 28/Fev/2008 |
15,7 → 19,12 |
return (JobServiceTaskDaoImpl) myInstance; |
} |
public List<JobServiceTaskDaoImpl> findLastNJobTasks(int max) |
{ |
return createCriteria().addOrder(Order.desc("serviceStartDate")).setMaxResults(max).list(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/BlogPostDaoImpl.java |
---|
1,23 → 1,20 |
package pt.estgp.estgweb.domain.dao.impl; |
import pt.estgp.estgweb.domain.BlogImpl; |
import jomm.utils.MyCalendar; |
import org.hibernate.Criteria; |
import org.hibernate.Query; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.criterion.Order; |
import pt.estgp.estgweb.domain.BlogPost; |
import pt.estgp.estgweb.domain.BlogPostImpl; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.BlogPost; |
import pt.estgp.estgweb.domain.dao.DaoUtils; |
import pt.estgp.estgweb.services.common.SearchTypeEnum; |
import java.util.ArrayList; |
import java.util.Calendar; |
import java.util.List; |
import java.util.Calendar; |
import java.util.Iterator; |
import java.util.ArrayList; |
import static org.hibernate.criterion.Restrictions.*; |
import org.hibernate.criterion.Order; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.Query; |
import org.hibernate.Criteria; |
import jomm.utils.MyCalendar; |
/** |
* @author Jorge Machado |
39,12 → 36,18 |
{ |
return createCriteria().add(eq("owner.id", ownerId)).list(); |
} |
public List<BlogPostImpl> loadOwnedBlogPostsMax(long ownerId,int max) |
{ |
return createCriteria().add(eq("owner.id", ownerId)).addOrder(Order.desc("updateDate")).setMaxResults(max).list(); |
} |
public List<BlogPostImpl> loadOwnedBlogPosts(long ownerId, long blogId) |
{ |
return createCriteria().add(eq("owner.id", ownerId)).add(eq("blog.id",blogId)).list(); |
} |
public List<BlogPostImpl> loadBlogPosts(long blogId, int month, int year) |
{ |
Calendar bottom = new MyCalendar(year,month,1); |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ConfigurationGradesEpocaAvaliacaoDaoImpl.java |
---|
New file |
0,0 → 1,23 |
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 ConfigurationGradesEpocaAvaliacaoDaoImpl extends ConfigurationGradesEpocaAvaliacaoDao |
{ |
public static ConfigurationGradesEpocaAvaliacaoDaoImpl getInstance() |
{ |
if (myInstance == null) |
myInstance = new ConfigurationGradesEpocaAvaliacaoDaoImpl(); |
return (ConfigurationGradesEpocaAvaliacaoDaoImpl) myInstance; |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ConfigurationDaoImpl.java |
---|
1,11 → 1,15 |
package pt.estgp.estgweb.domain.dao.impl; |
import pt.estgp.estgweb.domain.Configuration; |
import pt.estgp.estgweb.domain.ConfigurationImpl; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.utils.StringsUtils; |
import java.util.Date; |
import java.util.List; |
//TODO PRECISA DE CHAMAR UM SERVICO EM VEZ DE SER ASSIM porque esta a abrir transacoes por todo lado |
//PRECISA DE SE FAZER UM CHECK A TODO O CODIGO QUE ABRE TRANSACOES FORA DOS SERVICOS |
/** |
* @author Jorge Machado |
* @date 28/Fev/2008 |
24,16 → 28,35 |
public Configuration load() |
{ |
List<Configuration> configs = createCriteria().list(); |
Configuration config = null; |
if(configs.size() == 0) |
{ |
Configuration configuration = new ConfigurationImpl(); |
configuration.setInterfaceImportYear("201516"); |
configuration.setImportsDefaultImportYear("201516"); |
configuration.setImportsDefaultImportYear("http://172.20.100.5:8080/SigesWeb/SiGesWEB.asmx?wsdl"); |
configuration.setCourseUnitEvaluationActiveYear("201415"); |
configuration.setSaveDate(new Date()); |
configuration.setSigesInstitutionCode(1); |
save(configuration); |
return configuration; |
config = configuration; |
} |
return configs.get(0); |
else |
config = configs.get(0); |
if(config.getConfigurationGrades() == null) |
{ |
//init by default with ESTG values |
ConfigurationGradesImpl grades = DomainObjectFactory.createConfigurationGradesImpl(); |
grades.create(); |
for(ConfigurationGradesEpocaAvaliacao epoca: grades.getEpocasAvaliacao()) |
DaoFactory.getConfigurationGradesEpocaAvaliacaoDaoImpl().save(epoca); |
for(ConfigurationGradesStatusEpoca status: grades.getStatusEpoca()) |
DaoFactory.getConfigurationGradesStatusEpocaDaoImpl().save(status); |
DaoFactory.getConfigurationGradesDaoImpl().save(grades); |
config.setConfigurationGrades(grades); |
} |
return config; |
} |
public void updateInterfaceImportYearCreateTransaction(String importYear) |
94,5 → 117,245 |
return importYear; |
} |
public String getCourseUnitEvaluationActiveYear() |
{ |
return load().getCourseUnitEvaluationActiveYear(); |
} |
public List<String> getCourseUnitEvaluationActiveDegrees() |
{ |
String degrees = load().getCourseUnitEvaluationActiveDegrees(); |
if(degrees == null || degrees.trim().length() == 0) |
return null; |
List<String> degreesList = StringsUtils.getStringsFromSerial(degrees,";"); |
return degreesList; |
} |
public List<Long> getCourseUnitEvaluationActiveCourseIds() |
{ |
String courseIds = load().getCourseUnitEvaluationActiveCourseIds(); |
if(courseIds == null || courseIds.trim().length() == 0) |
return null; |
List<Long> courseIdsListLongs = StringsUtils.getLongsFromSerial(courseIds,";"); |
return courseIdsListLongs; |
} |
public String getCourseUnitEvaluationActiveYearCreateTransaction() |
{ |
getCurrentSession().beginTransaction(); |
String activeYear = getCourseUnitEvaluationActiveYear(); |
getCurrentSession().getTransaction().commit(); |
return activeYear; |
} |
public List<String> getCourseUnitEvaluationActiveDegreesCreateTransaction() |
{ |
getCurrentSession().beginTransaction(); |
List<String> activeDegrees = getCourseUnitEvaluationActiveDegrees(); |
getCurrentSession().getTransaction().commit(); |
return activeDegrees; |
} |
public List<Long> getCourseUnitEvaluationActiveCourseIdsCreateTransaction() |
{ |
getCurrentSession().beginTransaction(); |
List<Long> activeCourseIds = getCourseUnitEvaluationActiveCourseIds(); |
getCurrentSession().getTransaction().commit(); |
return activeCourseIds; |
} |
public void updateCourseUnitEvaluationActiveYear(String activeYear) |
{ |
Configuration config = load(); |
config.setCourseUnitEvaluationActiveYear(activeYear); |
} |
public void updateCourseUnitEvaluationActiveDegrees(List<String> activeDegrees) |
{ |
Configuration config = load(); |
config.setCourseUnitEvaluationActiveDegrees(StringsUtils.getSerialStrings(activeDegrees,";")); |
} |
public void updateCourseUnitEvaluationActiveCourseIds(List<Long> activeCourseIds) |
{ |
Configuration config = load(); |
config.setCourseUnitEvaluationActiveCourseIds(StringsUtils.getSerialLongs(activeCourseIds,";")); |
} |
public void updateCourseUnitEvaluationActiveYearCreateTransaction(String activeYear) |
{ |
getCurrentSession().beginTransaction(); |
updateCourseUnitEvaluationActiveYear(activeYear); |
getCurrentSession().getTransaction().commit(); |
} |
public void updateCourseUnitEvaluationActiveDegreesCreateTransaction(List<String> activeDegrees) |
{ |
getCurrentSession().beginTransaction(); |
updateCourseUnitEvaluationActiveDegrees(activeDegrees); |
getCurrentSession().getTransaction().commit(); |
} |
public void updateCourseUnitEvaluationActiveCourseIdsCreateTransaction(List<Long> activeCourseIds) |
{ |
getCurrentSession().beginTransaction(); |
updateCourseUnitEvaluationActiveCourseIds(activeCourseIds); |
getCurrentSession().getTransaction().commit(); |
} |
/** |
* Return if the course id or the degree together with import year is active |
* or if the unit is specially opened for edition |
* @param courseUnitId |
* @return |
*/ |
public boolean isCourseUniEvaluationActivePeriodInTransaction(long courseUnitId) |
{ |
getCurrentSession().beginTransaction(); |
String activeYear = getCourseUnitEvaluationActiveYear(); |
List<String> activeDegrees = getCourseUnitEvaluationActiveDegrees(); |
List<Long> activeCourseIds = getCourseUnitEvaluationActiveCourseIds(); |
CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().get(courseUnitId); |
boolean isActiveYear = activeYear != null && cu.getImportYear().equals(activeYear); |
boolean isActiveDegree = activeDegrees!=null && activeDegrees.contains(cu.getCourse().getDegree()); |
boolean isActiveCourseId = activeCourseIds!=null && activeCourseIds.contains(cu.getCourse().getId()); |
boolean activePeriod = |
cu.isEvaluationOpenByAdmin() || |
(isActiveYear && (isActiveCourseId || isActiveDegree)); |
getCurrentSession().getTransaction().commit(); |
return activePeriod; |
} |
/** |
* Return if the course or the degree ant import year is active |
* @param courseUnitId |
* @return |
*/ |
public boolean isCourseUniEvaluationRegularActivePeriodInTransaction(long courseUnitId) |
{ |
getCurrentSession().beginTransaction(); |
String activeYear = getCourseUnitEvaluationActiveYear(); |
List<String> activeDegrees = getCourseUnitEvaluationActiveDegrees(); |
List<Long> activeCourseIds = getCourseUnitEvaluationActiveCourseIds(); |
CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().get(courseUnitId); |
boolean isActiveYear = activeYear != null && cu.getImportYear().equals(activeYear); |
boolean isActiveDegree = activeDegrees!=null && activeDegrees.contains(cu.getCourse().getDegree()); |
boolean isActiveCourseId = activeCourseIds!=null && activeCourseIds.contains(cu.getCourse().getId()); |
boolean activePeriod = (isActiveYear && (isActiveCourseId || isActiveDegree)); |
getCurrentSession().getTransaction().commit(); |
return activePeriod; |
} |
public String getSigesWebServicesWsdl() |
{ |
return load().getSigesWebServicesWsdl(); |
} |
public String getSigesWebServicesWsdlCreateTransaction() |
{ |
getCurrentSession().beginTransaction(); |
String wsdl = getSigesWebServicesWsdl(); |
getCurrentSession().getTransaction().commit(); |
return wsdl; |
} |
public void updateSigesWebServicesWsdl(String wsdl) |
{ |
Configuration config = load(); |
config.setSigesWebServicesWsdl(wsdl); |
} |
public void updateSigesWebServicesWsdlCreateTransaction(String wsdl) |
{ |
getCurrentSession().beginTransaction(); |
updateSigesWebServicesWsdl(wsdl); |
getCurrentSession().getTransaction().commit(); |
} |
public int getSigesInstitutionCode() |
{ |
return load().getSigesInstitutionCode(); |
} |
public int getInstitutionCodeCreateTransaction() |
{ |
getCurrentSession().beginTransaction(); |
int code = getSigesInstitutionCode(); |
getCurrentSession().getTransaction().commit(); |
return code; |
} |
public void updateSigesInstitutionCode(int instCode) |
{ |
Configuration config = load(); |
config.setSigesInstitutionCode(instCode); |
} |
public void updateSigesInstitutionCodeCreateTransaction(int instCode) |
{ |
getCurrentSession().beginTransaction(); |
updateSigesInstitutionCode(instCode); |
getCurrentSession().getTransaction().commit(); |
} |
public int getNationalInstitutionCode() |
{ |
return load().getNationalInstitutionCode(); |
} |
/** |
* This method only creates transaction if not already active |
* @return |
*/ |
public int getNationalInstitutionCodeCreateTransaction() |
{ |
//boolean alreadyActive = getCurrentSession().getTransaction().isActive(); |
//if(!alreadyActive) |
getCurrentSession().beginTransaction(); |
int code = getNationalInstitutionCode(); |
//if(!alreadyActive) |
getCurrentSession().getTransaction().commit(); |
return code; |
} |
/** |
* Not problematic update only for interfaces |
* Will not work only in MultiWebServer environment |
* in that case needs a restart |
* @param instCode |
*/ |
public void updateNationalInstitutionCode(int instCode) |
{ |
Configuration config = load(); |
config.setNationalInstitutionCode(instCode); |
//Globals.NATIONAL_INSTITUTION_CODE = new BigDecimal(instCode); |
} |
/** |
* Not problematic update only for interfaces |
* Will not work only in MultiWebServer environment |
* in that case needs a restart |
* @param instCode |
*/ |
public void updateNationalInstitutionCodeCreateTransaction(int instCode) |
{ |
getCurrentSession().beginTransaction(); |
updateNationalInstitutionCode(instCode); |
//Globals.NATIONAL_INSTITUTION_CODE = new BigDecimal(instCode); |
getCurrentSession().getTransaction().commit(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseDaoImpl.java |
---|
133,18 → 133,44 |
{ |
Criteria c = createCriteria(); |
/* c.setProjection(Projections.projectionList() |
.add(Projections.distinct(Projections.id())));*/ |
c.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); |
c.createAlias("courseUnits","cu"); |
if (importYear != null && importYear.length() > 0) |
c.add(eq("cu.importYear", importYear)); |
String query = "select distinct c from c in class Course join c.courseUnits cu where "; |
String logic = " "; |
if (importYear != null && importYear.length() > 0) |
{ |
query += logic + "cu.importYear = :importYear "; |
logic = " and "; |
} |
if (area != null && area.length() > 0) |
c.add(eq("area", area)); |
{ |
query += logic + "c.area = :area "; |
logic = " and "; |
} |
if (type != null && type.length() > 0) |
c.add(eq("degree", type)); |
return c.addOrder(Order.asc("name")) |
.list(); |
{ |
query += logic + "c.degree = :degree "; |
logic = " and "; |
} |
query += " order by c.name asc"; |
Query q = getCurrentSession().createQuery(query); |
if (importYear != null && importYear.length() > 0) |
{ |
q.setString("importYear",importYear); |
} |
if (area != null && area.length() > 0) |
{ |
q.setString("area",area); |
} |
if (type != null && type.length() > 0) |
{ |
q.setString("degree",type); |
} |
/* c.setProjection(Projections.projectionList() |
.add(Projections.distinct(Projections.id())));*/ |
return q.list(); |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/BlogDaoImpl.java |
---|
1,23 → 1,17 |
package pt.estgp.estgweb.domain.dao.impl; |
import pt.estgp.estgweb.domain.User; |
import org.hibernate.Criteria; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.criterion.Order; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.Announcement; |
import pt.estgp.estgweb.domain.dao.DaoUtils; |
import pt.estgp.estgweb.services.common.SearchTypeEnum; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.Date; |
import java.util.ArrayList; |
import java.io.Serializable; |
import org.hibernate.HibernateException; |
import org.hibernate.Criteria; |
import static org.hibernate.criterion.Restrictions.*; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.criterion.Order; |
import jomm.dao.DaoException; |
/** |
* @author Jorge Machado |
43,12 → 37,27 |
return createCriteria().add(eq("owner.id", ownerId)).list(); |
} |
public List<BlogImpl> loadOwnedBlogs(long ownerId, int max) |
{ |
return createCriteria().add(eq("owner.id", ownerId)).addOrder(Order.desc("updateDate")).setMaxResults(max).list(); |
} |
public List<BlogImpl> findBlogs(List<String> roles, boolean internal) |
{ |
return findBlogs(roles,internal,null); |
} |
public List<BlogImpl> findBlogs(List<String> roles, boolean internal, int max) |
{ |
return findBlogs(roles,internal,null,max); |
} |
public List<BlogImpl> findBlogs(List<String> roles, boolean internal, String type) |
{ |
return findBlogs(roles,internal,type,-1); |
} |
public List<BlogImpl> findBlogs(List<String> roles, boolean internal, String type, int max) |
{ |
if (roles == null) |
{ |
roles = new ArrayList<String>(); |
69,11 → 78,13 |
if (co != null) |
criteria.add(co); |
criteria.add(eq("status", true)) |
.addOrder(Order.desc("title")); |
.addOrder(Order.desc("updateDate")); |
if(type != null) |
criteria.add(eq("type",type)); |
else |
criteria.add(isNull("type")); |
if(max > 0) |
criteria.setMaxResults(max); |
return criteria.list(); |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/AnnouncementDaoImpl.java |
---|
372,8 → 372,13 |
return createCriteria().add(eq("owner.id", ownerId)).addOrder(Order.desc("updateDate")).list(); |
} |
public List<AnnouncementImpl> loadOwnedAnnouncements(long ownerId, int size) |
{ |
return createCriteria().add(eq("owner.id", ownerId)).setMaxResults(size).addOrder(Order.desc("updateDate")).list(); |
} |
public List<Announcement> loadInvalidAnnouncements() |
{ |
Criteria c = createCriteria() |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ConfigurationDirectoryDaoImpl.java |
---|
New file |
0,0 → 1,46 |
package pt.estgp.estgweb.domain.dao.impl; |
import jomm.dao.impl.AbstractDao; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.ConfigurationDirectoryImpl; |
import java.util.List; |
import static org.hibernate.criterion.Restrictions.eq; |
/** |
* Created by IntelliJ IDEA. |
* User: Filipe Matos |
* Date: 18/Jul/2013 |
* Time: 19:37:29 |
* To change this template use File | Settings | File Templates. |
*/ |
public class ConfigurationDirectoryDaoImpl extends AbstractDao<ConfigurationDirectoryImpl>{ |
private static final Logger logger = Logger.getLogger(ConfigurationDirectoryDaoImpl.class); |
protected static ConfigurationDirectoryDaoImpl myInstance = null; |
public static ConfigurationDirectoryDaoImpl getInstance() { |
if (myInstance == null || !(myInstance instanceof ConfigurationDirectoryDaoImpl)) |
myInstance = new ConfigurationDirectoryDaoImpl(); |
return (ConfigurationDirectoryDaoImpl) myInstance; |
} |
@Override |
protected Class getReferenceClass() { |
return ConfigurationDirectoryImpl.class; |
} |
public ConfigurationDirectoryImpl loadDirectory(String identifier) |
{ |
List<ConfigurationDirectoryImpl> dirs = createCriteria().add(eq("idDir", identifier)).list(); |
if(dirs != null && dirs.size() > 0) |
{ |
return dirs.get(0); |
} |
else |
{ |
return null; |
} |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ConfigurationGradesDaoImpl.java |
---|
New file |
0,0 → 1,21 |
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 ConfigurationGradesDaoImpl extends ConfigurationGradesDao |
{ |
public static ConfigurationGradesDaoImpl getInstance() |
{ |
if (myInstance == null) |
myInstance = new ConfigurationGradesDaoImpl(); |
return (ConfigurationGradesDaoImpl) myInstance; |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseUnitDaoImpl.java |
---|
80,16 → 80,19 |
public List<CourseUnit> loadSubscribedImportYearUnits(long studentId, String importYear) |
{ |
return createCriteria().add(eq("importYear", importYear)) |
return createCriteria() |
.createAlias("students", "st") |
.add(eq("st.id", studentId)).addOrder(Order.asc("name")).list(); |
.add(eq("st.id", studentId)) |
.add(eq("importYear", importYear)) |
.addOrder(Order.asc("name")) |
.list(); |
} |
public List<CourseUnit> loadSubscribedImportYearSemestreUnits(long studentId, String importYear, String semestre) |
{ |
Criteria c =createCriteria() |
.add(eq("importYear", importYear)) |
.createAlias("students", "st") |
.add(eq("st.id", studentId)); |
.createAlias("students", "st") |
.add(eq("st.id", studentId)) |
.add(eq("importYear", importYear)); |
if(semestre != null) |
c.add(eq("semestre", semestre)); |
return c.addOrder(Order.asc("name")).list(); |
265,6 → 268,61 |
.list(); |
} |
/** |
* Metodo usado para carregar unidades de anos anteriores que possam estar em edição |
* para mostrar na página da unidade |
* |
* Este metodo nao serve para mais nada, nao é usado nas Tarefas da Home |
* @param sigesCode |
* @param courseCode |
* @return |
*/ |
public CourseUnit loadUnitInEvaluationBySigesCodes(String sigesCode, String courseCode) |
{ |
String activeImportYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
Criterion crtDegrees = getCourseUnitActiveDegreeCourseIdsCriterion(activeImportYear); |
if(crtDegrees == null) |
{ |
//Nao ha graus nem cursos portanto o ano não interessa |
//o ano deve ser usado para abrir graus ou cursos senao nao |
//abre nada |
crtDegrees = eq("evaluationOpenByAdmin",true); |
} |
else |
{ |
crtDegrees = and(eq("importYear", activeImportYear),crtDegrees); |
crtDegrees = or(eq("evaluationOpenByAdmin",true),crtDegrees); |
} |
List<CourseUnit> cus = (List<CourseUnit>) createCriteria() |
.createAlias("course","c") |
.createAlias("courseUnitEvaluation","ce") |
.add(eq("code", sigesCode)) |
.add(eq("courseCode", courseCode)) |
.add(crtDegrees) |
.add(eq("ce.closed",false)) |
.list(); |
List<CourseUnit> cusNull = (List<CourseUnit>) createCriteria() |
.createAlias("course","c") |
.add(eq("code", sigesCode)) |
.add(eq("courseCode", courseCode)) |
.add(crtDegrees) |
.add(isNull("courseUnitEvaluation")) |
.list(); |
cus.addAll(cusNull); |
if(cus != null && cus.size() > 1) |
{ |
logger.warn("Mais do que uma unidade do mesmo codigo em avaliacao curricular, e suposto haver apenas uma, verificar logica aplicacional"); |
} |
else if(cus != null && cus.size() > 0) |
{ |
return cus.get(0); |
} |
return null; |
} |
public List<CourseUnit> loadCourseUnits(long courseId, String semestre, String year, boolean withTeacher, boolean withNoTeacher) |
{ |
Criteria c = createCriteria(); |
463,6 → 521,26 |
} |
return result; |
} |
public List<CourseMissingValidationProgram> loadMissingPrograms(UserSession userSession) |
{ |
List<CourseMissingValidationProgram> result = new ArrayList<CourseMissingValidationProgram>(); |
List<Course> courses = DaoFactory.getCourseDaoImpl().findAll(DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()); |
for(Course course: courses) |
{ |
if(userSession.getUser().hasRole(course.getValidationRole())) |
{ |
List<CourseUnit> courseUnits = loadMissingProgramGivenCourse(course.getId()); |
if(courseUnits != null && courseUnits.size() > 0) |
{ |
CourseMissingValidationProgram c = new CourseMissingValidationProgram(); |
c.course = course; |
c.courseUnits = courseUnits; |
result.add(c); |
} |
} |
} |
return result; |
} |
public static class CourseMissingValidationEvaluation |
{ |
public Course course; |
495,16 → 573,103 |
public List<CourseUnit> loadMissingEvaluationValidateGivenCourse(long courseId) |
{ |
String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
Criterion degreesCrit = getCourseUnitActiveDegreeCourseIdsCriterion(activeYear); |
if(degreesCrit == null) |
return new ArrayList<CourseUnit>(); |
return createCriteria() |
.createAlias("course", "c") |
.createAlias("courseUnitEvaluation", "ce") |
.add(eq("c.id", courseId)) |
.add(not(eq("importYear", DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()))) |
.add(ge("importYear", "201415")) |
.add(eq("importYear", activeYear)) |
.add(degreesCrit) |
.add((eq("ce.closed", false))) |
.add((eq("ce.teacherComplete", true))) |
.list(); |
} |
/** |
* Devolve um criteio OR para todos os cursos de grau pertencente à lista de graus |
* ou pertencete à lista de cursoIds |
* @return |
*/ |
private Criterion getCourseUnitActiveDegreeCourseIdsCriterion(String activeYear) |
{ |
List<String> activeDegrees = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveDegrees(); |
List<Long> activeCourseIds = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveCourseIds(); |
boolean activeDegreesOff = activeDegrees == null || activeDegrees.size() == 0; |
boolean activeCourseIdsOff = activeCourseIds == null || activeCourseIds.size() == 0; |
if(activeYear == null || (activeDegreesOff && activeCourseIdsOff)) |
return null; |
Criterion crit = null; |
if(activeDegrees != null) |
for(String degree: activeDegrees) |
{ |
if(crit == null) |
crit = eq("c.degree",degree); |
else |
crit = or(crit,eq("c.degree",degree)); |
} |
if(activeCourseIds != null) |
for(Long courseId: activeCourseIds) |
{ |
if(crit == null) |
crit = eq("c.id",courseId); |
else |
crit = or(crit,eq("c.id",courseId)); |
} |
return crit; |
} |
public List<CourseUnit> loadTeacherUnitsMissingEvaluation(UserSession userSession) |
{ |
String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
Criterion degreesCrit = getCourseUnitActiveDegreeCourseIdsCriterion(activeYear); |
if(degreesCrit == null) |
return new ArrayList<CourseUnit>(); |
List<CourseUnit> nulls = |
createCriteria() |
.createAlias("course", "c") |
.createAlias("teachers", "t") |
.add(eq("importYear", activeYear)) |
//.add(not(eq("importYear", DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()))) |
//.add(ge("importYear", "201415" )) |
//.add(isNull("courseUnitEvaluation")) |
//todo novo testar |
.add(eq("t.id", userSession.getUser().getId())) |
.add(degreesCrit) |
.add(isNull("courseUnitEvaluation")) |
.list(); |
List<CourseUnit> teacherCompleteFalse = |
createCriteria() |
.createAlias("course", "c") |
.createAlias("courseUnitEvaluation", "ce") |
.createAlias("teachers","t") |
.add(eq("t.id", userSession.getUser().getId())) |
.add(eq("importYear", activeYear)) |
//.add(not(eq("importYear", DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()))) |
//.add(ge("importYear", "201415" )) |
//.add(isNull("courseUnitEvaluation")) |
//todo novo testar |
.add(degreesCrit) |
.add(eq("ce.teacherComplete", false)) |
.list(); |
teacherCompleteFalse.addAll(nulls); |
return teacherCompleteFalse; |
} |
public List<CourseMissingValidationEvaluation> loadMissingEvaluation(UserSession userSession) |
{ |
List<CourseMissingValidationEvaluation> result = new ArrayList<CourseMissingValidationEvaluation>(); |
528,13 → 693,33 |
public List<CourseUnit> loadMissingEvaluation(long courseId) |
{ |
return createCriteria() |
String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
Criterion degreesCrit = getCourseUnitActiveDegreeCourseIdsCriterion(activeYear); |
if(degreesCrit == null) |
return new ArrayList<CourseUnit>(); |
List<CourseUnit> nulls = |
createCriteria() |
.createAlias("course", "c") |
.add(eq("c.id", courseId)) |
.add(not(eq("importYear", DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()))) |
.add(ge("importYear", "201415")) |
.add(eq("importYear", activeYear)) |
.add(degreesCrit) |
.add(isNull("courseUnitEvaluation")) |
.list(); |
List<CourseUnit> teacherCompleteFalse = |
createCriteria() |
.createAlias("course", "c") |
.createAlias("courseUnitEvaluation", "ce") |
.add(eq("c.id", courseId)) |
.add(degreesCrit) |
.add(eq("importYear", activeYear)) |
.add(eq("ce.teacherComplete", false)) |
.list(); |
teacherCompleteFalse.addAll(nulls); |
return teacherCompleteFalse; |
} |
public CourseUnit loadByEvaluationStreamId(String identifier) |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseUnitGradeDaoImpl.java |
---|
1,19 → 1,9 |
package pt.estgp.estgweb.domain.dao.impl; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.CourseUnitGrade; |
import pt.estgp.estgweb.domain.dao.DaoUtils; |
import pt.estgp.estgweb.services.common.SearchTypeEnum; |
import java.util.List; |
import java.util.ArrayList; |
import static org.hibernate.criterion.Restrictions.eq; |
import org.hibernate.Criteria; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.criterion.Order; |
import static org.hibernate.criterion.Restrictions.*; |
/** |
* @author Jorge Machado |
* @date 28/Fev/2008 |
40,5 → 30,14 |
.uniqueResult(); |
} |
public CourseUnitGrade find(long courseUnitId, long studentId, String momento,String epoca) |
{ |
return (CourseUnitGrade) createCriteria().add(eq("student.id",studentId)) |
.add(eq("courseUnit.id",courseUnitId)) |
.add(eq("codigoMomento",momento)) |
.add(eq("codigoEpoca",epoca)) |
.uniqueResult(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/DaoFactory.java |
---|
327,5 → 327,25 |
return ConfigurationDaoImpl.getInstance(); |
} |
public static ConfigurationGradesDaoImpl getConfigurationGradesDaoImpl() { |
return ConfigurationGradesDaoImpl.getInstance(); |
} |
public static ConfigurationGradesEpocaAvaliacaoDaoImpl getConfigurationGradesEpocaAvaliacaoDaoImpl() { |
return ConfigurationGradesEpocaAvaliacaoDaoImpl.getInstance(); |
} |
public static ConfigurationGradesStatusEpocaDaoImpl getConfigurationGradesStatusEpocaDaoImpl() { |
return ConfigurationGradesStatusEpocaDaoImpl.getInstance(); |
} |
public static ConfigurationDirectoryDaoImpl getConfigurationDirectoryDaoImpl() { |
return ConfigurationDirectoryDaoImpl.getInstance(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/ConfigurationGradesEpocaAvaliacaoImpl.java |
---|
New file |
0,0 → 1,29 |
package pt.estgp.estgweb.domain; |
import java.io.Serializable; |
import java.util.Date; |
/** |
* Created by jorgemachado on 02/11/15. |
*/ |
public class ConfigurationGradesEpocaAvaliacaoImpl extends ConfigurationGradesEpocaAvaliacao { |
public ConfigurationGradesEpocaAvaliacaoImpl() |
{ |
} |
@Override |
public Serializable getSerializable() { |
return getId(); |
} |
public static ConfigurationGradesEpocaAvaliacao create(String epoca, String momento, String descricao) |
{ |
ConfigurationGradesEpocaAvaliacao obj = DomainObjectFactory.createConfigurationGradesEpocaAvaliacaoImpl(); |
obj.setCodigoMomento(momento); |
obj.setCodigoEpoca(epoca); |
obj.setDescricao(descricao); |
obj.setSaveDate(new Date()); |
return obj; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/JobServiceTaskSchedulerImpl.java |
---|
16,4 → 16,41 |
public Serializable getSerializable() { |
return getId(); |
} |
public String getWeekDayMsgKey() |
{ |
String dayOfTheWeek = ""; |
int i = getWeekday(); |
if(i == 2){ |
dayOfTheWeek = "Mon"; |
} else if (i==3){ |
dayOfTheWeek = "Tue"; |
} else if (i==4){ |
dayOfTheWeek = "Wed"; |
} else if (i==5){ |
dayOfTheWeek = "Thu"; |
} else if (i==6){ |
dayOfTheWeek = "Fri"; |
} else if (i==7){ |
dayOfTheWeek = "Sat"; |
} else if (i==1){ |
dayOfTheWeek = "Sun"; |
} |
return dayOfTheWeek; |
} |
public String getTypeMsgKey() |
{ |
if(isDaily()) |
return "dally"; |
else if(isMonthly()) |
return "monthly"; |
else if(isWeekly()) |
return "weekly"; |
else if(isNow()) |
return "now"; |
else |
return "unknown"; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/ConfigurationGradesImpl.java |
---|
New file |
0,0 → 1,68 |
package pt.estgp.estgweb.domain; |
import java.io.Serializable; |
import java.util.HashSet; |
import java.util.Set; |
/** |
* Created by jorgemachado on 02/11/15. |
*/ |
public class ConfigurationGradesImpl extends ConfigurationGrades { |
public ConfigurationGradesImpl() |
{ |
} |
@Override |
public Serializable getSerializable() { |
return getId(); |
} |
public void create() |
{ |
Set<ConfigurationGradesEpocaAvaliacao> epocas = new HashSet<ConfigurationGradesEpocaAvaliacao>(); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("3", "99", "Época de Recurso")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("4", "99", "Exame de Melhoria")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("5", "99", "Época Especial")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("14", "99", "2ª Oportunidade - Bolonha (ESTG)")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("6", "99", "Equivalência")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("7", "99", "Estatutos Especiais/Dirigente Associativo (ESTG)")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("12", "99", "Equivalência Vasco da Gama (ESTG)")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("13", "99", "Atleta de Alta Competição (ESTG)")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("20", "99", "Época Normal (ESTG)")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("22", "99", "Equivalência Erasmus (ESTG)")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("36", "99", "Época de Recurso (ESTG)")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("37", "99", "Época de Melhoria (ESTG)")); |
epocas.add(ConfigurationGradesEpocaAvaliacaoImpl.create("38", "99", "Época Especial (ESTG)")); |
setEpocasAvaliacao(epocas); |
Set<ConfigurationGradesStatusEpoca> status = new HashSet<ConfigurationGradesStatusEpoca>(); |
status.add(ConfigurationGradesStatusEpocaImpl.create("1","Inscrito")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("2","Avaliado")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("19","A Terminar Posteriormente 6 A pagamento")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("5","Anulou")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("7","Faltou")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("8","Desistiu")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("9","Dispensado")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("3","Aprovado")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("4","Reprovado")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("10","Admitido a Exame")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("11","Não Admitido")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("12","Sem avaliação")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("13","Insc. Pendente")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("14","Sem elementos de avaliação")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("15","Reprovado por faltas")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("16","Não atingiu a nota minima")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("18","Aguarda Equivalência")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("17","Não cumpriu critérios de avaliação")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("20","Prova anulada")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("21","Não atingiu todas as competências da unidade")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("22","Sem Nota Lançada")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("23","Frequentou")); |
status.add(ConfigurationGradesStatusEpocaImpl.create("24","Melhoria não Atribuida")); |
setStatusEpoca(status); |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/LogsServiceStream.java |
---|
New file |
0,0 → 1,120 |
package pt.estgp.estgweb.web; |
import jomm.utils.StreamsUtils; |
import org.apache.log4j.Logger; |
import org.json.JSONArray; |
import org.json.JSONException; |
import org.json.JSONObject; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServlet; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import java.io.*; |
/** |
* @author Fabio |
* @date 4/Abr/2008 |
* @time 11:03:00 |
* @see pt.estgp.estgweb.web |
*/ |
public class LogsServiceStream extends HttpServlet |
{ |
private static final Logger logger = Logger.getLogger(LogsServiceStream.class); |
public void doGet(HttpServletRequest request, HttpServletResponse response) |
throws ServletException, IOException |
{ |
String logRequired = request.getPathInfo(); |
logRequired = logRequired.substring(1); |
String logFile = pt.estgp.estgweb.Globals.JOB_SERVICES_LOG_DIR + java.io.File.separator + logRequired; |
java.io.File f = new java.io.File(logFile); |
if(!f.exists()) |
{ |
response.sendError(404); |
return; |
} |
String line = request.getParameter("l"); |
if(line != null) |
{ |
processJson(f,line,request,response); |
return; |
} |
try |
{ |
response.setContentType("text/plain"); |
OutputStream out = response.getOutputStream(); |
response.setContentLength((int) f.length()); |
StreamsUtils.inputStream2OutputStream(new FileInputStream(f),out); |
out.flush(); |
out.close(); |
} |
catch (Throwable e1) |
{ |
logger.error(e1 ); |
response.sendError(404); |
} |
} |
private void processJson(File f, String line, HttpServletRequest request, HttpServletResponse response) throws IOException { |
int l = Integer.parseInt(line); |
response.setContentType("application/json"); |
JSONObject obj = new JSONObject(); |
JSONArray lines = new JSONArray(); |
try { |
obj.put("lines",lines); |
obj.put("ok","ok"); |
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f),"UTF-8")); |
String readedLine; |
int i; |
boolean endReached = false; |
for(i = 0; i < l;i++) |
{ |
if(reader.readLine() == null) |
{ |
endReached = true; |
break; |
} |
} |
if(!endReached) |
{ |
while((readedLine = reader.readLine())!=null) |
{ |
lines.put(readedLine); |
} |
} |
String toWrite = obj.toString(); |
response.setCharacterEncoding("ISO-8859-1"); |
response.setContentLength(toWrite.length()); |
response.getOutputStream().print(toWrite); |
} |
catch (FileNotFoundException e) |
{ |
logger.error(e,e); |
response.sendError(500); |
} catch (JSONException e) { |
logger.error(e,e); |
response.sendError(500); |
} |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/DirWebProxy.java |
---|
169,7 → 169,12 |
{ |
endPath = path.substring(startPath.length()); |
} |
path = startPath + leafUrl + endPath; |
if(leafUrl.endsWith("/") && endPath.startsWith("/")) |
{ |
path = startPath + leafUrl.substring(0,leafUrl.length()-1) + endPath; |
} |
else |
path = startPath + leafUrl + endPath; |
} |
if(!extendDiretoryDocument(request, response, path, proxyKey, server, startPath + leafUrl, directoryDocument)) |
return; |
212,27 → 217,34 |
} |
protected static boolean extendDiretoryDocument(HttpServletRequest request,HttpServletResponse response, String path, String serverStr, String server, String startPath, Document directoryDocument) |
protected static boolean extendDiretoryDocument(HttpServletRequest request,HttpServletResponse response, String path, String server, String serverUrl, String startPath, Document directoryDocument) |
throws ServletException, IOException |
{ |
try |
{ |
String user = ConfigProperties.getProperty(serverStr + ".user"); |
String pass = ConfigProperties.getProperty(serverStr + ".pass"); |
UserSession userSession = UserSessionProxy.loadUserSessionFromRequest(request); |
FTPFileProxy.UserCredentialsForFtp u = FTPFileProxy.getUserCredentialsForFtp(server, userSession); |
String username = u.username; |
String password = u.password; |
if(username == null || password == null) //NAO PODE LIGAR |
{ |
response.sendError(401); |
return false; |
} |
if (path != null) |
{ |
FtpServer ftpServer = FtpServer.getServer(server, user, pass); |
FTPClient client = ftpServer.getClient(); |
FtpServer ftpServer = FtpServer.getServer(serverUrl, username, password); |
FTPClient client = FTPFileProxy.getFtpClient(ftpServer, userSession, server, serverUrl); |
if(client == null) |
{ |
logger.warn("###################"); |
logger.warn("################### > CANT CONNECT FTP"); |
response.sendError(408); |
return false; |
} |
Element actualNode = (Element) request.getAttribute("actualNode"); |
246,11 → 258,12 |
throw new NotAuthorizedException(); |
} |
FTPFile[] files = client.listFiles(); |
List<IFile> iFiles = FtpFile.init(files, server, path); |
List<IFile> iFiles = FtpFile.init(files, serverUrl, path); |
//root |
for (IFile iFile : iFiles) |
{ |
Element iFileElem = actualNode.addElement("leaf"); |
addAttribute(iFileElem, "node", "false"); |
addAttribute(iFileElem, "id", FTP_FILE_PREFIX + "0_" + iFile.getName()); |
addAttribute(iFileElem, "idPrefixSize","" + (FTP_FILE_PREFIX + "0_").length()); |
276,7 → 289,7 |
String pathAux = path.substring(startPath.length()); |
String[] pathFragments; |
if(path.startsWith("/")) |
if(pathAux.startsWith("/")) |
pathFragments = pathAux.substring(1).split("/"); |
else |
pathFragments = pathAux.split("/"); |
287,13 → 300,13 |
throw new NotAuthorizedException(); |
} |
FTPFile[] files = client.listFiles(); |
List<IFile> iFiles = FtpFile.init(files, server, path); |
List<IFile> iFiles = FtpFile.init(files, serverUrl, path); |
Element goDeepElement = null; |
String actualId = null; |
for (IFile iFile : iFiles) |
{ |
Element iFileElem = actualNode.addElement("node"); |
Element iFileElem = actualNode.addElement("leaf"); |
addAttribute(iFileElem, "node", "true"); |
addAttribute(iFileElem, "id", FTP_FILE_PREFIX + "0_" + iFile.getName()); |
addAttribute(iFileElem, "idPrefixSize","" + (FTP_FILE_PREFIX + "0_").length()); |
335,16 → 348,22 |
} |
files = client.listFiles(); |
iFiles = FtpFile.init(files, server, path); |
iFiles = FtpFile.init(files, serverUrl, path); |
for (IFile iFile : iFiles) |
{ |
Element iFileElem; |
if(i == pathFragments.length - 1) |
{ |
iFileElem = goDeepElement.addElement("leaf"); |
addAttribute(iFileElem, "node","false"); |
} |
else |
iFileElem = goDeepElement.addElement("node"); |
{ |
iFileElem = goDeepElement.addElement("leaf"); |
addAttribute(iFileElem, "node","true"); |
} |
addAttribute(iFileElem, "id", FTP_FILE_PREFIX + (i+1) + "_" + iFile.getName()); |
addAttribute(iFileElem, "idPrefixSize","" + (FTP_FILE_PREFIX + (i+1) + "_").length()); |
379,7 → 398,7 |
} |
else |
{ |
throw new FileNotFoundException("url not found for server:" + server + " and path:" + path); |
throw new FileNotFoundException("url not found for server:" + serverUrl + " and path:" + path); |
} |
} |
catch (Throwable e) |
/impl/src/java/pt/estgp/estgweb/web/utils/DatesUtils.java |
---|
1,13 → 1,12 |
package pt.estgp.estgweb.web.utils; |
import jomm.utils.MyCalendar; |
import org.apache.log4j.Logger; |
import java.text.SimpleDateFormat; |
import java.util.Calendar; |
import java.util.Date; |
import java.util.Calendar; |
import java.text.SimpleDateFormat; |
import org.apache.log4j.Logger; |
/** |
* @author Jorge Machado |
* @date 6/Mar/2008 |
19,6 → 18,7 |
private static final Logger logger = Logger.getLogger(DatesUtils.class); |
private static SimpleDateFormat hourMinute = new SimpleDateFormat("HH:mm"); |
private static SimpleDateFormat minutesSecondsDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); |
private static SimpleDateFormat filenameDateFormat = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss"); |
private static SimpleDateFormat userViewDateFormat = new SimpleDateFormat("yyyy/MM/dd"); |
64,4 → 64,9 |
return null; |
} |
} |
public String getTimeHHMM(Date d) |
{ |
return hourMinute.format(d); |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/DirLayoutController.java |
---|
1,36 → 1,29 |
package pt.estgp.estgweb.web; |
import org.apache.struts.action.Action; |
import org.apache.log4j.Logger; |
import org.apache.struts.action.ActionForm; |
import org.apache.struts.action.ActionForward; |
import org.apache.struts.action.ActionMapping; |
import org.apache.struts.action.ActionForm; |
import org.apache.log4j.Logger; |
import org.apache.commons.net.ftp.FTPClient; |
import org.apache.commons.net.ftp.FTPFile; |
import org.apache.commons.httpclient.util.URIUtil; |
import org.dom4j.*; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.services.directories.DirectoryNodeType; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.utils.Dom4jUtil; |
import pt.estgp.estgweb.web.controllers.ApplicationDispatchController; |
import pt.estgp.estgweb.web.exceptions.NotAuthorizedException; |
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 javax.servlet.ServletException; |
import java.io.*; |
import java.util.List; |
import java.io.IOException; |
import java.util.ArrayList; |
import java.util.HashMap; |
import java.util.List; |
import java.util.Map; |
import java.net.URL; |
import java.net.MalformedURLException; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.utils.Dom4jUtil; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.web.exceptions.NotAuthorizedException; |
import pt.estgp.estgweb.web.controllers.ApplicationDispatchController; |
import pt.estgp.estgweb.services.directories.DirectoryNodeType; |
import jomm.web.ftp.IFile; |
import jomm.web.ftp.impl.FtpFile; |
import jomm.web.utils.NavPlace; |
/** |
* @author Jorge Machado |
* @date 26/Fev/2008 |
107,8 → 100,24 |
try |
{ |
Document directoryDocument = Dom4jUtil.parseSourceFileFromCache("/pt/estgp/estgweb/directories/" + directory + ".xml"); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{directory}; |
Document directoryDocument; |
try |
{ |
String dXml = (String) sm.execute(RequestUtils.getRequester(request, response), "LoadDirectoryServiceXml", args, names); |
directoryDocument = Dom4jUtil.parse(dXml); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw new IOException(e.toString()); |
} |
if (path.startsWith("/")) |
path = path.substring(1); |
String[] ids = path.split("/"); |
133,13 → 142,14 |
if (r != null) |
rights.add(r); |
String name = idElem.getQName().getName(); |
if (name.equals("leaf")) |
boolean node = Boolean.parseBoolean(idElem.attributeValue("node")); |
if (name.equals("leaf") && !node) |
{ |
directoryNodeType = DirectoryNodeType.leaf; |
actualNodeId = id; |
actualNode = idElem; |
} |
else if (name.equals("node")) |
else if (name.equals("leaf") && node) |
{ |
directoryNodeType = DirectoryNodeType.node; |
actualNodeId = id; |
234,8 → 244,7 |
} |
} |
} |
catch (DocumentException e) |
{ |
catch (Throwable e) { |
logger.error(e, e); |
throw new IOException(e.toString()); |
} |
350,8 → 359,8 |
} |
public static Namespace dirNamespace = new Namespace("d", "http://www.estgp.pt/baco/directory/"); |
public static QName nodeDir = new QName("node", dirNamespace); |
public static QName leafDir = new QName("leaf", dirNamespace); |
//public static QName nodeDir = new QName("node", dirNamespace); |
//public static QName leafDir = new QName("leaf", dirNamespace); |
private boolean pruneDocument(Element startElem, Map namespaces, UserSession userSession) |
{ |
363,8 → 372,12 |
parentNode.remove(startElem); |
return false; |
} |
List<Element> nodes = startElem.elements(nodeDir); |
List<Element> leafs = startElem.elements(leafDir); |
XPath leafXpath = startElem.createXPath("./d:leaf[@node='false']"); |
XPath nodeXpath = startElem.createXPath("./d:leaf[@node='true']"); |
leafXpath.setNamespaceURIs(namespaces); |
nodeXpath.setNamespaceURIs(namespaces); |
List<Element> nodes = nodeXpath.selectNodes(startElem); |
List<Element> leafs = leafXpath.selectNodes(startElem); |
for (Element childNode : nodes) |
{ |
pruneDocument(childNode, namespaces, userSession); |
387,11 → 400,11 |
{ |
Rights rights = new Rights(); |
XPath userXpath = rightsElem.createXPath("./d:user"); |
XPath userXpath = rightsElem.createXPath("./d:right[@target='user']"); |
userXpath.setNamespaceURIs(namespaces); |
List<Element> userElems = userXpath.selectNodes(rightsElem); |
XPath roleXpath = rightsElem.createXPath("./d:role"); |
XPath roleXpath = rightsElem.createXPath("./d:right[@target='role']"); |
roleXpath.setNamespaceURIs(namespaces); |
List<Element> rolesElems = roleXpath.selectNodes(rightsElem); |
408,7 → 421,7 |
{ |
RightsT rightsT = new RightsT(); |
rightsT.rightsTClass = RightsT.RightsTClass.user; |
rightsT.text = userElem.getText(); |
rightsT.text = userElem.attribute("name").getText(); |
String type = userElem.attribute("type").getText(); |
if (type.equals("permit")) |
rightsT.type = RightsT.RightsTType.permit; |
424,7 → 437,7 |
{ |
RightsT rightsT = new RightsT(); |
rightsT.rightsTClass = RightsT.RightsTClass.role; |
rightsT.text = roleElem.getText(); |
rightsT.text = roleElem.attribute("name").getText(); |
String type = roleElem.attribute("type").getText(); |
if (type.equals("permit")) |
rightsT.type = RightsT.RightsTType.permit; |
/impl/src/java/pt/estgp/estgweb/web/FtpServer.java |
---|
79,11 → 79,21 |
logger.error(e,e); |
} |
if (username != null && password != null) |
{ |
if(ftp.login(username,password)) |
{ |
return ftp; |
} |
} |
return null; |
/* estava assim |
if (username != null) |
ftp.user(username); |
if (password != null) |
ftp.pass(password); |
return ftp; |
ftp.pass(password);*/ |
//return ftp; |
} |
public String getHost() |
/impl/src/java/pt/estgp/estgweb/web/form/configuration/DirectoriesForm.java |
---|
New file |
0,0 → 1,71 |
package pt.estgp.estgweb.web.form.configuration; |
import pt.estgp.estgweb.services.directories.xsd.Directory; |
import pt.estgp.estgweb.services.directories.xsd.DirectoryImpl; |
import pt.estgp.estgweb.web.form.ApplicationForm; |
/** |
* @author Jorge Machado |
* @date 25/Jun/2008 |
* @see pt.estgp.estgweb.web.form.courses |
*/ |
public class DirectoriesForm extends ApplicationForm |
{ |
private Directory directory; |
private String id; |
private String rtarget; |
private String rtype; |
private String rname; |
public DirectoriesForm() |
{ |
} |
public Directory getDirectory() |
{ |
if(directory == null) |
directory = new DirectoryImpl(); |
return directory; |
} |
public void setDirectory(Directory directory) |
{ |
this.directory = directory; |
} |
public String getId() { |
return id; |
} |
public void setId(String id) { |
this.id = id; |
} |
public String getRtarget() { |
return rtarget; |
} |
public void setRtarget(String rtarget) { |
this.rtarget = rtarget; |
} |
public String getRtype() { |
return rtype; |
} |
public void setRtype(String rtype) { |
this.rtype = rtype; |
} |
public String getRname() { |
return rname; |
} |
public void setRname(String rname) { |
this.rname = rname; |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/form/configuration/ConfigurationGradesForm.java |
---|
New file |
0,0 → 1,60 |
package pt.estgp.estgweb.web.form.configuration; |
import jomm.utils.AutoFillArrayList; |
import pt.estgp.estgweb.domain.ConfigurationGradesEpocaAvaliacaoImpl; |
import pt.estgp.estgweb.domain.ConfigurationGradesStatusEpocaImpl; |
import pt.estgp.estgweb.domain.views.ConfigurationGradesView; |
import pt.estgp.estgweb.web.form.ApplicationForm; |
import java.util.List; |
/** |
* @author Jorge Machado |
* @date 25/Jun/2008 |
* @see pt.estgp.estgweb.web.form.courses |
*/ |
public class ConfigurationGradesForm extends ApplicationForm |
{ |
private String dispatch; |
private long id; |
private ConfigurationGradesView configurationGrades; |
public ConfigurationGradesForm() |
{ |
} |
public ConfigurationGradesView getConfigurationGrades() { |
if(configurationGrades == null) |
{ |
configurationGrades = new ConfigurationGradesView(); |
List o = new AutoFillArrayList<ConfigurationGradesEpocaAvaliacaoImpl>(ConfigurationGradesEpocaAvaliacaoImpl.class); |
List o2 = new AutoFillArrayList<ConfigurationGradesStatusEpocaImpl>(ConfigurationGradesStatusEpocaImpl.class); |
configurationGrades.setEpocasAvaliacao(o); |
configurationGrades.setStatusEpocas(o2); |
} |
return configurationGrades; |
} |
public String getOp() { |
return dispatch; |
} |
public void setOp(String dispatch) { |
this.dispatch = dispatch; |
} |
public void setConfigurationGrades(ConfigurationGradesView configurationGrades) { |
this.configurationGrades = configurationGrades; |
} |
public long getId() { |
return id; |
} |
public void setId(long id) { |
this.id = id; |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/form/configuration/SchedulleTasksForm.java |
---|
New file |
0,0 → 1,55 |
package pt.estgp.estgweb.web.form.configuration; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
import pt.estgp.estgweb.domain.JobServiceTaskImpl; |
import pt.estgp.estgweb.domain.JobServiceTaskSchedulerImpl; |
import pt.estgp.estgweb.web.form.ApplicationForm; |
/** |
* @author Jorge Machado |
* @date 25/Jun/2008 |
* @see pt.estgp.estgweb.web.form.courses |
*/ |
public class SchedulleTasksForm extends ApplicationForm |
{ |
private JobServiceTaskSchedulerImpl jobScheduller; |
private JobServiceTaskImpl jobServiceTask; |
private Long id; |
public SchedulleTasksForm() |
{ |
} |
public JobServiceTaskSchedulerImpl getDirectory() |
{ |
if(jobScheduller == null) |
jobScheduller = DomainObjectFactory.createJobServiceTaskSchedulerImpl(); |
return jobScheduller; |
} |
public void setJobScheduller(JobServiceTaskSchedulerImpl jobScheduller) { |
this.jobScheduller = jobScheduller; |
} |
public Long getId() { |
return id; |
} |
public void setId(Long id) { |
this.id = id; |
} |
public JobServiceTaskImpl getJobServiceTask() |
{ |
return jobServiceTask; |
} |
public void setJobServiceTask(JobServiceTaskImpl jobServiceTask) { |
this.jobServiceTask = jobServiceTask; |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/controllers/courses/CoursesController.java |
---|
284,6 → 284,11 |
CourseForm cF = (CourseForm) form; |
String importYear = cF.getImportYear(); |
long courseId = cF.getCourseId(); |
if(courseId <= 0) |
{ |
addError(request,"courses.fill.course"); |
return mapping.findForward("load.courses.programs"); |
} |
String semestre = cF.getSemestre(); |
String area = cF.getArea(); |
DirectedCoordinatedUnitsService.TeachersSituationEnum teachersSituationEnum = cF.getTeacherSituationEnum(); |
/impl/src/java/pt/estgp/estgweb/web/controllers/courseunits/CourseUnitsEvaluationController.java |
---|
116,6 → 116,45 |
} |
} |
public ActionForward teacherCompleteEvaluation(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
try |
{ |
CourseUnitEvaluationForm cUF = (CourseUnitEvaluationForm) form; |
long id = cUF.getCourseUnitView().getId(); |
CourseUnitEvaluationView cuV = cUF.getCourseUnitEvaluationView(); |
cuV.setTeacherComplete(true); |
IServiceManager sm = ServiceManager.getInstance(); |
Object[] args = new Object[]{cuV, id}; |
sm.execute(RequestUtils.getRequester(request, response), "SaveCourseUnitEvaluation", args); |
CourseUnitView cV = loadCourseUnitView(id,true,false, mapping, request, response); |
cUF.setCourseUnitView(cV); |
request.setAttribute("CourseUnitView", cV); |
addMessage(request,"courseunit.evaluation.success"); |
return mapping.findForward("load"); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (NotFoundException e) |
{ |
return mapping.findForward("error404"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
return mapping.findForward("error500"); |
} |
} |
public ActionForward publishEvaluation(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
/impl/src/java/pt/estgp/estgweb/web/controllers/profile/ProfileController.java |
---|
1,33 → 1,38 |
package pt.estgp.estgweb.web.controllers.profile; |
import java.io.Serializable; |
import org.apache.log4j.Logger; |
import org.apache.struts.action.ActionErrors; |
import org.apache.struts.action.ActionForm; |
import org.apache.struts.action.ActionForward; |
import org.apache.struts.action.ActionMapping; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
import pt.estgp.estgweb.domain.User; |
import pt.estgp.estgweb.domain.UserSessionImpl; |
import pt.estgp.estgweb.domain.views.RecordView; |
import pt.estgp.estgweb.domain.views.UserView; |
import pt.estgp.estgweb.services.expceptions.AlreadyExistsException; |
import pt.estgp.estgweb.web.UserSessionProxy; |
import pt.estgp.estgweb.web.controllers.AddRolesController; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.estgp.estgweb.web.UserSessionProxy; |
import pt.estgp.estgweb.web.exceptions.NoCookiesException; |
import pt.estgp.estgweb.web.form.AddRolesForm; |
import pt.estgp.estgweb.web.form.profile.ProfileForm; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.views.UserView; |
import pt.estgp.estgweb.domain.views.RecordView; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.services.expceptions.AlreadyExistsException; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.FilterRetrieveException; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.IncompatibleFilterException; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.InvalidFilterException; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.InvalidFilterExpressionException; |
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.FilterChainFailedException; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.ServiceManagerException; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.*; |
import org.apache.log4j.Logger; |
import org.apache.struts.action.*; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import javax.servlet.ServletException; |
import java.io.Serializable; |
import java.util.List; |
import java.util.ArrayList; |
import pt.estgp.estgweb.web.form.AddRolesForm; |
/** |
* @author Jorge Machado |
* @date 26/Fev/2008 |
522,4 → 527,32 |
} |
} |
public ActionForward addRole(ActionMapping mapping, |
ActionForm form , |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable, ServletException |
{ |
ProfileForm profileForm = (ProfileForm) form; |
UserView uV = loadUser(profileForm.getUserView().getId(), request, response); |
profileForm.getUserView().setPasswordLocal(uV.isPasswordLocal()); |
profileForm.setUserView(uV); |
UserSessionImpl userSession = (UserSessionImpl) UserSessionProxy.loadUserSession(request, response); |
return super.addRole(mapping,form,request,response); |
} |
public ActionForward removeRole(ActionMapping mapping, |
ActionForm form , |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable, ServletException |
{ |
ProfileForm profileForm = (ProfileForm) form; |
UserView uV = loadUser(profileForm.getUserView().getId(), request, response); |
profileForm.setUserView(uV); |
profileForm.getUserView().setPasswordLocal(uV.isPasswordLocal()); |
UserSessionImpl userSession = (UserSessionImpl) UserSessionProxy.loadUserSession(request, response); |
return super.removeRole(mapping,form,request,response); |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/controllers/configuration/DirectoriesController.java |
---|
New file |
0,0 → 1,339 |
package pt.estgp.estgweb.web.controllers.configuration; |
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.directories.xsd.*; |
import pt.estgp.estgweb.web.UserSessionProxy; |
import pt.estgp.estgweb.web.controllers.ApplicationDispatchController; |
import pt.estgp.estgweb.web.form.configuration.DirectoriesForm; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.FilterChainFailedException; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import java.util.Iterator; |
/** |
* @author Jorge Machado |
* @date 26/Fev/2008 |
* @time 18:01:54 |
* @see pt.estgp.estgweb.web |
*/ |
public class DirectoriesController extends ApplicationDispatchController |
{ |
private static final Logger logger = Logger.getLogger(DirectoriesController.class); |
public ActionForward load(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{df.getId()}; |
try |
{ |
Directory d = (Directory) sm.execute(RequestUtils.getRequester(request, response), "LoadDirectoryService", args, names); |
df.setDirectory(d); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
return mapping.findForward("directory"); |
} |
public ActionForward addLeaf(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
LeafT leaf = LeafTImpl.findLeaf(df.getDirectory(), idParent); |
if(leaf == null) |
{ |
addError(request,"directories.leaf.not.found",idParent); |
return mapping.findForward("directories"); |
} |
addMessage(request,"directories.add.leaf",idParent); |
leaf.getLeaf().add(new LeafTImpl()); |
return mapping.findForward("directory"); |
} |
public ActionForward refresh(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
addMessage(request, "directories.refresh"); |
return mapping.findForward("directory"); |
} |
public ActionForward save(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable { |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{df.getDirectory()}; |
try { |
sm.execute(RequestUtils.getRequester(request, response), "SaveDirectoryService", args, names); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
addMessage(request, "directories.saved"); |
return mapping.findForward("directories"); |
} |
public ActionForward cancel(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
addMessage(request, "directories.canceled"); |
return mapping.findForward("directories"); |
} |
public ActionForward removeLeaf(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
LeafT leaf = LeafTImpl.removeLeaf(df.getDirectory(), idParent); |
if(leaf == null) |
{ |
addError(request,"directories.leaf.not.found",idParent); |
return mapping.findForward("directories"); |
} |
addMessage(request, "directories.removed.leaf", idParent); |
leaf.getLeaf().add(new LeafTImpl()); |
return mapping.findForward("directory"); |
} |
public ActionForward addRight(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
LeafT leaf = LeafTImpl.findLeaf(df.getDirectory(), idParent); |
if(leaf == null) |
{ |
addError(request,"directories.leaf.not.found",idParent); |
return mapping.findForward("directories"); |
} |
leaf.getRights().getRight().add(new RightImpl()); |
addMessage(request, "directories.add.right", idParent); |
return mapping.findForward("directory"); |
} |
public ActionForward removeRight(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
LeafT leaf = LeafTImpl.findLeaf(df.getDirectory(), idParent); |
if(leaf == null) |
{ |
addError(request,"directories.leaf.not.found",idParent); |
return mapping.findForward("directories"); |
} |
Iterator<RightsT.Right> iter = leaf.getRights().getRight().iterator(); |
while(iter.hasNext()) |
{ |
RightsT.Right r =iter.next(); |
if(r.getName().equals(df.getRname()) && r.getTarget().equals(df.getRtarget()) && df.getRtype().equals(r.getType())) |
{ |
iter.remove(); |
} |
} |
addMessage(request, "directories.remove.right", df.getRname(),df.getRtarget(),df.getRtype()); |
return mapping.findForward("directory"); |
} |
public ActionForward addDirRight(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
df.getDirectory().getRights().getRight().add(new RightImpl()); |
addMessage(request, "directories.add.right"); |
return mapping.findForward("directory"); |
} |
public ActionForward removeDirRight(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
Iterator<RightsT.Right> iter = df.getDirectory().getRights().getRight().iterator(); |
while(iter.hasNext()) |
{ |
RightsT.Right r =iter.next(); |
if(r.getName().equals(df.getRname()) && r.getTarget().equals(df.getRtarget()) && df.getRtype().equals(r.getType())) |
{ |
iter.remove(); |
} |
} |
addMessage(request, "directories.remove.right", df.getRname(),df.getRtarget(),df.getRtype()); |
return mapping.findForward("directory"); |
} |
public ActionForward addDirGroup(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
df.getDirectory().getGroupsDeclaration().getGroup().add(new GroupImpl()); |
addMessage(request, "directories.add.group"); |
return mapping.findForward("directory"); |
} |
public ActionForward removeDirGroup(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
Iterator<GroupDeclarationT.Group> iter = df.getDirectory().getGroupsDeclaration().getGroup().iterator(); |
while(iter.hasNext()) |
{ |
GroupDeclarationT.Group g =iter.next(); |
if(g.getName().equals(df.getRname())) |
{ |
iter.remove(); |
} |
} |
addMessage(request, "directories.remove.group"); |
return mapping.findForward("directory"); |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/web/controllers/configuration/SchedulerTasksController.java |
---|
New file |
0,0 → 1,472 |
package pt.estgp.estgweb.web.controllers.configuration; |
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.domain.JobServiceTaskImpl; |
import pt.estgp.estgweb.domain.JobServiceTaskScheduler; |
import pt.estgp.estgweb.domain.JobServiceTaskSchedulerImpl; |
import pt.estgp.estgweb.services.directories.xsd.*; |
import pt.estgp.estgweb.web.UserSessionProxy; |
import pt.estgp.estgweb.web.controllers.ApplicationDispatchController; |
import pt.estgp.estgweb.web.form.configuration.DirectoriesForm; |
import pt.estgp.estgweb.web.form.configuration.SchedulleTasksForm; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.FilterChainFailedException; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import java.util.Iterator; |
/** |
* @author Jorge Machado |
* @date 26/Fev/2008 |
* @time 18:01:54 |
* @see pt.estgp.estgweb.web |
*/ |
public class SchedulerTasksController extends ApplicationDispatchController |
{ |
private static final Logger logger = Logger.getLogger(SchedulerTasksController.class); |
public ActionForward load(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable |
{ |
SchedulleTasksForm sf = (SchedulleTasksForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{sf.getId()}; |
try |
{ |
JobServiceTaskSchedulerImpl d = (JobServiceTaskSchedulerImpl) sm.execute(RequestUtils.getRequester(request, response), "LoadJobServiceTaskScheduler", args, names); |
sf.setJobScheduller(d); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
return mapping.findForward("task"); |
} |
public ActionForward loadLog(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable |
{ |
SchedulleTasksForm sf = (SchedulleTasksForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{sf.getId()}; |
try |
{ |
JobServiceTaskImpl j = (JobServiceTaskImpl) sm.execute(RequestUtils.getRequester(request, response), "LoadJobServiceTask", args, names); |
sf.setJobServiceTask(j); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
if(request.getParameter("from")!=null) |
return mapping.findForward("taskLogfrom" + request.getParameter("from")); |
else |
return mapping.findForward("taskLog"); |
} |
public ActionForward runNow(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable |
{ |
SchedulleTasksForm sf = (SchedulleTasksForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{sf.getId()}; |
try |
{ |
sm.execute(RequestUtils.getRequester(request, response), "RunNowJobServiceTaskScheduller", args, names); |
addMessage(request,"job.schedule.for.now"); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
return mapping.findForward("tasks"); |
} |
public ActionForward toggleActive(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable |
{ |
SchedulleTasksForm sf = (SchedulleTasksForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{sf.getId()}; |
try |
{ |
JobServiceTaskScheduler scheduler = (JobServiceTaskScheduler) sm.execute(RequestUtils.getRequester(request, response), "ToggleActiveJobServiceTaskScheduller", args, names); |
if(scheduler.isActive()) |
addMessage(request,"job.schedule.active"); |
else |
addMessage(request,"job.schedule.inactive"); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
return mapping.findForward("tasks"); |
} |
public ActionForward delete(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable |
{ |
SchedulleTasksForm sf = (SchedulleTasksForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{sf.getId()}; |
try |
{ |
sm.execute(RequestUtils.getRequester(request, response), "DeleteJobServiceTaskScheduller", args, names); |
addMessage(request,"job.schedule.deleted"); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
return mapping.findForward("tasks"); |
} |
public ActionForward addLeaf(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
LeafT leaf = LeafTImpl.findLeaf(df.getDirectory(), idParent); |
if(leaf == null) |
{ |
addError(request,"directories.leaf.not.found",idParent); |
return mapping.findForward("directories"); |
} |
addMessage(request,"directories.add.leaf",idParent); |
leaf.getLeaf().add(new LeafTImpl()); |
return mapping.findForward("directory"); |
} |
public ActionForward refresh(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
addMessage(request, "directories.refresh"); |
return mapping.findForward("directory"); |
} |
public ActionForward save(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable { |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{df.getDirectory()}; |
try { |
sm.execute(RequestUtils.getRequester(request, response), "SaveDirectoryService", args, names); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
addMessage(request, "directories.saved"); |
return mapping.findForward("directories"); |
} |
public ActionForward cancel(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
addMessage(request, "directories.canceled"); |
return mapping.findForward("directories"); |
} |
public ActionForward removeLeaf(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
LeafT leaf = LeafTImpl.removeLeaf(df.getDirectory(), idParent); |
if(leaf == null) |
{ |
addError(request,"directories.leaf.not.found",idParent); |
return mapping.findForward("directories"); |
} |
addMessage(request, "directories.removed.leaf", idParent); |
leaf.getLeaf().add(new LeafTImpl()); |
return mapping.findForward("directory"); |
} |
public ActionForward addRight(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
LeafT leaf = LeafTImpl.findLeaf(df.getDirectory(), idParent); |
if(leaf == null) |
{ |
addError(request,"directories.leaf.not.found",idParent); |
return mapping.findForward("directories"); |
} |
leaf.getRights().getRight().add(new RightImpl()); |
addMessage(request, "directories.add.right", idParent); |
return mapping.findForward("directory"); |
} |
public ActionForward removeRight(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
LeafT leaf = LeafTImpl.findLeaf(df.getDirectory(), idParent); |
if(leaf == null) |
{ |
addError(request,"directories.leaf.not.found",idParent); |
return mapping.findForward("directories"); |
} |
Iterator<RightsT.Right> iter = leaf.getRights().getRight().iterator(); |
while(iter.hasNext()) |
{ |
RightsT.Right r =iter.next(); |
if(r.getName().equals(df.getRname()) && r.getTarget().equals(df.getRtarget()) && df.getRtype().equals(r.getType())) |
{ |
iter.remove(); |
} |
} |
addMessage(request, "directories.remove.right", df.getRname(),df.getRtarget(),df.getRtype()); |
return mapping.findForward("directory"); |
} |
public ActionForward addDirRight(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
df.getDirectory().getRights().getRight().add(new RightImpl()); |
addMessage(request, "directories.add.right"); |
return mapping.findForward("directory"); |
} |
public ActionForward removeDirRight(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
Iterator<RightsT.Right> iter = df.getDirectory().getRights().getRight().iterator(); |
while(iter.hasNext()) |
{ |
RightsT.Right r =iter.next(); |
if(r.getName().equals(df.getRname()) && r.getTarget().equals(df.getRtarget()) && df.getRtype().equals(r.getType())) |
{ |
iter.remove(); |
} |
} |
addMessage(request, "directories.remove.right", df.getRname(),df.getRtarget(),df.getRtype()); |
return mapping.findForward("directory"); |
} |
public ActionForward addDirGroup(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
String idParent = df.getId(); |
df.getDirectory().getGroupsDeclaration().getGroup().add(new GroupImpl()); |
addMessage(request, "directories.add.group"); |
return mapping.findForward("directory"); |
} |
public ActionForward removeDirGroup(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
DirectoriesForm df = (DirectoriesForm) form; |
Iterator<GroupDeclarationT.Group> iter = df.getDirectory().getGroupsDeclaration().getGroup().iterator(); |
while(iter.hasNext()) |
{ |
GroupDeclarationT.Group g =iter.next(); |
if(g.getName().equals(df.getRname())) |
{ |
iter.remove(); |
} |
} |
addMessage(request, "directories.remove.group"); |
return mapping.findForward("directory"); |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/web/controllers/configuration/GradesController.java |
---|
New file |
0,0 → 1,151 |
package pt.estgp.estgweb.web.controllers.configuration; |
import jomm.dao.impl.AbstractDao; |
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.domain.ConfigurationGradesEpocaAvaliacao; |
import pt.estgp.estgweb.domain.ConfigurationGradesStatusEpoca; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.web.UserSessionProxy; |
import pt.estgp.estgweb.web.controllers.ApplicationDispatchController; |
import pt.estgp.estgweb.web.form.configuration.ConfigurationGradesForm; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
/** |
* @author Jorge Machado |
* @date 26/Fev/2008 |
* @time 18:01:54 |
* @see pt.estgp.estgweb.web |
*/ |
public class GradesController extends ApplicationDispatchController |
{ |
private static final Logger logger = Logger.getLogger(GradesController.class); |
public ActionForward saveGrades(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
ConfigurationGradesForm f = (ConfigurationGradesForm) form; |
AbstractDao.getCurrentSession().beginTransaction(); |
for(ConfigurationGradesEpocaAvaliacao a: f.getConfigurationGrades().getEpocasAvaliacao()) |
{ |
if(a.getId() > 0) |
{ |
ConfigurationGradesEpocaAvaliacao persist = DaoFactory.getConfigurationGradesEpocaAvaliacaoDaoImpl().load(a.getId()); |
persist.setCodigoEpoca(a.getCodigoEpoca()); |
persist.setCodigoMomento(a.getCodigoMomento()); |
persist.setObs(a.getObs()); |
persist.setDescricao(a.getDescricao()); |
} |
} |
for(ConfigurationGradesStatusEpoca a: f.getConfigurationGrades().getStatusEpocas()) |
{ |
if(a.getId() > 0) |
{ |
ConfigurationGradesStatusEpoca persist = DaoFactory.getConfigurationGradesStatusEpocaDaoImpl().load(a.getId()); |
persist.setStatus(a.getStatus()); |
persist.setObs(a.getObs()); |
persist.setDescricao(a.getDescricao()); |
} |
} |
AbstractDao.getCurrentSession().getTransaction().commit(); |
return mapping.findForward("grades"); |
} |
public ActionForward addEpocaAvaliacao(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
AbstractDao.getCurrentSession().beginTransaction(); |
ConfigurationGradesEpocaAvaliacao epoca = DomainObjectFactory.createConfigurationGradesEpocaAvaliacaoImpl(); |
DaoFactory.getConfigurationDaoImpl().load().getConfigurationGrades().getEpocasAvaliacao().add(epoca); |
DaoFactory.getConfigurationGradesEpocaAvaliacaoDaoImpl().save(epoca); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
return mapping.findForward("grades"); |
} |
public ActionForward addSatusEpoca(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
AbstractDao.getCurrentSession().beginTransaction(); |
ConfigurationGradesStatusEpoca status = DomainObjectFactory.createConfigurationGradesStatusEpocaImpl(); |
DaoFactory.getConfigurationDaoImpl().load().getConfigurationGrades().getStatusEpoca().add(status); |
DaoFactory.getConfigurationGradesStatusEpocaDaoImpl().save(status); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
return mapping.findForward("grades"); |
} |
public ActionForward deleteEpocaAvaliacao(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
ConfigurationGradesForm f = (ConfigurationGradesForm) form; |
AbstractDao.getCurrentSession().beginTransaction(); |
DaoFactory.getConfigurationGradesEpocaAvaliacaoDaoImpl().delete(f.getId()); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
return mapping.findForward("grades"); |
} |
public ActionForward deleteStatusEpoca(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("services")) |
{ |
return mapping.findForward("error401"); |
} |
ConfigurationGradesForm f = (ConfigurationGradesForm) form; |
AbstractDao.getCurrentSession().beginTransaction(); |
DaoFactory.getConfigurationGradesStatusEpocaDaoImpl().delete(f.getId()); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
return mapping.findForward("grades"); |
} |
} |
Property changes: |
Added: svn:executable |
+ * |
/impl/src/java/pt/estgp/estgweb/web/controllers/configuration/SchedullerTasksJson.java |
---|
New file |
0,0 → 1,191 |
package pt.estgp.estgweb.web.controllers.configuration; |
import com.owlike.genson.Genson; |
import jomm.dao.impl.AbstractDao; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.JobServiceTask; |
import pt.estgp.estgweb.domain.JobServiceTaskImpl; |
import pt.estgp.estgweb.domain.JobServiceTaskScheduler; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.web.UserSessionProxy; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.*; |
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.FilterChainFailedException; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.ServiceManagerException; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServlet; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import java.io.IOException; |
import java.lang.reflect.InvocationTargetException; |
import java.util.List; |
/** |
* Created by jorgemachado on 23/11/15. |
*/ |
public class SchedullerTasksJson extends HttpServlet |
{ |
private static final Logger logger = Logger.getLogger(SchedullerTasksJson.class); |
public void doGet(HttpServletRequest request, HttpServletResponse response) |
throws ServletException, IOException |
{ |
try { |
process(request,response); |
} catch (Throwable e) { |
response.sendError(500); |
logger.error(e,e); |
} |
} |
public void doPost(HttpServletRequest request, HttpServletResponse response) |
throws ServletException, IOException |
{ |
try { |
process(request,response); |
} catch (Throwable e) { |
response.sendError(500); |
logger.error(e, e); |
} |
} |
private void process(HttpServletRequest request, HttpServletResponse response) |
throws ServletException, IOException, NoSuchMethodException, InvocationTargetException, IllegalAccessException { |
String service = request.getParameter("service"); |
this.getClass().getMethod(service,HttpServletRequest.class,HttpServletResponse.class) |
.invoke(this,request,response); |
} |
public void loadLog(HttpServletRequest request,HttpServletResponse response) throws IOException, IncompatibleFilterException, InvalidFilterException, ClassNotIFilterException, FilterRetrieveException, ServiceManagerException, InvalidFilterExpressionException { |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("ci")) |
{ |
response.sendError(403); |
return; |
} |
String id = request.getParameter("id"); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{Long.parseLong(id)}; |
try |
{ |
JobServiceTaskImpl j = (JobServiceTaskImpl) sm.execute(RequestUtils.getRequester(request, response), "LoadJobServiceTask", args, names); |
Genson genson = new Genson.Builder() |
.exclude(Object.class) |
.include("serviceStartDateFormated", JobServiceTask.class) |
.include("serviceLastUpdateDateFormated", JobServiceTask.class) |
.include("serviceFinishDateFormated", JobServiceTask.class) |
.include("status", JobServiceTask.class) |
.include("progress",JobServiceTask.class) |
.create(); |
String json = genson.serialize(j); |
response.setContentType("application/json"); |
response.setCharacterEncoding("ISO-8859-1"); |
response.setContentLength(json.length()); |
response.getOutputStream().print(json); |
} |
catch (FilterChainFailedException e) |
{ |
logger.error(e,e); |
response.sendError(500); |
} |
catch (Throwable e) |
{ |
logger.error(e,e); |
response.sendError(500); |
} |
} |
public void loadTasks(HttpServletRequest request,HttpServletResponse response) throws IOException, IncompatibleFilterException, InvalidFilterException, ClassNotIFilterException, FilterRetrieveException, ServiceManagerException, InvalidFilterExpressionException { |
if(!UserSessionProxy.loadUserSessionFromRequest(request).getUser().isAdmin() && !UserSessionProxy.loadUserSessionFromRequest(request).getUser().hasRole("ci")) |
{ |
response.sendError(403); |
return; |
} |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{}; |
try |
{ |
List<JobServiceTaskScheduler> tasks = (List<JobServiceTaskScheduler>) sm.execute(RequestUtils.getRequester(request, response), "LoadJobServiceTaskSchedullers", args, names); |
Genson genson = new Genson.Builder() |
.exclude(Object.class) |
.include("serviceStartDateFormated", JobServiceTask.class) |
.include("serviceLastUpdateDateFormated", JobServiceTask.class) |
.include("serviceFinishDateFormated", JobServiceTask.class) |
.include("status", JobServiceTask.class) |
.include("progress",JobServiceTask.class) |
.include("progress",JobServiceTask.class) |
.include("lastJobServiceTask",JobServiceTaskScheduler.class) |
.create(); |
String json = genson.serialize(tasks); |
response.setContentType("application/json"); |
response.setCharacterEncoding("ISO-8859-1"); |
response.setContentLength(json.length()); |
response.getOutputStream().print(json); |
} |
catch (FilterChainFailedException e) |
{ |
logger.error(e,e); |
response.sendError(500); |
} |
catch (Throwable e) |
{ |
logger.error(e,e); |
response.sendError(500); |
} |
} |
public static void main(String[] args2) throws IncompatibleFilterException, InvalidFilterException, ClassNotIFilterException, FilterRetrieveException, ServiceManagerException, InvalidFilterExpressionException { |
String id = "44365"; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{Long.parseLong(id)}; |
try |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
JobServiceTaskImpl j = (JobServiceTaskImpl) DaoFactory.getJobServiceTaskDaoImpl().get(new Long(44365)); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
Genson genson = new Genson.Builder() |
.exclude(Object.class) |
.include("serviceStartDate", JobServiceTask.class) |
.include("serviceLastUpdateDate", JobServiceTask.class) |
.include("serviceFinishDate", JobServiceTask.class) |
.include("status", JobServiceTask.class) |
.include("progress",JobServiceTask.class) |
.create(); |
String json = genson.serialize(j); |
System.out.println(""); |
} |
catch (Throwable e) |
{ |
logger.error(e,e); |
} |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/controllers/announcements/MessagesController.java |
---|
1,36 → 1,26 |
package pt.estgp.estgweb.web.controllers.announcements; |
import pt.estgp.estgweb.web.controllers.courseunits.CourseUnitsController; |
import pt.estgp.estgweb.web.form.courses.CourseForm; |
import pt.estgp.estgweb.web.form.announcements.MessagesForm; |
import pt.estgp.estgweb.web.exceptions.NoCookiesException; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.estgp.estgweb.domain.views.CourseView; |
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.domain.views.CourseUnitView; |
import pt.estgp.estgweb.domain.views.CourseView; |
import pt.estgp.estgweb.domain.views.UserView; |
import pt.estgp.estgweb.filters.exceptions.NotFoundException; |
import pt.estgp.estgweb.services.expceptions.AlreadyExistsException; |
import pt.estgp.estgweb.services.courseunits.DirectedCoordinatedUnitsService; |
import pt.estgp.estgweb.services.courseunits.DirectedCoordinatedCourses; |
import pt.estgp.estgweb.services.announcements.CreateAnnouncementService; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.InvalidFilterException; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.InvalidFilterExpressionException; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.IncompatibleFilterException; |
import pt.utl.ist.berserk.logic.filterManager.exceptions.FilterRetrieveException; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.ServiceManagerException; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.FilterChainFailedException; |
import pt.estgp.estgweb.web.controllers.courseunits.CourseUnitsController; |
import pt.estgp.estgweb.web.form.announcements.MessagesForm; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
import org.apache.log4j.Logger; |
import org.apache.struts.action.ActionForward; |
import org.apache.struts.action.ActionMapping; |
import org.apache.struts.action.ActionForm; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.FilterChainFailedException; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import javax.servlet.ServletException; |
import java.util.List; |
import java.util.ArrayList; |
import java.util.List; |
/** |
* @author Jorge Machado |
58,7 → 48,7 |
MessagesForm mF = (MessagesForm) form; |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new String[]{"",mF.getDepartamento()}; |
Object[] args = new String[]{mF.getImportYear(),mF.getDepartamento()}; |
List<CourseView> courseViews = (List<CourseView>) sm.execute(RequestUtils.getRequester(request, response), "LoadCoursesImportYearArea", args, names); |
mF.setCourseViews(courseViews); |
addMessage(request,"submit.todo.message.courses.loaded"); |
/impl/src/java/pt/estgp/estgweb/web/FTPFileProxy.java |
---|
10,6 → 10,7 |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.UserSessionImpl; |
import pt.estgp.estgweb.services.ftpservices.FtpService; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServlet; |
32,6 → 33,113 |
*/ |
private static final Logger logger = Logger.getLogger(FTPFileProxy.class); |
public static class UserCredentialsForFtp |
{ |
String username; |
String password; |
} |
/** |
* |
* @param server |
* @param userSession |
* @return CONFERE SITUACAO DE AUTENTICACAO E SERVIDOR e devolve user e pass em uso |
*/ |
public static UserCredentialsForFtp getUserCredentialsForFtp(String server, UserSession userSession) |
{ |
UserCredentialsForFtp u = new UserCredentialsForFtp(); |
boolean useDefaultCredentialsRead = ConfigProperties.getBooleanProperty(server + ".use.default.credentials.to.read"); |
String passwordUserInSessionCript = (String) ((UserSessionImpl)userSession).get(FtpService.FTP_PASSWORD); |
if(!useDefaultCredentialsRead && // DEVE USAR AS DO USER |
passwordUserInSessionCript != null && userSession.getUser() != null) // E ESTA AUTENTICADO |
{ |
//ESTA AINDA PODE FALHAR AGORA QUANDO TENTAR SE FOR UM USER SEM LIGACAO AO FTP |
//AI TEM DE TENTAR AS DEFAULT SE ESTIVER AUTORIZADO |
u.username = userSession.getUsername(); |
u.password = DesUtils.getInstance().decrypt(passwordUserInSessionCript); |
logger.warn("Will use User Credentials for server " + server + " and user " + u.username); |
} |
else if(!useDefaultCredentialsRead && // DEVE USAR AS DO USER |
(passwordUserInSessionCript == null || userSession.getUser() == null) && //MAS NAO AUTENTICADO |
ConfigProperties.getBooleanProperty(server + ".use.default.credentials.to.read.if.user.fail.when.not.authenticated")) // MAS PODE USAR DEFAULTS SEM ESTAR AUTENTICADO |
{ |
logger.warn("There is no user authenticated, is configured to use not default credentials, but will use default password for server " + server); |
u.username = ConfigProperties.getProperty(server + ".user"); |
u.password = ConfigProperties.getProperty(server + ".pass"); |
} |
else if(!useDefaultCredentialsRead && // DEVE USAR AS DO USER |
(passwordUserInSessionCript == null || userSession.getUser() == null) && //MAS NAO AUTENTICADO |
!ConfigProperties.getBooleanProperty(server + ".use.default.credentials.to.read.if.user.fail.when.not.authenticated")) // NO ENTANTO NAO PODE USAR DEFAULTS SEM ESTAR AUTENTICADO |
{ |
u.username = null; |
u.password = null; |
} |
else if(useDefaultCredentialsRead) // DEVE USAR AS DEFAULT SEMPRE |
{ |
u.username = ConfigProperties.getProperty(server + ".user"); |
u.password = ConfigProperties.getProperty(server + ".pass"); |
} |
return u; |
} |
/** |
* @param ftpServer |
* @param userSession |
* @param server |
* @param serverUrl |
* @return return ftpClient if OK or try to inspect policy of connecting with defaults if authentication fails |
* @throws IOException |
*/ |
public static FTPClient getFtpClient(FtpServer ftpServer, UserSession userSession, String server, String serverUrl) |
throws IOException |
{ |
FTPClient client = ftpServer.getClient(); |
if(client == null) |
{ |
//FALHOU PODE A PASS DO USER NAO DAR POR NAO ESTAR NO FTP |
//TEM DE VERIFICAR SE PODE USAR DEFAULTS QUANDO AUTENTICACAO FALHA |
if(userSession.getUsername() != null && |
ConfigProperties |
.getBooleanProperty( |
server + ".use.default.credentials.to.read.if.user.fail.when.authenticated")) |
{ |
// ESTA AUTENTICADO E TENTOU USAR A DO USER FALHOU, OU JA ESTA NA DEFAULT E FALHOU A MESMA |
//COMO PODE TENTAR USAR AS DEFAULTS NESTE CASO VAI TENTAR |
logger.warn("###################"); |
logger.warn("################### > CANT CONNECT FTP"); |
//VELHO response.sendError(408); |
//NOVO |
logger.info("User cant connect to directory, probably user is not in ftp server, trying defaults"); |
ftpServer = FtpServer.getNewServer( |
serverUrl |
,ConfigProperties.getProperty(server + ".user") |
,ConfigProperties.getProperty(server + ".pass")); |
return ftpServer.getClient(); |
} |
else if(userSession.getUsername() != null && |
!ConfigProperties |
.getBooleanProperty( |
server + ".use.default.credentials.to.read.if.user.fail.when.authenticated")) |
{ |
// USER AUTENTICADO FALHOU E SEM AUTORIZACAO PARA LIGAR COM AS DEFAULTS |
logger.info("System is not authorized to use default password for " + server); |
return null; |
} |
else |
{ |
//NEM HA USER JA DEVIA TER FALHADO ANTES |
logger.info("No user authenticated will return without response"); |
return null; |
} |
//velho return; |
} |
return client; |
} |
protected void processRequest(HttpServletRequest request, HttpServletResponse response) |
throws ServletException, IOException |
{ |
40,41 → 148,42 |
String server = objectRequired.substring(0,objectRequired.indexOf("/")); |
String path = objectRequired.substring(objectRequired.indexOf("/")); |
UserSession userSession = UserSessionProxy.loadUserSessionFromRequest(request); |
UserSession userSession = UserSessionProxy.loadUserSessionFromRequest(request); |
String username = userSession != null ? userSession.getUsername() : "UNKNOWN"; |
String passwordUserInSession = (String) ((UserSessionImpl)userSession).get(FtpService.FTP_PASSWORD); |
logger.info("server:" + server); |
logger.info("path:" + path); |
if(username == null || passwordUserInSession == null) |
//LOGICA DE LIGACAO NESTE METODO |
UserCredentialsForFtp u = getUserCredentialsForFtp(server,userSession); |
String username = u.username; |
String password = u.password; |
if(username == null || password == null) //NAO PODE LIGAR |
{ |
response.sendError(401); |
return; |
} |
passwordUserInSession = DesUtils.getInstance().decrypt(passwordUserInSession); |
if(path != null) |
{ |
server = pt.estgp.estgweb.utils.ConfigProperties.getProperty("server." + server); |
String serverUrl = pt.estgp.estgweb.utils.ConfigProperties.getProperty("server." + server); |
String remoteName = path.substring(path.lastIndexOf("/")+1); |
String remoteDirectory = path.substring(0,path.lastIndexOf("/")); |
FtpServer ftpServer = FtpServer.getNewServer(server,username,passwordUserInSession); |
FtpServer ftpServer = FtpServer.getNewServer(serverUrl,username,password); |
FTPClient client = null; |
try |
{ |
client = ftpServer.getClient(); |
client = getFtpClient(ftpServer,userSession,server,serverUrl); |
if(client == null) |
{ |
logger.warn("###################"); |
logger.warn("################### > CANT CONNECT FTP"); |
response.sendError(408); |
return; |
} |
client.changeWorkingDirectory(remoteDirectory); |
FTPFile[] files = client.listFiles(); |
boolean found = false; |
for (FTPFile file : files) { |
110,6 → 219,7 |
client.disconnect(); |
} |
response.sendError(404); |
logger.error(e,e); |
return; |
} |
finally { |
/impl/src/java/pt/estgp/estgweb/examples/DBInit.java |
---|
70,6 → 70,9 |
announcement3.setPopupwidthpx(0); |
announcement3.setPosition(0); |
DaoFactory.getAnnouncementDaoImpl().save(announcement3); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
} |
} |
/impl/src/doc/TarefasManutencaoBaco.docx |
---|
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/mysql/ConfigurarMysql.txt |
---|
New file |
0,0 → 1,11 |
my.conf |
[mysqld] |
default-storage-engine = innodb |
transaction-isolation = READ-COMMITTED |
restart mysql |
restart no mac /usr/local/mysql/support-files/mysql.server restart |
/impl/src/doc/EMAIL_SEND_CONF.doc |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:executable |
+ * |
Added: svn:mime-type |
+ application/octet-stream |