Package de.terrestris.shoguncore.service
Class MapService<E extends Map,D extends MapDao<E>>
- java.lang.Object
-
- de.terrestris.shoguncore.service.AbstractDaoService<E,D>
-
- de.terrestris.shoguncore.service.AbstractCrudService<E,D>
-
- de.terrestris.shoguncore.service.PermissionAwareCrudService<E,D>
-
- de.terrestris.shoguncore.service.ModuleService<E,D>
-
- de.terrestris.shoguncore.service.MapService<E,D>
-
@Service("mapService") public class MapService<E extends Map,D extends MapDao<E>> extends ModuleService<E,D>Service class for theModulemodel.- Author:
- Nils Bühner
- See Also:
AbstractCrudService
-
-
Field Summary
-
Fields inherited from class de.terrestris.shoguncore.service.PermissionAwareCrudService
permissionCollectionService
-
Fields inherited from class de.terrestris.shoguncore.service.AbstractDaoService
dao, logger
-
-
Constructor Summary
Constructors Modifier Constructor Description MapService()Default constructor, which calls the type-constructorprotectedMapService(Class<E> entityClass)Constructor that sets the concrete entity class for the service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<E>findMapsWithLayer(Layer layer)voidsetDao(D dao)We have to useQualifierto define the correct dao here.List<Layer>setLayersForMap(Integer mapModuleId, List<Integer> layerIds)TODO secure this method!?-
Methods inherited from class de.terrestris.shoguncore.service.PermissionAwareCrudService
addAndSaveGroupPermissions, addAndSaveUserPermissions, findAllUserGroupPermissionsOfUserGroup, findAllUserPermissionsOfUser, getPermissionCollectionService, removeAndSaveGroupPermissions, removeAndSaveUserPermissions, setPermissionCollectionService
-
Methods inherited from class de.terrestris.shoguncore.service.AbstractCrudService
delete, findAll, findAllRestricted, findAllWhereFieldEquals, findAllWithCollectionContaining, findById, findBySimpleFilter, loadById, saveOrUpdate, updatePartialWithJsonNode
-
Methods inherited from class de.terrestris.shoguncore.service.AbstractDaoService
getDao, getEntityClass
-
-
-
-
Method Detail
-
setDao
@Autowired @Qualifier("mapDao") public void setDao(D dao)We have to useQualifierto define the correct dao here. Otherwise, spring can not decide which dao has to be autowired here as there are multiple candidates.
-
findMapsWithLayer
@PreAuthorize("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(#layer, \'READ\')") @Transactional(readOnly=true) public Set<E> findMapsWithLayer(Layer layer)
-
setLayersForMap
@PreAuthorize("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(#mapModuleId, \'de.terrestris.shoguncore.model.module.Map\', \'UPDATE\')") public List<Layer> setLayersForMap(Integer mapModuleId, List<Integer> layerIds) throws ExceptionTODO secure this method!?- Parameters:
layerIds-- Throws:
Exception
-
-