Deprecate getCharacterData method in service layer
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IUserService.java
index 897701f763384e6310c281b15af17a434e28de78..ff3e219edaff5df284ca7bb87879a4b4ad1a7053 100644 (file)
@@ -1,13 +1,77 @@
+/**\r
+* Copyright (C) 2009 EDIT\r
+* European Distributed Institute of Taxonomy\r
+* http://www.e-taxonomy.eu\r
+*\r
+* The contents of this file are subject to the Mozilla Public License Version 1.1\r
+* See LICENSE.TXT at the top of this package for the full license terms.\r
+*/\r
+\r
 package eu.etaxonomy.cdm.api.service;\r
 \r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.UUID;\r
+\r
+import org.hibernate.criterion.Criterion;\r
 import org.springframework.dao.DataAccessException;\r
-import org.springframework.security.userdetails.GroupManager;\r
-import org.springframework.security.userdetails.UserDetailsManager;\r
-import org.springframework.security.userdetails.UsernameNotFoundException;\r
+import org.springframework.security.core.GrantedAuthority;\r
+import org.springframework.security.core.userdetails.UsernameNotFoundException;\r
+import org.springframework.security.provisioning.GroupManager;\r
+import org.springframework.security.provisioning.UserDetailsManager;\r
 \r
+import eu.etaxonomy.cdm.config.CdmSourceException;\r
 import eu.etaxonomy.cdm.model.common.User;\r
+import eu.etaxonomy.cdm.model.metadata.CdmMetaData.MetaDataPropertyName;\r
+import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;\r
+import eu.etaxonomy.cdm.persistence.query.MatchMode;\r
+import eu.etaxonomy.cdm.persistence.query.OrderHint;\r
 \r
 public interface IUserService extends IService<User>, UserDetailsManager, GroupManager {\r
-       \r
-       public void changePasswordForUser(String username, String password) throws UsernameNotFoundException, DataAccessException;\r
+\r
+    public void changePasswordForUser(String username, String password) throws UsernameNotFoundException, DataAccessException;\r
+\r
+    public UUID saveGrantedAuthority(GrantedAuthority grantedAuthority);\r
+\r
+\r
+\r
+    /**\r
+     * Return a List of users matching the given query string, optionally filtered by class, optionally with a particular MatchMode\r
+     *\r
+     * @param queryString the query string to filter by\r
+     * @param matchmode use a particular type of matching (can be null - defaults to exact matching)\r
+     * @param criteria additional criteria to filter by\r
+     * @param pageSize The maximum number of objects returned (can be null for all objects)\r
+     * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)\r
+     * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}\r
+     * @param orderHints\r
+     *            Supports path like <code>orderHints.propertyNames</code> which\r
+     *            include *-to-one properties like createdBy.username or\r
+     *            authorTeam.persistentTitleCache\r
+     * @return a list of instances of type User matching the queryString\r
+     *\r
+     * @see {@link IIdentifiableEntityService#listByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}\r
+     *\r
+     */\r
+    public List<User> listByUsername(String queryString, MatchMode matchmode, List<Criterion> criteria, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);\r
+\r
+    /**\r
+     * @return\r
+     * @throws CdmSourceException\r
+     */\r
+    public String getDbSchemaVersion() throws CdmSourceException;\r
+\r
+    /**\r
+     * @return\r
+     * @throws CdmSourceException\r
+     */\r
+    public boolean isDbEmpty() throws CdmSourceException;\r
+\r
+    /**\r
+     * @return\r
+     * @throws CdmSourceException\r
+     */\r
+    public Map<MetaDataPropertyName, String> getCdmMetadataMap() throws CdmSourceException;\r
+\r
+\r
 }\r