Revision 27c4e220
Added by Katja Luther almost 13 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/ServiceBase.java | ||
---|---|---|
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
@Transactional(readOnly = false) |
69 |
@PreAuthorize("hasPermission(#transientObject, 'DELETE')") |
|
70 | 69 |
public UUID delete(T persistentObject) { |
71 | 70 |
return dao.delete(persistentObject); |
72 | 71 |
} |
... | ... | |
150 | 149 |
} |
151 | 150 |
|
152 | 151 |
@Transactional(readOnly = false) |
153 |
//TODO: Tests fail because nobody is authenticated, fix it!!! |
|
154 |
//@PreAuthorize("hasPermission(#transientObject, 'CREATE')" ) |
|
155 | 152 |
public UUID save(T newInstance) { |
156 | 153 |
return dao.save(newInstance); |
157 | 154 |
} |
158 | 155 |
|
159 | 156 |
@Transactional(readOnly = false) |
160 |
// @PreAuthorize("hasPermission(#transientObject, 'UPDATE')") |
|
161 | 157 |
public UUID saveOrUpdate(T transientObject) { |
162 | 158 |
return dao.saveOrUpdate(transientObject); |
163 | 159 |
} |
164 | 160 |
|
165 | 161 |
@Transactional(readOnly = false) |
166 |
// @PreAuthorize("hasPermission(#transientInstances, 'UPDATE')") |
|
167 | 162 |
public Map<UUID, T> saveOrUpdate(Collection<T> transientInstances) { |
168 | 163 |
return dao.saveOrUpdateAll(transientInstances); |
169 | 164 |
} |
... | ... | |
179 | 174 |
protected abstract void setDao(DAO dao); |
180 | 175 |
|
181 | 176 |
@Transactional(readOnly = false) |
182 |
@PreAuthorize("hasPermission(#transientObject, 'UPDATE')") |
|
183 | 177 |
public UUID update(T transientObject) { |
184 | 178 |
return dao.update(transientObject); |
185 | 179 |
} |
Also available in: Unified diff