ref #7980 reduce minFreeHeap for aggregation
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / GrantedAuthorityServiceImpl.java
1 /**
2 * Copyright (C) 2012 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.cdm.api.service;
10
11 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.security.access.prepost.PreAuthorize;
13 import org.springframework.stereotype.Service;
14 import org.springframework.transaction.annotation.Transactional;
15
16 import eu.etaxonomy.cdm.model.permission.GrantedAuthorityImpl;
17 import eu.etaxonomy.cdm.persistence.dao.permission.IGrantedAuthorityDao;
18
19 /**
20 * @author andreas kohlbecker
21 * @since Sep 13, 2012
22 *
23 */
24 @Service
25 @Transactional(readOnly = true)
26 @PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_USER_MANAGER')")
27 public class GrantedAuthorityServiceImpl extends ServiceBase<GrantedAuthorityImpl, IGrantedAuthorityDao> implements IGrantedAuthorityService {
28
29 @Override
30 @Autowired
31 protected void setDao(IGrantedAuthorityDao dao) {
32 this.dao = dao;
33 }
34
35 /**
36 * {@inheritDoc}
37 */
38 @Override
39 public GrantedAuthorityImpl findAuthorityString(String authorityString) {
40 return dao.findAuthorityString(authorityString);
41
42 }
43
44
45 }