Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 849 → Rev 850

/impl/src/java/pt/estgp/estgweb/services/courseunits/SaveCourseUnitProgram.java
70,7 → 70,6
cupv.persistViewInObjectAdministrator(program);
cupv.persistViewInObjectCoordinator(program);
cupv.persistViewInObjectTeacher(program);
//TODO METER O PROF RESPONSAVEL
setResponsableTeacher(cupv, c);
}
if(usession.getUser() instanceof Teacher && (((Teacher)(usession.getUser())).isTeacherOfCourseUnit(c.getId(),true)))
84,7 → 83,6
)
{
cupv.persistViewInObjectCoordinator(program);
//TODO METER O PROF RESPONSAVEL
setResponsableTeacher(cupv, c);
}
List<String> errors = new ArrayList<String>();
/impl/src/java/pt/estgp/estgweb/domain/ProcessEventImpl.java
New file
0,0 → 1,25
package pt.estgp.estgweb.domain;
 
import java.io.Serializable;
import java.util.List;
 
/**
* Created by jorgemachado on 10/01/14.
*/
public class ProcessEventImpl extends ProcessEvent
{
@Override
public List<String> getOwnerRoles() {
return getOwner().getOwnerRoles();
}
 
@Override
public String getChoosedOwnerRole() {
return getOwner().getChoosedOwnerRole();
}
 
@Override
public Serializable getSerializable() {
return getId();
}
}
/impl/src/java/pt/estgp/estgweb/domain/ProcessEventFileImpl.java
New file
0,0 → 1,25
package pt.estgp.estgweb.domain;
 
import java.io.Serializable;
import java.util.List;
 
/**
* Created by jorgemachado on 10/01/14.
*/
public class ProcessEventFileImpl extends ProcessEventFile
{
@Override
public List<String> getOwnerRoles() {
return getOwner().getOwnerRoles();
}
 
@Override
public String getChoosedOwnerRole() {
return getOwner().getChoosedOwnerRole();
}
 
@Override
public Serializable getSerializable() {
return getId();
}
}
/impl/src/java/pt/estgp/estgweb/domain/DomainObjectFactory.java
279,4 → 279,17
{
return new AssessmentResponseImpl();
}
 
public static ProcessImpl getProcessImpl()
{
return new ProcessImpl();
}
public static ProcessEventImpl getProcessEventImpl()
{
return new ProcessEventImpl();
}
public static ProcessEventFileImpl getProcessEventFileImpl()
{
return new ProcessEventFileImpl();
}
}
/impl/src/java/pt/estgp/estgweb/domain/ProcessImpl.java
New file
0,0 → 1,25
package pt.estgp.estgweb.domain;
 
import java.io.Serializable;
import java.util.List;
 
