Skip to content
Browse files

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

  • Loading branch information...
2 parents 88f8ca9 + 5730b66 commit e17fba572d3f57facc2441b6c627d1b511949754 @rishabhsrao rishabhsrao committed Dec 13, 2012
View
6 pom.xml
@@ -62,6 +62,12 @@
<version>${spring.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-core</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+
<!-- JSF library -->
<dependency>
<groupId>com.sun.faces</groupId>
View
8 src/main/java/oss/process/scrum/managed/bean/OrganizationManagedBean.java
@@ -10,7 +10,7 @@
import oss.process.scrum.domain.Organization;
import oss.process.scrum.exception.AppException;
-import oss.process.scrum.service.IOrganizationService;
+import oss.process.scrum.service.OrganizationService;
@ManagedBean(name = "organizationManagedBean")
@RequestScoped
@@ -20,18 +20,18 @@
private static final String ERROR = "error";
@ManagedProperty(value = "#{organizationService}")
- private IOrganizationService organizationService;
+ private OrganizationService organizationService;
/**
* @return the organizationService
*/
- public IOrganizationService getOrganizationService() {
+ public OrganizationService getOrganizationService() {
return organizationService;
}
/**
* @param organizationService the organizationService to set
*/
- public void setOrganizationService(IOrganizationService organizationService) {
+ public void setOrganizationService(OrganizationService organizationService) {
this.organizationService = organizationService;
}
View
15 src/main/java/oss/process/scrum/service/IOrganizationService.java
@@ -1,15 +0,0 @@
-package oss.process.scrum.service;
-
-import java.util.List;
-
-import oss.process.scrum.domain.Organization;
-import oss.process.scrum.exception.AppException;
-
-public interface IOrganizationService {
- void create(Organization data) throws AppException;
- void update(Organization data) throws AppException;
- void delete(Organization data) throws AppException;
- Organization retrieveById(String id) throws AppException;
- List<Organization> retrieveByExample(Organization data) throws AppException;
- List<Organization> retrieveAll() throws AppException;
-}
View
76 src/main/java/oss/process/scrum/service/OrganizationService.java
@@ -1,77 +1,15 @@
package oss.process.scrum.service;
-import java.util.ArrayList;
import java.util.List;
-import javax.annotation.Resource;
-
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import oss.process.scrum.dao.model.IDao;
-import oss.process.scrum.dao.vo.ScrOrganization;
import oss.process.scrum.domain.Organization;
import oss.process.scrum.exception.AppException;
-import oss.process.scrum.mapper.IMapper;
-
-@Service(value = "organizationService")
-@Transactional
-public class OrganizationService implements IOrganizationService {
- @Resource(name = "scrOrganizationDao")
- private IDao<ScrOrganization, String> organizationDao;
- @Resource(name = "organizationToScrOrganizationMapper")
- private IMapper<Organization, ScrOrganization> orgToScrOrgMapper;
- @Resource(name = "scrOrganizationToOrganizationMapper")
- private IMapper<ScrOrganization, Organization> scrOrgToOrgMapper;
-
- @Override
- public void create(Organization data) throws AppException {
- ScrOrganization scrOrganization = orgToScrOrgMapper.map(data);
- organizationDao.persist(scrOrganization);
- }
-
- @Override
- public void update(Organization data) throws AppException {
- ScrOrganization scrOrganization = orgToScrOrgMapper.map(data);
- organizationDao.persist(scrOrganization);
- }
-
- @Override
- public void delete(Organization data) throws AppException {
- ScrOrganization scrOrganization = orgToScrOrgMapper.map(data);
- organizationDao.delete(scrOrganization);
- }
-
- @Override
- public Organization retrieveById(String id) throws AppException {
- ScrOrganization scrOrganization = organizationDao.findById(id);
- Organization organization = scrOrgToOrgMapper.map(scrOrganization);
- return organization;
- }
-
- @Override
- public List<Organization> retrieveByExample(Organization data) throws AppException {
- ScrOrganization scrOrganization = orgToScrOrgMapper.map(data);
- List<ScrOrganization> scrOrganizations = organizationDao.findByExample(scrOrganization);
- List<Organization> organizations = new ArrayList<Organization>();
-
- for (ScrOrganization scrOrganization2 : scrOrganizations) {
- organizations.add(scrOrgToOrgMapper.map(scrOrganization2));
- }
-
- return organizations;
- }
-
- @Override
- public List<Organization> retrieveAll() throws AppException {
- ScrOrganization scrOrganization = new ScrOrganization();
- List<ScrOrganization> scrOrganizations = organizationDao.findByExample(scrOrganization);
- List<Organization> organizations = new ArrayList<Organization>();
-
- for (ScrOrganization scrOrganization2 : scrOrganizations) {
- organizations.add(scrOrgToOrgMapper.map(scrOrganization2));
- }
- return organizations;
- }
+public interface OrganizationService {
+ void create(Organization data) throws AppException;
+ void update(Organization data) throws AppException;
+ void delete(Organization data) throws AppException;
+ Organization retrieveById(String id) throws AppException;
+ List<Organization> retrieveByExample(Organization data) throws AppException;
+ List<Organization> retrieveAll() throws AppException;
}

0 comments on commit e17fba5

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