Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of https://github.com/gpuliyar/oss-scrum

  • Loading branch information...
commit e17fba572d3f57facc2441b6c627d1b511949754 2 parents 88f8ca9 + 5730b66
Rishabh Rao rishabhsrao authored
6 pom.xml
@@ -62,6 +62,12 @@
62 62 <version>${spring.version}</version>
63 63 </dependency>
64 64
  65 + <dependency>
  66 + <groupId>org.springframework.security</groupId>
  67 + <artifactId>spring-security-core</artifactId>
  68 + <version>${spring.version}</version>
  69 + </dependency>
  70 +
65 71 <!-- JSF library -->
66 72 <dependency>
67 73 <groupId>com.sun.faces</groupId>
8 src/main/java/oss/process/scrum/managed/bean/OrganizationManagedBean.java
@@ -10,7 +10,7 @@
10 10
11 11 import oss.process.scrum.domain.Organization;
12 12 import oss.process.scrum.exception.AppException;
13   -import oss.process.scrum.service.IOrganizationService;
  13 +import oss.process.scrum.service.OrganizationService;
14 14
15 15 @ManagedBean(name = "organizationManagedBean")
16 16 @RequestScoped
@@ -20,18 +20,18 @@
20 20 private static final String ERROR = "error";
21 21
22 22 @ManagedProperty(value = "#{organizationService}")
23   - private IOrganizationService organizationService;
  23 + private OrganizationService organizationService;
24 24 /**
25 25 * @return the organizationService
26 26 */
27   - public IOrganizationService getOrganizationService() {
  27 + public OrganizationService getOrganizationService() {
28 28 return organizationService;
29 29 }
30 30
31 31 /**
32 32 * @param organizationService the organizationService to set
33 33 */
34   - public void setOrganizationService(IOrganizationService organizationService) {
  34 + public void setOrganizationService(OrganizationService organizationService) {
35 35 this.organizationService = organizationService;
36 36 }
37 37
15 src/main/java/oss/process/scrum/service/IOrganizationService.java
... ... @@ -1,15 +0,0 @@
1   -package oss.process.scrum.service;
2   -
3   -import java.util.List;
4   -
5   -import oss.process.scrum.domain.Organization;
6   -import oss.process.scrum.exception.AppException;
7   -
8   -public interface IOrganizationService {
9   - void create(Organization data) throws AppException;
10   - void update(Organization data) throws AppException;
11   - void delete(Organization data) throws AppException;
12   - Organization retrieveById(String id) throws AppException;
13   - List<Organization> retrieveByExample(Organization data) throws AppException;
14   - List<Organization> retrieveAll() throws AppException;
15   -}
76 src/main/java/oss/process/scrum/service/OrganizationService.java
... ... @@ -1,77 +1,15 @@
1 1 package oss.process.scrum.service;
2 2
3   -import java.util.ArrayList;
4 3 import java.util.List;
5 4
6   -import javax.annotation.Resource;
7   -
8   -import org.springframework.stereotype.Service;
9   -import org.springframework.transaction.annotation.Transactional;
10   -
11   -import oss.process.scrum.dao.model.IDao;
12   -import oss.process.scrum.dao.vo.ScrOrganization;
13 5 import oss.process.scrum.domain.Organization;
14 6 import oss.process.scrum.exception.AppException;
15   -import oss.process.scrum.mapper.IMapper;
16   -
17   -@Service(value = "organizationService")
18   -@Transactional
19   -public class OrganizationService implements IOrganizationService {
20   - @Resource(name = "scrOrganizationDao")
21   - private IDao<ScrOrganization, String> organizationDao;
22   - @Resource(name = "organizationToScrOrganizationMapper")
23   - private IMapper<Organization, ScrOrganization> orgToScrOrgMapper;
24   - @Resource(name = "scrOrganizationToOrganizationMapper")
25   - private IMapper<ScrOrganization, Organization> scrOrgToOrgMapper;
26   -
27   - @Override
28   - public void create(Organization data) throws AppException {
29   - ScrOrganization scrOrganization = orgToScrOrgMapper.map(data);
30   - organizationDao.persist(scrOrganization);
31   - }
32   -
33   - @Override
34   - public void update(Organization data) throws AppException {
35   - ScrOrganization scrOrganization = orgToScrOrgMapper.map(data);
36   - organizationDao.persist(scrOrganization);
37   - }
38   -
39   - @Override
40   - public void delete(Organization data) throws AppException {
41   - ScrOrganization scrOrganization = orgToScrOrgMapper.map(data);
42   - organizationDao.delete(scrOrganization);
43   - }
44   -
45   - @Override
46   - public Organization retrieveById(String id) throws AppException {
47   - ScrOrganization scrOrganization = organizationDao.findById(id);
48   - Organization organization = scrOrgToOrgMapper.map(scrOrganization);
49   - return organization;
50   - }
51   -
52   - @Override
53   - public List<Organization> retrieveByExample(Organization data) throws AppException {
54   - ScrOrganization scrOrganization = orgToScrOrgMapper.map(data);
55   - List<ScrOrganization> scrOrganizations = organizationDao.findByExample(scrOrganization);
56   - List<Organization> organizations = new ArrayList<Organization>();
57   -
58   - for (ScrOrganization scrOrganization2 : scrOrganizations) {
59   - organizations.add(scrOrgToOrgMapper.map(scrOrganization2));
60   - }
61   -
62   - return organizations;
63   - }
64   -
65   - @Override
66   - public List<Organization> retrieveAll() throws AppException {
67   - ScrOrganization scrOrganization = new ScrOrganization();
68   - List<ScrOrganization> scrOrganizations = organizationDao.findByExample(scrOrganization);
69   - List<Organization> organizations = new ArrayList<Organization>();
70   -
71   - for (ScrOrganization scrOrganization2 : scrOrganizations) {
72   - organizations.add(scrOrgToOrgMapper.map(scrOrganization2));
73   - }
74 7
75   - return organizations;
76   - }
  8 +public interface OrganizationService {
  9 + void create(Organization data) throws AppException;
  10 + void update(Organization data) throws AppException;
  11 + void delete(Organization data) throws AppException;
  12 + Organization retrieveById(String id) throws AppException;
  13 + List<Organization> retrieveByExample(Organization data) throws AppException;
  14 + List<Organization> retrieveAll() throws AppException;
77 15 }

0 comments on commit e17fba5

Please sign in to comment.
Something went wrong with that request. Please try again.