/**
* Created by jorgemachado on 10/01/14.
*/
public class ProcessImpl extends Process
{
@Override
public List<String> getOwnerRoles() {
return getOwner().getOwnerRoles();
}
 
@Override
public String getChoosedOwnerRole() {
return getOwner().getChoosedOwnerRole();
}
 
@Override
public Serializable getSerializable() {
return getId();
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ProcessDaoImpl.java
New file
0,0 → 1,19
package pt.estgp.estgweb.domain.dao.impl;
 
/**
* Created by jorgemachado on 10/01/14.
*/
public class ProcessDaoImpl extends ProcessDao
{
 
public ProcessDaoImpl()
{
 
}
public static ProcessDaoImpl getInstance()
{
if (myInstance == null)
myInstance = new ProcessDaoImpl();
return (ProcessDaoImpl) myInstance;
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ProcessEventFileDaoImpl.java
New file
0,0 → 1,19
package pt.estgp.estgweb.domain.dao.impl;
 
/**
* Created by jorgemachado on 10/01/14.
*/
public class ProcessEventFileDaoImpl extends ProcessEventFileDao {
 
 
public ProcessEventFileDaoImpl()
{
 
}
public static ProcessEventFileDaoImpl getInstance()
{
if (myInstance == null)
myInstance = new ProcessEventFileDaoImpl();
return (ProcessEventFileDaoImpl) myInstance;
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ProcessEventDaoImpl.java
New file
0,0 → 1,20
package pt.estgp.estgweb.domain.dao.impl;
 
/**
* Created by jorgemachado on 10/01/14.
*/
public class ProcessEventDaoImpl extends ProcessEventDao
{
 
public ProcessEventDaoImpl()
{
 
}
 
public static ProcessEventDaoImpl getInstance()
{
if (myInstance == null)
myInstance = new ProcessEventDaoImpl();
return (ProcessEventDaoImpl) myInstance;
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/DaoFactory.java
274,4 → 274,17
{
return AssessmentResponseDaoImpl.getInstance();
}
 
public static ProcessDaoImpl getProcessDaoImpl()
{
return ProcessDaoImpl.getInstance();
}
public static ProcessEventDaoImpl getProcessEventDaoImpl()
{
return ProcessEventDaoImpl.getInstance();
}
public static ProcessEventFileDaoImpl getProcessEventFileDaoImpl()
{
return ProcessEventFileDaoImpl.getInstance();
}
}
/impl/src/updates/db/update-18-bacoProcess.sql
New file
0,0 → 1,146
 
-- MySQL dump 10.13 Distrib 5.6.13, for osx10.6 (i386)
--
-- Host: localhost Database: baco3
-- ------------------------------------------------------
-- Server version 5.6.12
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 
--
-- Table structure for table `process`
--
 
DROP TABLE IF EXISTS `process`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `process` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discrimitator` varchar(255) NOT NULL,
`updateDate` datetime NOT NULL,
`openDate` datetime DEFAULT NULL,
`lastChangeDate` datetime DEFAULT NULL,
`closeDate` datetime DEFAULT NULL,
`nowState` varchar(255) DEFAULT NULL,
`owner` bigint(20) DEFAULT NULL,
`lastEvent` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKED8D1E6F52876F6F` (`owner`),
KEY `FKED8D1E6F382B17F5` (`lastEvent`),
CONSTRAINT `FKED8D1E6F382B17F5` FOREIGN KEY (`lastEvent`) REFERENCES `process_event` (`id`),
CONSTRAINT `FKED8D1E6F52876F6F` FOREIGN KEY (`owner`) REFERENCES `user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
 
--
-- Dumping data for table `process`
--
 
LOCK TABLES `process` WRITE;
/*!40000 ALTER TABLE `process` DISABLE KEYS */;
/*!40000 ALTER TABLE `process` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `process_event_file`
--
 
DROP TABLE IF EXISTS `process_event_file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `process_event_file` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discrimitator` varchar(255) NOT NULL,
`updateDate` datetime NOT NULL,
`importDate` datetime DEFAULT NULL,
`repositoryStream` varchar(255) DEFAULT NULL,
`notes` text,
`owner` bigint(20) DEFAULT NULL,
`processEvent` bigint(20) DEFAULT NULL,
`process_event_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKAB3EF7D15DFAAAE1` (`process_event_id`),
KEY `FKAB3EF7D136FB0BBC` (`processEvent`),
KEY `FKAB3EF7D152876F6F` (`owner`),
CONSTRAINT `FKAB3EF7D152876F6F` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
CONSTRAINT `FKAB3EF7D136FB0BBC` FOREIGN KEY (`processEvent`) REFERENCES `process_event` (`id`),
CONSTRAINT `FKAB3EF7D15DFAAAE1` FOREIGN KEY (`process_event_id`) REFERENCES `process_event` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
 
--
-- Dumping data for table `process_event_file`
--
 
LOCK TABLES `process_event_file` WRITE;
/*!40000 ALTER TABLE `process_event_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `process_event_file` ENABLE KEYS */;
UNLOCK TABLES;
 
--
-- Table structure for table `process_event`
--
 
DROP TABLE IF EXISTS `process_event`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `process_event` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discrimitator` varchar(255) NOT NULL,
`updateDate` datetime NOT NULL,
`openDate` datetime DEFAULT NULL,
`acceptedDate` datetime DEFAULT NULL,
`dispatchedDate` datetime DEFAULT NULL,
`lastChangeDate` datetime DEFAULT NULL,
`closeDate` datetime DEFAULT NULL,
`nowState` varchar(255) DEFAULT NULL,
`accepted` bit(1) DEFAULT NULL,
`destinationRole` varchar(255) DEFAULT NULL,
`notes` text,
`previous_event_id` bigint(20) DEFAULT NULL,
`next_event_id` bigint(20) DEFAULT NULL,
`dest_user_id` bigint(20) DEFAULT NULL,
`owner` bigint(20) DEFAULT NULL,
`process_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK627524CAD7AC12DD` (`next_event_id`),
KEY `FK627524CA6A22DC03` (`dest_user_id`),
KEY `FK627524CAB2F24AD4` (`process_id`),
KEY `FK627524CA52876F6F` (`owner`),
KEY `FK627524CA1627A759` (`previous_event_id`),
CONSTRAINT `FK627524CA1627A759` FOREIGN KEY (`previous_event_id`) REFERENCES `process_event` (`id`),
CONSTRAINT `FK627524CA52876F6F` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
CONSTRAINT `FK627524CA6A22DC03` FOREIGN KEY (`dest_user_id`) REFERENCES `user` (`id`),
CONSTRAINT `FK627524CAB2F24AD4` FOREIGN KEY (`process_id`) REFERENCES `process` (`id`),
CONSTRAINT `FK627524CAD7AC12DD` FOREIGN KEY (`next_event_id`) REFERENCES `process_event` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
 
--
-- Dumping data for table `process_event`
--
 
LOCK TABLES `process_event` WRITE;
/*!40000 ALTER TABLE `process_event` DISABLE KEYS */;
/*!40000 ALTER TABLE `process_event` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
 
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
-- Dump completed on 2014-01-10 12:22:02
/impl/src/hbm/pt/estgp/estgweb/domain/Process.hbm.xml
New file
0,0 → 1,84
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
<hibernate-mapping>
<class name="pt.estgp.estgweb.domain.Process" table="process" abstract="true">
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta>
<meta attribute="scope-class">public abstract</meta>
<id name="id" type="long">
<generator class="native"/>
</id>
<discriminator column="discrimitator"/>
<timestamp source="db" name="updateDate" unsaved-value="null"/>
<property name="openDate" type="timestamp"/>
<property name="lastChangeDate" type="timestamp"/>
<property name="closeDate" type="timestamp"/>
<property name="nowState" type="string"/>
 
<many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="no-proxy" outer-join="true"/>
<many-to-one name="lastEvent" class="pt.estgp.estgweb.domain.ProcessEvent" lazy="false" outer-join="true"/>
 
<set name="events" cascade="delete" lazy="true">
<key column="process_id"/>
<one-to-many class="pt.estgp.estgweb.domain.ProcessEvent"/>
</set>
<subclass name="pt.estgp.estgweb.domain.ProcessImpl" discriminator-value="ProcessImpl">
</subclass>
</class>
 
<class name="pt.estgp.estgweb.domain.ProcessEvent" table="process_event" abstract="true">
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta>
<meta attribute="scope-class">public abstract</meta>
<id name="id" type="long">
<generator class="native"/>
</id>
<discriminator column="discrimitator"/>
<timestamp source="db" name="updateDate" unsaved-value="null"/>
<property name="openDate" type="timestamp"/>
<property name="acceptedDate" type="timestamp"/>
<property name="dispatchedDate" type="timestamp"/>
<property name="lastChangeDate" type="timestamp"/>
<property name="closeDate" type="timestamp"/>
 
<property name="nowState" type="string"/>
<property name="accepted" type="boolean"/>
<property name="destinationRole" type="string"/>
 
<property name="notes" type="text"/>
 
 
<many-to-one name="previousEvent" column="previous_event_id" class="pt.estgp.estgweb.domain.ProcessEvent" lazy="no-proxy" outer-join="false" cascade="none"/>
<many-to-one name="nextEvent" column="next_event_id" class="pt.estgp.estgweb.domain.ProcessEvent" lazy="no-proxy" outer-join="false" cascade="delete"/>
<!-- é o owner <many-to-one name="destinatedPerson" column="dest_user_id" class="pt.estgp.estgweb.domain.User" lazy="no-proxy" outer-join="false" cascade="none"/>-->
<many-to-one name="sourcePerson" column="dest_user_id" class="pt.estgp.estgweb.domain.User" lazy="no-proxy" outer-join="false" cascade="none"/>
<many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="no-proxy" outer-join="true"/>
<set name="files" cascade="none" lazy="true">
<key column="process_event_id"/>
<one-to-many class="pt.estgp.estgweb.domain.ProcessEventFile"/>
</set>
<subclass name="pt.estgp.estgweb.domain.ProcessEventImpl" discriminator-value="ProcessEventImpl">
</subclass>
</class>
 
<class name="pt.estgp.estgweb.domain.ProcessEventFile" table="process_event_file" abstract="true">
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta>
<meta attribute="scope-class">public abstract</meta>
<id name="id" type="long">
<generator class="native"/>
</id>
<discriminator column="discrimitator"/>
<timestamp source="db" name="updateDate" unsaved-value="null"/>
<property name="importDate" type="timestamp"/>
 
<property name="repositoryStream" type="string"/>
<property name="notes" type="text"/>
 
<many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="no-proxy" outer-join="true"/>
<many-to-one name="processEvent" class="pt.estgp.estgweb.domain.ProcessEvent" lazy="false" outer-join="true"/>
 
<subclass name="pt.estgp.estgweb.domain.ProcessEventFileImpl" discriminator-value="ProcessEventFileImpl">
</subclass>
</class>
</hibernate-mapping>
/impl/src/web/css/style.css
843,6 → 843,7
color: white;
background-color:#f5911e;
padding-left: 10px;
vertical-align: top;
}
 
/*********************************************************************************/