Project

General

Profile

Download (4.51 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.cdm.api.service;
12

    
13
import java.util.List;
14

    
15
import eu.etaxonomy.cdm.api.service.pager.Pager;
16
import eu.etaxonomy.cdm.model.agent.Address;
17
import eu.etaxonomy.cdm.model.agent.AgentBase;
18
import eu.etaxonomy.cdm.model.agent.Institution;
19
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
20
import eu.etaxonomy.cdm.model.agent.Person;
21
import eu.etaxonomy.cdm.model.agent.Team;
22
import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
23
import eu.etaxonomy.cdm.persistence.query.OrderHint;
24

    
25
public interface IAgentService extends IIdentifiableEntityService<AgentBase> {
26
		
27
	public List<Institution> searchInstitutionByCode(String code);
28
	
29
	/**
30
	 * Return a paged list of the institutional memberships held by a person
31
	 * 
32
	 * @param person the person
33
	 * @param pageSize The maximum number of memberships returned (can be null for all memberships)
34
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
35
	 * @return a Pager containing InstitutionalMembership  instances
36
	 */
37
	public Pager<InstitutionalMembership> getInstitutionalMemberships(Person person, Integer pageSize, Integer pageNumber);
38
	
39
	/**
40
	 * Return a paged list of the members of a team
41
	 * 
42
	 * @param team the team
43
	 * @param pageSize The maximum number of members returned (can be null for all members)
44
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
45
	 * @return a Pager containing Person  instances
46
	 */
47
	public Pager<Person> getMembers(Team team, Integer pageSize, Integer pageNumber);
48
	
49
	/**
50
	 * Return a paged list of the addresses of an agent
51
	 * 
52
	 * @param agent the agent
53
	 * @param pageSize The maximum number of addresses returned (can be null for all members)
54
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
55
	 * @return a Pager containing Address  instances
56
	 */
57
	public Pager<Address> getAddresses(AgentBase agent, Integer pageSize, Integer pageNumber);
58
	
59
	/**
60
	 * Returns a Paged List of AgentBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
61
	 * 
62
	 * @param clazz filter the results by class (or pass null to return all AgentBase instances)
63
	 * @param queryString
64
	 * @param pageSize The maximum number of agents returned (can be null for all matching agents)
65
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
66
	 * @param orderHints
67
	 *            Supports path like <code>orderHints.propertyNames</code> which
68
	 *            include *-to-one properties like createdBy.username or
69
	 *            authorTeam.persistentTitleCache
70
	 * @param propertyPaths properties to be initialized
71
	 * @return a Pager Agent instances
72
	 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
73
	 */
74
	public Pager<AgentBase> search(Class<? extends AgentBase> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
75
	
76
	/**
77
	 * Returns a list of <code>UuidAndTitleCache</code> containing all <code>Person</code>s
78
	 * 
79
	 * @return a list of <code>UuidAndTitleCache</code> instances
80
	 */
81
	public List<UuidAndTitleCache<Person>> getPersonUuidAndTitleCache();
82
	
83
	/**
84
	 * Returns a list of <code>UuidAndTitleCache</code> containing all <code>TeamOrPersonBase</code> objects
85
	 * with their respective titleCache
86
	 * 
87
	 * @return a list of <code>UuidAndTitleCache</code> instances
88
	 */
89
	public List<UuidAndTitleCache<Team>> getTeamUuidAndTitleCache();
90
	
91
	/**
92
	 * Returns a list of <code>UuidAndTitleCache</code> containing all <code>TeamOrPersonBase</code> objects
93
	 * with their respective nomenclaturalTitle instead of regular titleCache
94
	 * 
95
	 * @return a list of <code>UuidAndTitleCache</code> instances
96
	 */
97
	public List<UuidAndTitleCache<Team>> getTeamUuidAndNomenclaturalTitle();
98
	
99
	/**
100
	 * Returns a list of <code>UuidAndTitleCache</code> containing all {@link Institution} objects
101
	 * with their respective titleCache
102
	 * 
103
	 * @return a list of <code>UuidAndTitleCache</code> instances
104
	 */
105
	public List<UuidAndTitleCache<Institution>> getInstitutionUuidAndTitleCache();
106
	
107
}
(21-21/76)