This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.inbrand.model; | |
import java.io.Serializable; | |
import java.util.Collection; | |
import java.util.Date; | |
import java.util.Map; | |
import java.util.Set; | |
import javax.persistence.CascadeType; | |
import javax.persistence.Column; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.inbrand.service.impl; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.Set; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import org.dom4j.DocumentException; | |
import org.springframework.transaction.annotation.Transactional; | |
import uk.co.inbrand.dao.AddressDao; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package uk.co.inbrand.service.impl; | |
import uk.co.inbrand.dao.UserRolesDao; | |
import uk.co.inbrand.dto.UserRolesBase; | |
import uk.co.inbrand.model.UserRoles; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package uk.co.inbrand.actions; | |
import com.opensymphony.xwork2.ActionSupport; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.inbrand.service.impl; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.Set; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import org.dom4j.DocumentException; | |
import org.springframework.transaction.annotation.Transactional; | |
import uk.co.inbrand.dao.AddressDao; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.inbrand.dto; | |
import java.util.Date; | |
import java.util.Set; | |
import uk.co.inbrand.security.client.SecuredEntity; | |
import uk.co.inbrand.security.client.SecuredEntityTypeEnum; | |
public class UsersSummary implements SecuredEntity { | |
private int user_id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.inbrand.dto; | |
public class UsersBase extends UsersSummary { | |
private UsersBase user_responsible; //Also need to be linked | |
private AddressBase user_address; //Link | |
private String user_fields; | |
public UsersBase getUser_responsible() { | |
return user_responsible; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UserRolesAssembler | |
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package uk.co.inbrand.service.impl; | |
import uk.co.inbrand.dao.UserRolesDao; | |
import uk.co.inbrand.dto.UserRolesBase; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usersDao | |
package uk.co.inbrand.dao; | |
import java.util.List; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.Transaction; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//UserRoles Management *************************************************************************************************** | |
@Override | |
public List<UserRolesBase> getUserRoles(){ | |
List<UserRolesBase> result = new ArrayList<UserRolesBase>(); | |
List<UserRoles> domainList = userRolesDao.listRecords(); | |
Iterator<UserRoles> it = domainList.iterator(); | |
while(it.hasNext()) { | |
UserRolesBase dto = new UserRolesBase(); | |
UserRoles domain = it.next(); |