Revision 47598
Added by Antonis Lempesis almost 7 years ago
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/utils/EmailUtils.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.utils; |
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Budget; |
4 |
import eu.dnetlib.goldoa.domain.User; |
|
5 | 4 |
import eu.dnetlib.goldoa.domain.Request; |
6 | 5 |
import eu.dnetlib.goldoa.domain.Role; |
6 |
import eu.dnetlib.goldoa.domain.User; |
|
7 | 7 |
|
8 | 8 |
import javax.mail.MessagingException; |
9 | 9 |
import java.util.List; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/utils/EmailUtilsImpl.java | ||
---|---|---|
4 | 4 |
import eu.dnetlib.goldoa.service.dao.UserDAO; |
5 | 5 |
import org.apache.log4j.Logger; |
6 | 6 |
import org.springframework.beans.factory.annotation.Autowired; |
7 |
import org.springframework.beans.factory.annotation.Value; |
|
8 | 7 |
import org.springframework.stereotype.Service; |
9 | 8 |
|
10 | 9 |
import javax.mail.MessagingException; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/ProjectManagerImpl.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service; |
2 |
|
|
2 | 3 |
import eu.dnetlib.goldoa.domain.Project; |
3 | 4 |
import eu.dnetlib.goldoa.domain.Request; |
4 |
import eu.dnetlib.goldoa.domain.Vocabulary; |
|
5 |
import eu.dnetlib.goldoa.service.dao.OrganizationDAO; |
|
5 |
import eu.dnetlib.goldoa.service.dao.ProjectDAO; |
|
6 | 6 |
import eu.dnetlib.goldoa.service.dao.RequestDAO; |
7 |
import eu.dnetlib.goldoa.service.dao.UserDAO; |
|
8 |
import eu.dnetlib.goldoa.service.dao.ProjectDAO; |
|
9 | 7 |
import org.springframework.beans.factory.annotation.Autowired; |
10 |
import org.springframework.beans.factory.annotation.Value; |
|
11 | 8 |
import org.springframework.stereotype.Service; |
12 | 9 |
import org.springframework.transaction.annotation.Transactional; |
13 | 10 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/JournalDAO.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.dao; |
2 | 2 |
|
3 | 3 |
//import eu.dnetlib.goldoa.domain.Currency; |
4 |
|
|
4 | 5 |
import eu.dnetlib.goldoa.domain.Journal; |
5 |
import eu.dnetlib.goldoa.domain.Project; |
|
6 |
import eu.dnetlib.goldoa.domain.Publisher; |
|
7 |
import eu.dnetlib.goldoa.domain.Vocabulary; |
|
8 | 6 |
import org.apache.log4j.Logger; |
9 | 7 |
import org.hibernate.criterion.Disjunction; |
10 | 8 |
import org.hibernate.criterion.MatchMode; |
11 | 9 |
import org.hibernate.criterion.Restrictions; |
12 | 10 |
import org.springframework.stereotype.Repository; |
13 | 11 |
|
14 |
import java.util.ArrayList; |
|
15 | 12 |
import java.util.List; |
16 | 13 |
|
17 | 14 |
/** |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/PublicationManagerImpl.java | ||
---|---|---|
3 | 3 |
import com.fasterxml.jackson.databind.JsonNode; |
4 | 4 |
import com.fasterxml.jackson.databind.ObjectMapper; |
5 | 5 |
import eu.dnetlib.goldoa.domain.*; |
6 |
//import eu.dnetlib.goldoa.domain.BankAccount; |
|
7 |
import eu.dnetlib.goldoa.domain.Currency; |
|
8 |
import eu.dnetlib.goldoa.domain.User; |
|
9 |
import eu.dnetlib.goldoa.domain.Identifier; |
|
10 | 6 |
import eu.dnetlib.goldoa.service.dao.PublicationDAO; |
11 | 7 |
import org.apache.commons.codec.digest.DigestUtils; |
12 | 8 |
import org.apache.log4j.Logger; |
... | ... | |
17 | 13 |
import java.io.InputStream; |
18 | 14 |
import java.math.BigInteger; |
19 | 15 |
import java.net.URL; |
20 |
import java.util.ArrayList; |
|
21 | 16 |
import java.util.Calendar; |
22 | 17 |
import java.util.Date; |
23 | 18 |
import java.util.Iterator; |
24 | 19 |
import java.util.TimeZone; |
25 | 20 |
|
21 |
//import eu.dnetlib.goldoa.domain.BankAccount; |
|
26 | 22 |
|
23 |
|
|
27 | 24 |
/** |
28 | 25 |
* Created by antleb on 3/13/15. |
29 | 26 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/EligibilityManager.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Eligibility; |
4 | 4 |
import eu.dnetlib.goldoa.domain.Request; |
5 |
import org.springframework.context.annotation.Bean; |
|
6 |
import org.springframework.stereotype.Component; |
|
7 |
import org.springframework.stereotype.Service; |
|
8 | 5 |
|
9 |
import javax.transaction.Transactional; |
|
10 |
|
|
11 | 6 |
/** |
12 | 7 |
* Created by antleb on 3/9/15. |
13 | 8 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/stats/StatsManager.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.stats; |
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Request; |
4 |
import eu.dnetlib.goldoa.domain.stats.Browse; |
|
5 |
import eu.dnetlib.goldoa.domain.stats.DateSeries; |
|
6 |
import eu.dnetlib.goldoa.domain.stats.MapData; |
|
7 |
import eu.dnetlib.goldoa.domain.stats.Numbers; |
|
8 |
import eu.dnetlib.goldoa.domain.stats.Series; |
|
4 |
import eu.dnetlib.goldoa.domain.stats.*; |
|
9 | 5 |
|
10 | 6 |
import java.util.Date; |
11 | 7 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/utils/MailLibrary.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.utils; |
2 | 2 |
|
3 |
import javax.annotation.PostConstruct; |
|
4 |
import javax.mail.Message; |
|
5 |
import javax.mail.MessagingException; |
|
6 |
import javax.mail.PasswordAuthentication; |
|
7 |
import javax.mail.Session; |
|
8 |
import javax.mail.Transport; |
|
9 |
import javax.mail.internet.AddressException; |
|
10 |
import javax.mail.internet.InternetAddress; |
|
11 |
import javax.mail.internet.MimeMessage; |
|
12 |
|
|
13 |
import com.sun.org.apache.xpath.internal.operations.Bool; |
|
14 | 3 |
import org.apache.commons.logging.Log; |
15 | 4 |
import org.apache.commons.logging.LogFactory; |
16 |
import org.springframework.beans.factory.annotation.Value; |
|
17 |
import org.springframework.context.annotation.Configuration; |
|
18 | 5 |
import org.springframework.stereotype.Service; |
19 | 6 |
|
7 |
import javax.mail.*; |
|
8 |
import javax.mail.internet.AddressException; |
|
9 |
import javax.mail.internet.InternetAddress; |
|
10 |
import javax.mail.internet.MimeMessage; |
|
20 | 11 |
import java.io.IOException; |
21 | 12 |
import java.util.Properties; |
22 | 13 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/utils/LicenseUpdateTask.java | ||
---|---|---|
5 | 5 |
import eu.dnetlib.goldoa.domain.Request; |
6 | 6 |
import eu.dnetlib.goldoa.domain.stats.Tuple; |
7 | 7 |
import eu.dnetlib.goldoa.service.PublicationManager; |
8 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 | 8 |
import org.springframework.jdbc.core.JdbcTemplate; |
10 | 9 |
import org.springframework.jdbc.core.RowMapper; |
11 | 10 |
|
... | ... | |
14 | 13 |
import java.sql.SQLException; |
15 | 14 |
import java.sql.Types; |
16 | 15 |
import java.util.List; |
17 |
import java.util.logging.StreamHandler; |
|
18 | 16 |
|
19 | 17 |
/* |
20 | 18 |
* Created by antleb on 3/7/16. |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/SearchManagerImpl.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service; |
2 | 2 |
|
3 |
import eu.dnetlib.goldoa.domain.Vocabulary; |
|
4 | 3 |
import org.springframework.beans.factory.annotation.Autowired; |
5 | 4 |
import org.springframework.stereotype.Service; |
6 | 5 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/eligibility/ProjectEligibiliyManager.java | ||
---|---|---|
3 | 3 |
import eu.dnetlib.goldoa.domain.Eligibility; |
4 | 4 |
import eu.dnetlib.goldoa.domain.Project; |
5 | 5 |
import eu.dnetlib.goldoa.domain.Request; |
6 |
import eu.dnetlib.goldoa.service.*; |
|
6 |
import eu.dnetlib.goldoa.service.EligibilityManager; |
|
7 |
import eu.dnetlib.goldoa.service.ProjectManager; |
|
8 |
import eu.dnetlib.goldoa.service.RequestManager; |
|
7 | 9 |
import org.springframework.beans.factory.annotation.Autowired; |
8 | 10 |
import org.springframework.stereotype.Component; |
9 | 11 |
|
10 |
import java.sql.Timestamp; |
|
11 | 12 |
import java.util.Date; |
12 | 13 |
import java.util.List; |
13 | 14 |
|
modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/ProfileTest.java | ||
---|---|---|
1 | 1 |
package unitest; |
2 | 2 |
|
3 |
import com.fasterxml.jackson.databind.ObjectMapper; |
|
4 |
import com.fasterxml.jackson.databind.type.TypeFactory; |
|
5 |
import com.sun.org.apache.regexp.internal.RE; |
|
6 | 3 |
import eu.dnetlib.goldoa.domain.*; |
7 | 4 |
import eu.dnetlib.goldoa.service.*; |
8 | 5 |
import eu.dnetlib.goldoa.service.dao.UserDAO; |
9 |
import eu.dnetlib.goldoa.service.eligibility.ProjectEligibiliyManager; |
|
10 |
import net.sf.ehcache.hibernate.HibernateUtil; |
|
11 |
import org.hibernate.Hibernate; |
|
12 |
import org.hibernate.SessionFactory; |
|
13 |
import org.hibernate.stat.SessionStatistics; |
|
14 |
import org.hibernate.stat.Statistics; |
|
15 | 6 |
import org.junit.Test; |
16 | 7 |
import org.junit.runner.RunWith; |
17 | 8 |
import org.springframework.beans.factory.annotation.Autowired; |
... | ... | |
19 | 10 |
import org.springframework.test.annotation.Rollback; |
20 | 11 |
import org.springframework.test.context.ContextConfiguration; |
21 | 12 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
22 |
import org.springframework.util.DigestUtils; |
|
23 | 13 |
|
24 |
import javax.persistence.EntityManager; |
|
25 |
import javax.persistence.EntityManagerFactory; |
|
26 | 14 |
import javax.transaction.Transactional; |
27 | 15 |
import java.io.IOException; |
28 |
import java.nio.charset.Charset; |
|
29 |
import java.util.ArrayList; |
|
30 |
import java.util.LinkedHashMap; |
|
31 | 16 |
import java.util.List; |
32 | 17 |
|
33 |
import static org.junit.Assert.*; |
|
34 |
|
|
35 | 18 |
/** |
36 | 19 |
* Created by panagiotis on 2/2/2017. |
37 | 20 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/ManageRequestsTest.java | ||
---|---|---|
11 | 11 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
12 | 12 |
|
13 | 13 |
import javax.transaction.Transactional; |
14 |
|
|
15 |
import java.io.IOException; |
|
16 |
import java.io.InputStream; |
|
17 | 14 |
import java.util.ArrayList; |
18 | 15 |
import java.util.Date; |
19 | 16 |
import java.util.List; |
20 |
import java.util.concurrent.locks.StampedLock; |
|
21 | 17 |
|
22 |
import static org.junit.Assert.*; |
|
23 |
|
|
24 | 18 |
/** |
25 | 19 |
* Created by panagiotis on 2/2/2017. |
26 | 20 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/MonitorTest.java | ||
---|---|---|
12 | 12 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
13 | 13 |
|
14 | 14 |
import javax.transaction.Transactional; |
15 |
|
|
16 |
import java.util.Date; |
|
17 | 15 |
import java.util.List; |
18 | 16 |
|
19 |
import static org.junit.Assert.*; |
|
20 |
|
|
21 | 17 |
/** |
22 | 18 |
* Created by panagiotis on 8/2/2017. |
23 | 19 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/PublicationTest.java | ||
---|---|---|
4 | 4 |
import eu.dnetlib.goldoa.domain.PublicationType; |
5 | 5 |
import eu.dnetlib.goldoa.domain.Publisher; |
6 | 6 |
import eu.dnetlib.goldoa.service.PublicationManager; |
7 |
import eu.dnetlib.goldoa.service.PublicationManagerImpl; |
|
8 | 7 |
import eu.dnetlib.goldoa.service.PublisherManager; |
9 | 8 |
import org.junit.Test; |
10 | 9 |
import org.junit.runner.RunWith; |
modules/uoa-goldoa-service/branches/hibernate/src/test/java/unitest/StatisticsTest.java | ||
---|---|---|
1 | 1 |
package unitest; |
2 | 2 |
|
3 |
import com.google.gwt.i18n.client.NumberFormat; |
|
4 |
import com.google.gwt.user.client.Window; |
|
5 |
import eu.dnetlib.goldoa.domain.OrganizationManagerException; |
|
6 | 3 |
import eu.dnetlib.goldoa.domain.Request; |
7 | 4 |
import eu.dnetlib.goldoa.domain.stats.*; |
8 | 5 |
import eu.dnetlib.goldoa.service.OrganizationManager; |
9 | 6 |
import eu.dnetlib.goldoa.service.stats.StatsManager; |
10 |
import eu.dnetlib.goldoa.service.stats.StatsManagerImpl; |
|
11 | 7 |
import org.junit.Test; |
12 | 8 |
import org.junit.runner.RunWith; |
13 | 9 |
import org.springframework.beans.factory.annotation.Autowired; |
... | ... | |
16 | 12 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
17 | 13 |
|
18 | 14 |
import javax.transaction.Transactional; |
19 |
|
|
20 | 15 |
import java.util.List; |
21 | 16 |
|
22 |
import static org.junit.Assert.*; |
|
23 |
|
|
24 | 17 |
/** |
25 | 18 |
* Created by panagiotis on 10/2/2017. |
26 | 19 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/model/GoldCoordinator.java | ||
---|---|---|
1 | 1 |
package model; |
2 | 2 |
|
3 |
import javax.persistence.Entity; |
|
4 |
import javax.persistence.NamedQuery; |
|
5 |
import javax.persistence.Table; |
|
3 | 6 |
import java.io.Serializable; |
4 |
import javax.persistence.*; |
|
5 | 7 |
|
6 | 8 |
|
7 | 9 |
/** |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/model/GoldOrganization.java | ||
---|---|---|
1 | 1 |
package model; |
2 | 2 |
|
3 |
import javax.persistence.Entity; |
|
4 |
import javax.persistence.NamedQuery; |
|
5 |
import javax.persistence.Table; |
|
3 | 6 |
import java.io.Serializable; |
4 |
import javax.persistence.*; |
|
5 | 7 |
|
6 | 8 |
|
7 | 9 |
/** |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/model/GoldProject.java | ||
---|---|---|
1 | 1 |
package model; |
2 | 2 |
|
3 |
import javax.persistence.*; |
|
3 | 4 |
import java.io.Serializable; |
4 |
import javax.persistence.*; |
|
5 |
|
|
6 |
import eu.dnetlib.goldoa.domain.Funder; |
|
7 |
|
|
8 | 5 |
import java.util.Date; |
9 | 6 |
|
10 | 7 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/SearchManager.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service; |
2 | 2 |
|
3 |
import eu.dnetlib.goldoa.domain.Vocabulary;
|
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable;
|
|
4 | 4 |
|
5 | 5 |
import java.io.Serializable; |
6 | 6 |
import java.util.List; |
... | ... | |
10 | 10 |
*/ |
11 | 11 |
public interface SearchManager { |
12 | 12 |
|
13 |
public enum TYPE implements Serializable { |
|
13 |
public enum TYPE implements IsSerializable {
|
|
14 | 14 |
PROJECT, ORGANISATION, JOURNAL, PUBLISHER, FUNDER; |
15 | 15 |
} |
16 | 16 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/FunderManagerImpl.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service; |
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Funder; |
4 |
import eu.dnetlib.goldoa.domain.Vocabulary; |
|
5 | 4 |
import eu.dnetlib.goldoa.service.dao.FunderDAO; |
6 | 5 |
import org.springframework.beans.factory.annotation.Autowired; |
7 | 6 |
import org.springframework.stereotype.Service; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/ProjectManager.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Project; |
4 | 4 |
|
5 |
|
|
6 | 5 |
import java.util.List; |
7 | 6 |
|
8 | 7 |
/** |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/RequestManagerImpl.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service; |
2 | 2 |
|
3 |
import com.sun.org.apache.xpath.internal.operations.Bool; |
|
4 | 3 |
import eu.dnetlib.goldoa.domain.*; |
5 | 4 |
import eu.dnetlib.goldoa.service.dao.RequestDAO; |
6 | 5 |
import eu.dnetlib.goldoa.service.utils.EmailUtils; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/ContactManagerImpl.java | ||
---|---|---|
3 | 3 |
import eu.dnetlib.goldoa.domain.Contact; |
4 | 4 |
import eu.dnetlib.goldoa.service.utils.MailLibrary; |
5 | 5 |
import org.springframework.beans.factory.annotation.Autowired; |
6 |
import org.springframework.beans.factory.annotation.Value; |
|
7 | 6 |
import org.springframework.stereotype.Service; |
8 | 7 |
|
9 | 8 |
import javax.mail.MessagingException; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/PublisherManagerImpl.java | ||
---|---|---|
3 | 3 |
|
4 | 4 |
import eu.dnetlib.goldoa.domain.Currency; |
5 | 5 |
import eu.dnetlib.goldoa.domain.Publisher; |
6 |
import eu.dnetlib.goldoa.service.dao.PublisherDAO; |
|
6 | 7 |
import eu.dnetlib.goldoa.service.dao.UserDAO; |
7 |
import eu.dnetlib.goldoa.service.dao.PublisherDAO; |
|
8 | 8 |
import org.apache.commons.codec.digest.DigestUtils; |
9 | 9 |
import org.apache.commons.logging.Log; |
10 | 10 |
import org.apache.commons.logging.LogFactory; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/OrganizationManagerImpl.java | ||
---|---|---|
1 | 1 |
|
2 | 2 |
package eu.dnetlib.goldoa.service; |
3 | 3 |
|
4 |
import eu.dnetlib.goldoa.domain.Budget; |
|
5 | 4 |
import eu.dnetlib.goldoa.domain.Organization; |
6 | 5 |
import eu.dnetlib.goldoa.domain.OrganizationManagerException; |
7 |
import eu.dnetlib.goldoa.domain.Vocabulary; |
|
8 |
//import eu.dnetlib.goldoa.service.dao.BudgetDAO; |
|
9 | 6 |
import eu.dnetlib.goldoa.service.dao.OrganizationDAO; |
10 | 7 |
import org.apache.commons.codec.digest.DigestUtils; |
11 | 8 |
import org.springframework.beans.factory.annotation.Autowired; |
... | ... | |
13 | 10 |
import org.springframework.stereotype.Service; |
14 | 11 |
import org.springframework.transaction.annotation.Transactional; |
15 | 12 |
|
16 |
import java.util.ArrayList; |
|
17 | 13 |
import java.util.List; |
18 | 14 |
|
15 |
//import eu.dnetlib.goldoa.service.dao.BudgetDAO; |
|
19 | 16 |
|
17 |
|
|
20 | 18 |
/** |
21 | 19 |
* Created by antleb on 3/3/15. |
22 | 20 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/InvoiceDAO.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.dao; |
2 | 2 |
|
3 |
import eu.dnetlib.goldoa.domain.Budget; |
|
4 | 3 |
import eu.dnetlib.goldoa.domain.File; |
5 | 4 |
import eu.dnetlib.goldoa.domain.Invoice; |
6 |
import eu.dnetlib.goldoa.service.RequestManagerImpl; |
|
7 | 5 |
import org.apache.commons.io.IOUtils; |
8 | 6 |
import org.apache.commons.logging.Log; |
9 | 7 |
import org.apache.commons.logging.LogFactory; |
10 |
import org.hibernate.Hibernate; |
|
11 | 8 |
import org.hibernate.criterion.Restrictions; |
12 | 9 |
import org.hibernate.type.StringType; |
13 | 10 |
import org.springframework.stereotype.Repository; |
... | ... | |
15 | 12 |
import java.io.ByteArrayOutputStream; |
16 | 13 |
import java.io.IOException; |
17 | 14 |
import java.io.InputStream; |
18 |
import java.math.BigInteger; |
|
19 | 15 |
import java.util.List; |
20 | 16 |
|
21 | 17 |
/** |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/UserDAO.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.dao; |
2 | 2 |
|
3 |
import eu.dnetlib.goldoa.domain.*; |
|
4 |
|
|
3 |
import eu.dnetlib.goldoa.domain.AccountAction; |
|
4 |
import eu.dnetlib.goldoa.domain.Role; |
|
5 |
import eu.dnetlib.goldoa.domain.User; |
|
6 |
import eu.dnetlib.goldoa.domain.UserRole; |
|
5 | 7 |
import org.apache.commons.codec.digest.DigestUtils; |
6 | 8 |
import org.apache.commons.logging.Log; |
7 | 9 |
import org.apache.commons.logging.LogFactory; |
8 |
import org.hibernate.CacheMode; |
|
9 | 10 |
import org.hibernate.Criteria; |
10 | 11 |
import org.hibernate.criterion.Order; |
11 | 12 |
import org.hibernate.criterion.ProjectionList; |
12 | 13 |
import org.hibernate.criterion.Projections; |
13 | 14 |
import org.hibernate.criterion.Restrictions; |
14 |
import org.hibernate.transform.AliasToBeanResultTransformer; |
|
15 | 15 |
import org.hibernate.transform.Transformers; |
16 | 16 |
import org.springframework.stereotype.Repository; |
17 | 17 |
|
18 |
import javax.persistence.Query; |
|
19 | 18 |
import java.math.BigInteger; |
20 | 19 |
import java.sql.Timestamp; |
21 |
import java.util.ArrayList; |
|
22 | 20 |
import java.util.List; |
23 | 21 |
|
24 | 22 |
/** |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/AbstractDao.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.dao; |
2 | 2 |
|
3 | 3 |
|
4 |
import java.io.Serializable; |
|
5 |
import java.lang.reflect.ParameterizedType; |
|
6 |
|
|
7 | 4 |
import org.hibernate.Criteria; |
8 | 5 |
import org.hibernate.Session; |
9 | 6 |
import org.hibernate.SessionFactory; |
10 | 7 |
import org.springframework.beans.factory.annotation.Autowired; |
11 | 8 |
|
9 |
import java.io.Serializable; |
|
10 |
import java.lang.reflect.ParameterizedType; |
|
11 |
|
|
12 | 12 |
public abstract class AbstractDao<PK extends Serializable, T> { |
13 | 13 |
|
14 | 14 |
@Autowired |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/FunderDAO.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.dao; |
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Funder; |
4 |
import eu.dnetlib.goldoa.domain.Vocabulary; |
|
5 | 4 |
import org.hibernate.criterion.MatchMode; |
6 | 5 |
import org.hibernate.criterion.Restrictions; |
7 | 6 |
import org.springframework.stereotype.Repository; |
8 | 7 |
|
9 |
|
|
10 |
import java.util.ArrayList; |
|
11 | 8 |
import java.util.List; |
12 | 9 |
|
13 | 10 |
/** |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/OrganizationDAO.java | ||
---|---|---|
1 | 1 |
|
2 | 2 |
package eu.dnetlib.goldoa.service.dao; |
3 | 3 |
|
4 |
import eu.dnetlib.goldoa.domain.*; |
|
4 |
import eu.dnetlib.goldoa.domain.Affiliation; |
|
5 |
import eu.dnetlib.goldoa.domain.Organization; |
|
6 |
import eu.dnetlib.goldoa.domain.User; |
|
5 | 7 |
import org.hibernate.Criteria; |
6 | 8 |
import org.hibernate.criterion.MatchMode; |
7 | 9 |
import org.hibernate.criterion.Restrictions; |
8 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 |
import org.springframework.jdbc.core.BatchPreparedStatementSetter; |
|
10 |
import org.springframework.jdbc.core.JdbcTemplate; |
|
11 |
import org.springframework.jdbc.core.PreparedStatementSetter; |
|
12 |
import org.springframework.jdbc.core.RowMapper; |
|
13 | 10 |
import org.springframework.stereotype.Repository; |
14 | 11 |
|
15 |
import javax.sql.DataSource; |
|
16 |
import java.sql.PreparedStatement; |
|
17 |
import java.sql.ResultSet; |
|
18 |
import java.sql.SQLException; |
|
19 |
import java.sql.Types; |
|
20 | 12 |
import java.util.ArrayList; |
21 |
import java.util.Arrays; |
|
22 | 13 |
import java.util.List; |
23 | 14 |
|
24 | 15 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/ProjectDAO.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.dao; |
2 | 2 |
|
3 |
import eu.dnetlib.goldoa.domain.*;
|
|
3 |
import eu.dnetlib.goldoa.domain.Project;
|
|
4 | 4 |
import org.hibernate.criterion.*; |
5 | 5 |
import org.hibernate.transform.Transformers; |
6 |
import org.springframework.beans.factory.annotation.Value; |
|
7 | 6 |
import org.springframework.stereotype.Repository; |
8 | 7 |
|
9 | 8 |
import java.util.ArrayList; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/HelpDAO.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Help; |
4 | 4 |
import org.hibernate.criterion.Restrictions; |
5 |
import org.springframework.beans.factory.annotation.Autowired; |
|
6 |
import org.springframework.jdbc.core.JdbcTemplate; |
|
7 |
import org.springframework.jdbc.core.RowMapper; |
|
8 | 5 |
import org.springframework.stereotype.Repository; |
9 | 6 |
|
10 |
import javax.sql.DataSource; |
|
11 |
import java.sql.ResultSet; |
|
12 |
import java.sql.SQLException; |
|
13 |
import java.sql.Types; |
|
14 | 7 |
import java.util.List; |
15 | 8 |
|
16 | 9 |
/* |
... | ... | |
19 | 12 |
@Repository |
20 | 13 |
public class HelpDAO extends AbstractDao<String,Help>{ |
21 | 14 |
|
22 |
private final static String UPDATE_HELP = "update help set name=?, text=? where id=?"; |
|
23 |
private final static String INSERT_HELP = "insert into help (name, text, id) values (?, ?, ?)"; |
|
24 |
private final static String GET_BY_ID = "select id, name, text from help where id = ?"; |
|
25 |
private final static String GET_ALL = "select id, name, text from help"; |
|
26 |
private final static String DELETE = "delete from help where id = ?"; |
|
15 |
// private final static String UPDATE_HELP = "update help set name=?, text=? where id=?";
|
|
16 |
// private final static String INSERT_HELP = "insert into help (name, text, id) values (?, ?, ?)";
|
|
17 |
// private final static String GET_BY_ID = "select id, name, text from help where id = ?";
|
|
18 |
// private final static String GET_ALL = "select id, name, text from help";
|
|
19 |
// private final static String DELETE = "delete from help where id = ?";
|
|
27 | 20 |
|
28 | 21 |
|
29 | 22 |
public Help saveHelp(Help help) { |
... | ... | |
32 | 25 |
} |
33 | 26 |
|
34 | 27 |
public Help getById(String id) { |
35 |
return (Help) createEntityCriteria().add(Restrictions.eq("id", id)).list().get(0); |
|
28 |
List<Help> res = createEntityCriteria().add(Restrictions.eq("id", id)).list(); |
|
29 |
|
|
30 |
if (!res.isEmpty()) |
|
31 |
return res.get(0); |
|
32 |
else |
|
33 |
return null; |
|
36 | 34 |
} |
37 | 35 |
@SuppressWarnings("unchecked") |
38 | 36 |
public List<Help> getAll() { |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/eligibility/OrganizationEligibilityManager.java | ||
---|---|---|
3 | 3 |
import eu.dnetlib.goldoa.domain.Budget; |
4 | 4 |
import eu.dnetlib.goldoa.domain.Eligibility; |
5 | 5 |
import eu.dnetlib.goldoa.domain.Organization; |
6 |
import eu.dnetlib.goldoa.domain.OrganizationManagerException; |
|
7 | 6 |
import eu.dnetlib.goldoa.domain.Request; |
8 | 7 |
import eu.dnetlib.goldoa.service.EligibilityManager; |
9 | 8 |
import eu.dnetlib.goldoa.service.OrganizationManager; |
10 | 9 |
import org.springframework.beans.factory.annotation.Autowired; |
11 |
import org.springframework.beans.factory.annotation.Value; |
|
12 | 10 |
import org.springframework.stereotype.Component; |
13 |
import org.springframework.stereotype.Service; |
|
14 | 11 |
|
15 | 12 |
/* |
16 | 13 |
* Created by antleb on 4/4/15. |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/Searchable.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service; |
2 | 2 |
|
3 |
import eu.dnetlib.goldoa.domain.Journal; |
|
4 |
import eu.dnetlib.goldoa.domain.Vocabulary; |
|
5 |
|
|
6 | 3 |
import java.util.List; |
7 | 4 |
|
8 | 5 |
/** |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/BudgetManagerImpl.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Budget; |
4 | 4 |
import eu.dnetlib.goldoa.domain.Organization; |
5 |
import eu.dnetlib.goldoa.domain.PersonManagerException; |
|
5 | 6 |
import eu.dnetlib.goldoa.domain.User; |
6 |
import eu.dnetlib.goldoa.domain.PersonManagerException; |
|
7 | 7 |
import eu.dnetlib.goldoa.service.dao.BudgetDAO; |
8 | 8 |
import eu.dnetlib.goldoa.service.utils.EmailUtils; |
9 | 9 |
import org.springframework.beans.factory.annotation.Autowired; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/RequestDAO.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.dao; |
2 | 2 |
|
3 | 3 |
import com.opencsv.CSVWriter; |
4 |
import com.sun.org.apache.regexp.internal.RE; |
|
5 | 4 |
import eu.dnetlib.goldoa.domain.*; |
6 |
import eu.dnetlib.goldoa.domain.RequestPage; |
|
7 | 5 |
import eu.dnetlib.goldoa.service.EligibilityManager; |
8 | 6 |
import eu.dnetlib.goldoa.service.InvoiceManager; |
9 | 7 |
import org.apache.commons.codec.digest.DigestUtils; |
... | ... | |
12 | 10 |
import org.apache.commons.logging.LogFactory; |
13 | 11 |
import org.hibernate.Criteria; |
14 | 12 |
import org.hibernate.Query; |
15 |
import org.hibernate.criterion.*; |
|
16 |
import org.hibernate.transform.AliasToBeanResultTransformer; |
|
13 |
import org.hibernate.criterion.Restrictions; |
|
14 |
import org.hibernate.type.StringType; |
|
15 |
import org.hibernate.type.Type; |
|
17 | 16 |
import org.springframework.beans.factory.annotation.Autowired; |
18 |
import org.springframework.beans.factory.annotation.Qualifier; |
|
19 | 17 |
import org.springframework.stereotype.Repository; |
20 |
import org.hibernate.type.Type; |
|
18 |
|
|
21 | 19 |
import java.io.ByteArrayOutputStream; |
22 | 20 |
import java.io.IOException; |
23 | 21 |
import java.io.InputStream; |
24 | 22 |
import java.io.StringWriter; |
25 | 23 |
import java.math.BigInteger; |
26 |
import java.sql.*;
|
|
24 |
import java.sql.Timestamp;
|
|
27 | 25 |
import java.text.SimpleDateFormat; |
28 | 26 |
import java.util.*; |
29 |
import java.util.Date; |
|
30 |
import org.hibernate.type.*; |
|
31 | 27 |
|
32 | 28 |
/* |
33 | 29 |
* Created by antleb on 3/30/15. |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/PublicationDAO.java | ||
---|---|---|
1 | 1 |
|
2 | 2 |
package eu.dnetlib.goldoa.service.dao; |
3 | 3 |
|
4 |
import eu.dnetlib.goldoa.domain.*; |
|
5 |
import eu.dnetlib.goldoa.service.PublicationManagerImpl; |
|
6 |
import eu.dnetlib.goldoa.service.UserManagerImpl; |
|
4 |
import eu.dnetlib.goldoa.domain.Author; |
|
5 |
import eu.dnetlib.goldoa.domain.Publication; |
|
7 | 6 |
import org.apache.commons.codec.digest.DigestUtils; |
8 | 7 |
import org.apache.log4j.Logger; |
9 | 8 |
import org.hibernate.criterion.Restrictions; |
10 |
import org.springframework.beans.factory.annotation.Autowired; |
|
11 |
import org.springframework.jdbc.core.BatchPreparedStatementSetter; |
|
12 | 9 |
import org.springframework.stereotype.Repository; |
13 | 10 |
|
14 |
import javax.sql.DataSource; |
|
15 | 11 |
import java.math.BigInteger; |
16 |
import java.sql.PreparedStatement; |
|
17 |
import java.sql.ResultSet; |
|
18 |
import java.sql.SQLException; |
|
19 |
import java.sql.Types; |
|
20 |
import java.util.ArrayList; |
|
21 | 12 |
import java.util.List; |
22 | 13 |
|
23 | 14 |
@Repository |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/dao/BudgetDAO.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.dao; |
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.*; |
4 |
//import eu.dnetlib.goldoa.domain.BankAccount; |
|
5 | 4 |
import org.apache.commons.codec.digest.DigestUtils; |
6 | 5 |
import org.apache.commons.io.IOUtils; |
7 |
import org.hibernate.Criteria; |
|
8 | 6 |
import org.hibernate.criterion.Order; |
9 | 7 |
import org.hibernate.criterion.Restrictions; |
10 | 8 |
import org.springframework.stereotype.Repository; |
11 | 9 |
|
12 |
|
|
13 | 10 |
import java.io.ByteArrayOutputStream; |
14 | 11 |
import java.io.IOException; |
15 | 12 |
import java.io.InputStream; |
... | ... | |
19 | 16 |
import java.util.List; |
20 | 17 |
import java.util.UUID; |
21 | 18 |
|
19 |
//import eu.dnetlib.goldoa.domain.BankAccount; |
|
20 |
|
|
22 | 21 |
/* |
23 | 22 |
* Created by antleb on 4/2/15. |
24 | 23 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/RequestManager.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
//import eu.dnetlib.goldoa.domain.BankTransferReceipt; |
4 | 4 |
//import eu.dnetlib.goldoa.domain.CommentTemplate; |
5 |
|
|
5 | 6 |
import eu.dnetlib.goldoa.domain.*; |
7 |
|
|
8 |
import java.io.InputStream; |
|
9 |
import java.math.BigInteger; |
|
10 |
import java.util.Date; |
|
11 |
import java.util.List; |
|
12 |
|
|
6 | 13 |
//import eu.dnetlib.goldoa.domain.RequestFilter; |
7 | 14 |
//import eu.dnetlib.goldoa.domain.RequestInfo; |
8 | 15 |
//import eu.dnetlib.goldoa.domain.RequestInfoPage; |
... | ... | |
10 | 17 |
//import eu.dnetlib.goldoa.domain.RequestSort; |
11 | 18 |
//import eu.dnetlib.goldoa.domain.RequestSortOrder; |
12 | 19 |
|
13 |
import java.io.InputStream; |
|
14 |
import java.math.BigInteger; |
|
15 |
import java.util.Date; |
|
16 |
import java.util.List; |
|
17 |
|
|
18 | 20 |
/** |
19 | 21 |
* Created by antleb on 3/10/15. |
20 | 22 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/UserManagerImpl.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
|
4 | 4 |
import eu.dnetlib.goldoa.domain.*; |
5 |
|
|
6 | 5 |
import eu.dnetlib.goldoa.service.dao.UserDAO; |
7 | 6 |
import eu.dnetlib.goldoa.service.utils.EmailUtils; |
8 | 7 |
import org.apache.commons.codec.digest.DigestUtils; |
9 | 8 |
import org.apache.commons.logging.Log; |
10 | 9 |
import org.apache.commons.logging.LogFactory; |
11 |
import org.hibernate.Hibernate; |
|
12 | 10 |
import org.springframework.beans.factory.annotation.Autowired; |
13 | 11 |
import org.springframework.stereotype.Service; |
14 | 12 |
import org.springframework.transaction.annotation.Transactional; |
... | ... | |
143 | 141 |
@Override |
144 | 142 |
public User login(String email, String password) throws PersonManagerException { |
145 | 143 |
|
146 |
if (userDAO.verifyLogin(email, password)) { |
|
147 |
User user = getByEmail(email); |
|
148 |
if (user.isActive()) |
|
149 |
return user; |
|
150 |
else |
|
151 |
throw new PersonManagerException(PersonManagerException.ErrorCause.NOT_ACTIVATED); |
|
152 |
} else { |
|
153 |
throw new PersonManagerException(PersonManagerException.ErrorCause.WRONG_EMAIL_OR_PASSWORD); |
|
144 |
try { |
|
145 |
if (userDAO.verifyLogin(email, password)) { |
|
146 |
System.out.println("verified login"); |
|
147 |
User user = getByEmail(email); |
|
148 |
if (user.isActive()) { |
|
149 |
System.out.println("user is active"); |
|
150 |
return user; |
|
151 |
} |
|
152 |
else |
|
153 |
throw new PersonManagerException(PersonManagerException.ErrorCause.NOT_ACTIVATED); |
|
154 |
} else { |
|
155 |
throw new PersonManagerException(PersonManagerException.ErrorCause.WRONG_EMAIL_OR_PASSWORD); |
|
156 |
} |
|
157 |
} catch (PersonManagerException e) { |
|
158 |
throw e; |
|
159 |
} catch (Exception e) { |
|
160 |
log.error("Error logging in", e); |
|
154 | 161 |
} |
162 |
return null; |
|
155 | 163 |
} |
156 | 164 |
|
157 | 165 |
@Override |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/UserManager.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service; |
2 | 2 |
|
3 |
import eu.dnetlib.goldoa.domain.User; |
|
4 | 3 |
import eu.dnetlib.goldoa.domain.PersonManagerException; |
5 | 4 |
import eu.dnetlib.goldoa.domain.Role; |
5 |
import eu.dnetlib.goldoa.domain.User; |
|
6 | 6 |
|
7 | 7 |
import java.util.List; |
8 | 8 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/stats/StatsManagerImpl.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.service.stats; |
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.domain.Request; |
4 |
import eu.dnetlib.goldoa.domain.PublicationType; |
|
5 |
import eu.dnetlib.goldoa.domain.stats.Browse; |
|
6 |
import eu.dnetlib.goldoa.domain.stats.DateSeries; |
|
7 |
import eu.dnetlib.goldoa.domain.stats.MapData; |
|
8 |
import eu.dnetlib.goldoa.domain.stats.Numbers; |
|
9 |
import eu.dnetlib.goldoa.domain.stats.Quadruple; |
|
10 |
import eu.dnetlib.goldoa.domain.stats.Series; |
|
11 |
import eu.dnetlib.goldoa.domain.stats.Triple; |
|
4 |
import eu.dnetlib.goldoa.domain.stats.*; |
|
12 | 5 |
import eu.dnetlib.goldoa.service.RequestManager; |
13 | 6 |
import org.apache.log4j.Logger; |
14 | 7 |
import org.hibernate.SessionFactory; |
... | ... | |
18 | 11 |
|
19 | 12 |
import java.text.ParseException; |
20 | 13 |
import java.text.SimpleDateFormat; |
21 |
import java.util.ArrayList; |
|
22 |
import java.util.Date; |
|
23 |
import java.util.HashMap; |
|
24 |
import java.util.List; |
|
25 |
import java.util.Map; |
|
14 |
import java.util.*; |
|
26 | 15 |
|
27 | 16 |
/* |
28 | 17 |
* Created by antleb on 11/19/15. |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/utils/EmailUtilsLogger.java | ||
---|---|---|
4 | 4 |
import org.aspectj.lang.annotation.Around; |
5 | 5 |
import org.aspectj.lang.annotation.Aspect; |
6 | 6 |
import org.springframework.beans.factory.annotation.Autowired; |
7 |
import org.springframework.beans.factory.annotation.Value; |
|
8 | 7 |
import org.springframework.stereotype.Component; |
9 | 8 |
|
10 | 9 |
import javax.mail.MessagingException; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/utils/Scheduler.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import eu.dnetlib.goldoa.service.PublicationManager; |
4 | 4 |
import org.springframework.beans.factory.annotation.Autowired; |
5 |
import org.springframework.stereotype.Component; |
|
6 | 5 |
|
7 | 6 |
import javax.annotation.PostConstruct; |
8 | 7 |
import javax.sql.DataSource; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/eligibility/ChainEligibilityManager.java | ||
---|---|---|
3 | 3 |
import eu.dnetlib.goldoa.domain.Eligibility; |
4 | 4 |
import eu.dnetlib.goldoa.domain.Request; |
5 | 5 |
import eu.dnetlib.goldoa.service.EligibilityManager; |
6 |
import jdk.nashorn.internal.objects.annotations.Property; |
|
7 | 6 |
import org.springframework.beans.factory.annotation.Autowired; |
8 | 7 |
import org.springframework.context.annotation.Primary; |
9 | 8 |
import org.springframework.stereotype.Component; |
10 |
import org.springframework.stereotype.Service; |
|
11 | 9 |
|
12 |
import javax.annotation.Resource; |
|
13 | 10 |
import java.util.ArrayList; |
14 | 11 |
import java.util.List; |
15 | 12 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/eligibility/AccountingEligibilityManager.java | ||
---|---|---|
8 | 8 |
import eu.dnetlib.goldoa.service.EligibilityManager; |
9 | 9 |
import eu.dnetlib.goldoa.service.dao.PublicationDAO; |
10 | 10 |
import org.springframework.beans.factory.annotation.Autowired; |
11 |
import org.springframework.beans.factory.annotation.Value; |
|
12 |
import org.springframework.context.annotation.Bean; |
|
13 |
import org.springframework.core.env.Environment; |
|
14 | 11 |
import org.springframework.stereotype.Component; |
15 |
import org.springframework.stereotype.Service; |
|
16 | 12 |
|
17 | 13 |
/* |
18 | 14 |
* Created by antleb on 3/25/15. |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/service/eligibility/PublicationEligibilityManager.java | ||
---|---|---|
3 | 3 |
import eu.dnetlib.goldoa.domain.Eligibility; |
4 | 4 |
import eu.dnetlib.goldoa.domain.Request; |
5 | 5 |
import eu.dnetlib.goldoa.service.EligibilityManager; |
6 |
import eu.dnetlib.goldoa.service.UserManager; |
|
7 |
import eu.dnetlib.goldoa.service.PublicationManager; |
|
8 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 | 6 |
import org.springframework.stereotype.Component; |
10 |
import org.springframework.stereotype.Service; |
|
11 | 7 |
|
12 | 8 |
/* |
13 | 9 |
* Created by antleb on 5/8/15. |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/PublisherDiscount.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import java.io.Serializable; |
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
4 |
|
|
4 | 5 |
import javax.persistence.*; |
5 | 6 |
|
6 | 7 |
|
... | ... | |
11 | 12 |
joinColumns = @JoinColumn(name = "publisher")), |
12 | 13 |
@AssociationOverride(name = "pk.organization", |
13 | 14 |
joinColumns = @JoinColumn(name = "organization")) }) |
14 |
public class PublisherDiscount implements Serializable{ |
|
15 |
public class PublisherDiscount implements IsSerializable{
|
|
15 | 16 |
|
16 | 17 |
private static final long serialVersionUID = 1L; |
17 | 18 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/RequestCoFunder.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import java.io.Serializable; |
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
4 |
|
|
4 | 5 |
import javax.persistence.*; |
5 | 6 |
|
6 | 7 |
|
... | ... | |
11 | 12 |
joinColumns = @JoinColumn(name = "funder")), |
12 | 13 |
@AssociationOverride(name = "pk.request", |
13 | 14 |
joinColumns = @JoinColumn(name = "request")) }) |
14 |
public class RequestCoFunder implements Serializable { |
|
15 |
public class RequestCoFunder implements IsSerializable {
|
|
15 | 16 |
private static final long serialVersionUID = 1L; |
16 | 17 |
|
17 | 18 |
@EmbeddedId |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Identifier.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 | 3 |
import com.fasterxml.jackson.annotation.JsonBackReference; |
4 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
4 | 5 |
|
5 |
import java.io.Serializable;
|
|
6 |
import javax.persistence.*;
|
|
6 | 7 |
import java.math.BigInteger; |
7 | 8 |
import java.util.ArrayList; |
8 | 9 |
import java.util.List; |
9 |
import javax.persistence.*; |
|
10 | 10 |
|
11 | 11 |
|
12 | 12 |
/** |
... | ... | |
15 | 15 |
*/ |
16 | 16 |
@Entity |
17 | 17 |
@Table(name="identifier") |
18 |
public class Identifier implements Serializable { |
|
18 |
public class Identifier implements IsSerializable {
|
|
19 | 19 |
private static final long serialVersionUID = 1L; |
20 | 20 |
|
21 | 21 |
@Id |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Currency.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import com.google.gwt.user.client.rpc.IsSerializable; |
4 | 4 |
|
5 |
import java.util.HashMap; |
|
6 |
|
|
7 | 5 |
/** |
8 | 6 |
* Created by antleb on 5/4/15. |
9 | 7 |
*/ |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/UserRole.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import com.fasterxml.jackson.annotation.JsonBackReference; |
|
4 |
import org.hibernate.annotations.*; |
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
5 | 4 |
import org.hibernate.annotations.Cache; |
5 |
import org.hibernate.annotations.CacheConcurrencyStrategy; |
|
6 | 6 |
|
7 |
import java.io.Serializable; |
|
8 |
|
|
9 | 7 |
import javax.persistence.*; |
10 |
import javax.persistence.Entity; |
|
11 |
import javax.persistence.Table; |
|
12 | 8 |
|
13 | 9 |
@Entity |
14 | 10 |
@Table(name="user_role") |
... | ... | |
18 | 14 |
joinColumns = @JoinColumn(name = "email")), |
19 | 15 |
@AssociationOverride(name = "pk.role", |
20 | 16 |
joinColumns = @JoinColumn(name = "id")) }) |
21 |
public class UserRole implements Serializable{ |
|
17 |
public class UserRole implements IsSerializable{
|
|
22 | 18 |
|
23 | 19 |
private static final long serialVersionUID = 1L; |
24 | 20 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Project.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 | 3 |
import com.fasterxml.jackson.annotation.JsonBackReference; |
4 |
import org.hibernate.annotations.*; |
|
5 |
import org.hibernate.annotations.Cache; |
|
4 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
6 | 5 |
|
7 |
import java.io.Serializable; |
|
8 | 6 |
import javax.persistence.*; |
9 |
import javax.persistence.CascadeType; |
|
10 |
import javax.persistence.Entity; |
|
11 | 7 |
import java.sql.Timestamp; |
12 | 8 |
import java.util.ArrayList; |
13 | 9 |
import java.util.List; |
... | ... | |
18 | 14 |
* |
19 | 15 |
*/ |
20 | 16 |
@Entity |
21 |
public class Project implements Serializable { |
|
17 |
public class Project implements IsSerializable {
|
|
22 | 18 |
private static final long serialVersionUID = 1L; |
23 | 19 |
@Id |
24 | 20 |
@Column(columnDefinition = "text") |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/JournalDiscountPK.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
4 |
|
|
3 | 5 |
import javax.persistence.ManyToOne; |
4 | 6 |
import java.io.Serializable; |
5 | 7 |
|
6 | 8 |
/** |
7 | 9 |
* Created by panagiotis on 24/1/2017. |
8 | 10 |
*/ |
9 |
public class JournalDiscountPK implements Serializable { |
|
11 |
public class JournalDiscountPK implements IsSerializable, Serializable {
|
|
10 | 12 |
|
11 | 13 |
private static final long serialVersionUID = 1L; |
12 | 14 |
|
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Organization.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 | 3 |
import com.fasterxml.jackson.annotation.JsonBackReference; |
4 |
import org.hibernate.annotations.*;
|
|
4 |
import com.google.gwt.user.client.rpc.IsSerializable;
|
|
5 | 5 |
import org.hibernate.annotations.Cache; |
6 |
import org.hibernate.annotations.CacheConcurrencyStrategy; |
|
6 | 7 |
|
7 |
import java.io.Serializable;
|
|
8 |
import javax.persistence.*;
|
|
8 | 9 |
import java.util.ArrayList; |
9 | 10 |
import java.util.List; |
10 | 11 |
|
11 |
import javax.persistence.*; |
|
12 |
import javax.persistence.Entity; |
|
13 | 12 |
|
14 |
|
|
15 | 13 |
@Entity |
16 | 14 |
@Cache(usage= CacheConcurrencyStrategy.READ_ONLY,region = "user") |
17 |
public class Organization implements Serializable { |
|
15 |
public class Organization implements IsSerializable {
|
|
18 | 16 |
private static final long serialVersionUID = 1L; |
19 | 17 |
|
20 | 18 |
@Id |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Budgetfile.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import com.fasterxml.jackson.annotation.JsonBackReference;
|
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable;
|
|
4 | 4 |
|
5 |
import java.io.Serializable; |
|
6 |
import javax.persistence.*; |
|
5 |
import javax.persistence.Column; |
|
6 |
import javax.persistence.Entity; |
|
7 |
import javax.persistence.Id; |
|
7 | 8 |
|
8 | 9 |
|
9 | 10 |
/** |
... | ... | |
11 | 12 |
* |
12 | 13 |
*/ |
13 | 14 |
@Entity |
14 |
public class Budgetfile implements Serializable { |
|
15 |
public class Budgetfile implements IsSerializable {
|
|
15 | 16 |
private static final long serialVersionUID = 1L; |
16 | 17 |
|
17 | 18 |
private byte[] content; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/HIbernateDomainConverter.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import com.fasterxml.jackson.core.type.TypeReference; |
|
4 |
import com.fasterxml.jackson.databind.JavaType; |
|
5 |
import com.fasterxml.jackson.databind.JsonNode; |
|
6 | 3 |
import com.fasterxml.jackson.databind.ObjectMapper; |
7 |
import com.fasterxml.jackson.databind.node.ObjectNode; |
|
8 | 4 |
import com.fasterxml.jackson.databind.type.TypeFactory; |
9 | 5 |
import eu.dnetlib.goldoa.service.dao.UserDAO; |
10 |
|
|
11 | 6 |
import org.apache.commons.logging.Log; |
12 | 7 |
import org.apache.commons.logging.LogFactory; |
13 | 8 |
import org.aspectj.lang.ProceedingJoinPoint; |
14 |
import org.aspectj.lang.Signature; |
|
15 | 9 |
import org.aspectj.lang.annotation.Around; |
16 | 10 |
import org.aspectj.lang.annotation.Aspect; |
17 | 11 |
import org.aspectj.lang.reflect.MethodSignature; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/AccountAction.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import java.io.Serializable; |
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
4 |
|
|
4 | 5 |
import javax.persistence.*; |
5 | 6 |
import java.math.BigInteger; |
6 | 7 |
import java.sql.Timestamp; |
... | ... | |
12 | 13 |
*/ |
13 | 14 |
@Entity |
14 | 15 |
@Table(name="account_action") |
15 |
public class AccountAction implements Serializable { |
|
16 |
public class AccountAction implements IsSerializable {
|
|
16 | 17 |
private static final long serialVersionUID = 1L; |
17 | 18 |
|
18 | 19 |
@Id |
19 |
@Column(columnDefinition = "text")
|
|
20 |
@Column |
|
20 | 21 |
private BigInteger id; |
21 | 22 |
|
22 | 23 |
private Timestamp date; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/CommentTemplate.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import java.io.Serializable; |
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
4 |
|
|
4 | 5 |
import javax.persistence.*; |
5 | 6 |
|
6 | 7 |
|
... | ... | |
9 | 10 |
* |
10 | 11 |
*/ |
11 | 12 |
@Entity |
12 |
public class CommentTemplate implements Serializable { |
|
13 |
public class CommentTemplate implements IsSerializable {
|
|
13 | 14 |
private static final long serialVersionUID = 1L; |
14 | 15 |
|
15 | 16 |
@Id |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Country.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import org.hibernate.annotations.*;
|
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable;
|
|
4 | 4 |
import org.hibernate.annotations.Cache; |
5 |
import org.hibernate.annotations.CacheConcurrencyStrategy; |
|
5 | 6 |
|
6 |
import java.io.Serializable; |
|
7 |
import javax.persistence.*; |
|
7 |
import javax.persistence.Column; |
|
8 | 8 |
import javax.persistence.Entity; |
9 |
import javax.persistence.Id; |
|
9 | 10 |
|
10 | 11 |
|
11 | 12 |
/** |
... | ... | |
14 | 15 |
*/ |
15 | 16 |
@Entity |
16 | 17 |
@Cache(usage= CacheConcurrencyStrategy.READ_WRITE,region = "user") |
17 |
public class Country implements Serializable { |
|
18 |
public class Country implements IsSerializable {
|
|
18 | 19 |
private static final long serialVersionUID = 1L; |
19 | 20 |
@Id |
20 | 21 |
@Column(columnDefinition = "text") |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Budget.java | ||
---|---|---|
3 | 3 |
import com.fasterxml.jackson.annotation.JsonBackReference; |
4 | 4 |
import com.google.gwt.user.client.rpc.IsSerializable; |
5 | 5 |
|
6 |
import java.io.Serializable; |
|
7 | 6 |
import javax.persistence.*; |
8 |
|
|
7 |
import java.sql.Timestamp; |
|
9 | 8 |
import java.util.ArrayList; |
10 | 9 |
import java.util.Date; |
11 | 10 |
import java.util.List; |
12 |
import java.sql.Timestamp; |
|
13 | 11 |
|
14 | 12 |
@Entity |
15 |
public class Budget implements Serializable { |
|
13 |
public class Budget implements IsSerializable {
|
|
16 | 14 |
private static final long serialVersionUID = 1L; |
17 | 15 |
|
18 | 16 |
public enum Status implements IsSerializable { |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Comment.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 | 3 |
import com.fasterxml.jackson.annotation.JsonBackReference; |
4 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
4 | 5 |
|
5 |
import java.io.Serializable; |
|
6 | 6 |
import javax.persistence.*; |
7 |
import java.sql.Time; |
|
8 | 7 |
import java.sql.Timestamp; |
9 | 8 |
import java.util.ArrayList; |
10 |
import java.util.Date; |
|
11 | 9 |
import java.util.List; |
12 | 10 |
|
13 | 11 |
|
... | ... | |
16 | 14 |
* |
17 | 15 |
*/ |
18 | 16 |
@Entity |
19 |
public class Comment implements Serializable { |
|
17 |
public class Comment implements IsSerializable {
|
|
20 | 18 |
private static final long serialVersionUID = 1L; |
21 | 19 |
|
22 | 20 |
@Column(columnDefinition = "text") |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Journal.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import com.fasterxml.jackson.annotation.JsonBackReference;
|
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable;
|
|
4 | 4 |
|
5 |
import java.io.Serializable;
|
|
5 |
import javax.persistence.*;
|
|
6 | 6 |
import java.util.ArrayList; |
7 | 7 |
import java.util.List; |
8 | 8 |
|
9 |
import javax.persistence.*; |
|
10 | 9 |
|
11 |
|
|
12 | 10 |
/** |
13 | 11 |
* The persistent class for the journal database table. |
14 | 12 |
* |
15 | 13 |
*/ |
16 | 14 |
@Entity |
17 | 15 |
@NamedQuery(name="Journal.findAll", query="SELECT j FROM Journal j") |
18 |
public class Journal implements Serializable { |
|
16 |
public class Journal implements IsSerializable {
|
|
19 | 17 |
private static final long serialVersionUID = 1L; |
20 | 18 |
|
21 | 19 |
@Id |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/File.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 |
import java.io.Serializable; |
|
4 |
import java.math.BigInteger; |
|
5 |
import javax.persistence.*; |
|
3 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
6 | 4 |
|
5 |
import javax.persistence.Column; |
|
6 |
import javax.persistence.Entity; |
|
7 |
import javax.persistence.Id; |
|
7 | 8 |
|
9 |
|
|
8 | 10 |
/** |
9 | 11 |
* The persistent class for the file database table. |
10 | 12 |
* |
11 | 13 |
*/ |
12 | 14 |
@Entity |
13 |
public class File implements Serializable { |
|
15 |
public class File implements IsSerializable {
|
|
14 | 16 |
private static final long serialVersionUID = 1L; |
15 | 17 |
@Id |
16 | 18 |
private String id; |
modules/uoa-goldoa-service/branches/hibernate/src/main/java/eu/dnetlib/goldoa/domain/Affiliation.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.goldoa.domain; |
2 | 2 |
|
3 | 3 |
import com.fasterxml.jackson.annotation.JsonBackReference; |
4 |
import org.hibernate.annotations.*; |
|
5 |
import org.hibernate.annotations.Cache; |
|
4 |
import com.google.gwt.user.client.rpc.IsSerializable; |
|
6 | 5 |
|
7 |
import java.io.Serializable; |
|
8 | 6 |
import javax.persistence.*; |
9 |
import javax.persistence.Entity; |
|
10 |
import javax.persistence.Table; |
|
11 | 7 |
import java.sql.Timestamp; |
12 | 8 |
import java.util.ArrayList; |
13 | 9 |
import java.util.List; |
14 | 10 |
|
15 |
|
|
16 | 11 |
@Entity |
17 | 12 |
@Table(name="Affiliation") |
18 |
public class Affiliation implements Serializable { |
|
13 |
public class Affiliation implements IsSerializable {
|
|
19 | 14 |
private static final long serialVersionUID = 1L; |
20 | 15 |
|
21 | 16 |
@Id |
Also available in: Unified diff
- Fixed duplicate dependncies
- Fixed an error in eligibility checking
- Fixed an error in account activation
- Organized imports