\r
import org.hibernate.LockMode;\r
import org.hibernate.Session;\r
+import org.springframework.security.core.Authentication;\r
\r
import eu.etaxonomy.cdm.api.service.pager.Pager;\r
-import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.model.common.ICdmBase;\r
+import eu.etaxonomy.cdm.permission.CdmPermission;\r
import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;\r
import eu.etaxonomy.cdm.persistence.query.Grouping;\r
import eu.etaxonomy.cdm.persistence.query.OrderHint;\r
*\r
* @param <T>\r
*/\r
-public interface IService<T extends CdmBase>{\r
+public interface IService<T extends ICdmBase>{\r
\r
// FIXME what does this method do?\r
public void clear();\r
* @param transientObject the entity to be merged\r
* @return The unique identifier of the persisted entity\r
*/\r
- public UUID merge(T transientObject);\r
+ public T merge(T transientObject);\r
\r
/**\r
* Returns a paged list of entities of type <T> optionally restricted\r
* @return a list of matching objects\r
*/\r
public List<T> list(T example, Set<String> includeProperties, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);\r
+ \r
+ /**\r
+ * Evaluates whether the authenticated user has the rights to perform an specific action on the target object\r
+ * @param authentication\r
+ * @param target\r
+ * @param permission\r
+ * @return\r
+ */\r
+ public boolean hasPermission(Authentication authentication, T target, CdmPermission permission);\r
+\r
}
\ No newline at end of file