1
/****************************************************************************
3
| Copyright (c) 2007 Novell, Inc.
6
| This program is free software; you can redistribute it and/or
7
| modify it under the terms of version 2 of the GNU General Public License as
8
| published by the Free Software Foundation.
10
| This program is distributed in the hope that it will be useful,
11
| but WITHOUT ANY WARRANTY; without even the implied warranty of
12
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
| GNU General Public License for more details.
15
| You should have received a copy of the GNU General Public License
16
| along with this program; if not, contact Novell, Inc.
18
| To contact Novell about this file by physical or electronic mail,
19
| you may find current contact information at www.novell.com
21
| Author: Mike Lasky <mlasky@novell.com>
22
|***************************************************************************/
27
using Simias.Authentication;
33
/// Interface for a Domain Provider Service.
35
public interface IDomainProvider
39
/// Gets the name of the domain provider.
44
/// Gets the description of the domain provider.
46
string Description { get; }
49
#region Public Methods
51
/// Performs authentication to the specified domain.
53
/// <param name="domain">Domain to authenticate to.</param>
54
/// <param name="httpContext">HTTP-specific request information. This is passed as a parameter so that a domain
55
/// provider may modify the HTTP request by adding special headers as necessary.
57
/// NOTE: The domain provider must NOT end the HTTP request.
59
/// <returns>The status from the authentication.</returns>
60
Authentication.Status Authenticate( Domain domain, HttpContext httpContext );
63
/// Indicates to the provider that the specified collection has
64
/// been deleted and a mapping is no longer required.
66
/// <param name="domainID">The identifier for the domain from
67
/// where the collection has been deleted.</param>
68
/// <param name="collectionID">Identifier of the collection that
69
/// is being deleted.</param>
70
void DeleteLocation( string domainID, string collectionID );
73
/// End the search for domain members.
75
/// <param name="searchContext">Domain provider specific search context returned by FindFirstDomainMembers or
76
/// FindNextDomainMembers methods.</param>
77
void FindCloseDomainMembers( string searchContext );
80
/// Starts a search for all domain members.
82
/// <param name="domainID">The identifier of the domain to search for members in.</param>
83
/// <param name="count">Maximum number of member objects to return.</param>
84
/// <param name="searchContext">Receives a provider specific search context object. This object must be serializable.</param>
85
/// <param name="memberList">Receives an array object that contains the domain Member objects.</param>
86
/// <param name="total">Receives the total number of objects found in the search.</param>
87
/// <returns>True if there are more domain members. Otherwise false is returned.</returns>
88
bool FindFirstDomainMembers( string domainID, int count, out string searchContext, out Member[] memberList, out int total );
91
/// Starts a search for a specific set of domain members.
93
/// <param name="domainID">The identifier of the domain to search for members in.</param>
94
/// <param name="attributeName">Attribute name to search.</param>
95
/// <param name="searchString">String that contains a pattern to search for.</param>
96
/// <param name="operation">Type of search operation to perform.</param>
97
/// <param name="count">Maximum number of member objects to return.</param>
98
/// <param name="searchContext">Receives a provider specific search context object. This object must be serializable.</param>
99
/// <param name="memberList">Receives an array object that contains the domain Member objects.</param>
100
/// <param name="total">Receives the total number of objects found in the search.</param>
101
/// <returns>True if there are more domain members. Otherwise false is returned.</returns>
102
bool FindFirstDomainMembers( string domainID, string attributeName, string searchString, SearchOp operation, int count, out string searchContext, out Member[] memberList, out int total );
105
/// Continues the search for domain members from the current record location.
107
/// <param name="searchContext">Domain provider specific search context returned by FindFirstDomainMembers method.</param>
108
/// <param name="count">Maximum number of member objects to return.</param>
109
/// <param name="memberList">Receives an array object that contains the domain Member objects.</param>
110
/// <returns>True if there are more domain members. Otherwise false is returned.</returns>
111
bool FindNextDomainMembers( ref string searchContext, int count, out Member[] memberList );
114
/// Continues the search for domain members previous to the current record location.
116
/// <param name="searchContext">Domain provider specific search context returned by FindFirstDomainMembers method.</param>
117
/// <param name="count">Maximum number of member objects to return.</param>
118
/// <param name="memberList">Receives an array object that contains the domain Member objects.</param>
119
/// <returns>True if there are more domain members. Otherwise false is returned.</returns>
120
bool FindPreviousDomainMembers( ref string searchContext, int count, out Member[] memberList );
123
/// Continues the search for domain members from the specified record location.
125
/// <param name="searchContext">Domain provider specific search context returned by FindFirstDomainMembers method.</param>
126
/// <param name="offset">Record offset to return members from.</param>
127
/// <param name="count">Maximum number of member objects to return.</param>
128
/// <param name="memberList">Receives an array object that contains the domain Member objects.</param>
129
/// <returns>True if there are more domain members. Otherwise false is returned.</returns>
130
bool FindSeekDomainMembers( ref string searchContext, int offset, int count, out Member[] memberList );
133
/// Determines if the provider claims ownership for the
134
/// specified domain.
136
/// <param name="domainID">Identifier of a domain.</param>
137
/// <returns>True if the provider claims ownership for the
138
/// specified domain. Otherwise, False is returned.</returns>
139
bool OwnsDomain( string domainID );
142
/// Informs the domain provider that the specified member object is about to be
143
/// committed to the domain's member list. This allows an opportunity for the
144
/// domain provider to add any domain specific attributes to the member object.
146
/// <param name="domainID">Identifier of a domain.</param>
147
/// <param name="member">Member object that is about to be committed to the domain's member list.</param>
148
void PreCommit( string domainID, Member member );
151
/// Returns the network location for the the specified
154
/// <param name="domainID">Identifier for the domain.</param>
155
/// <returns>A Uri object that contains the network location.
157
Uri ResolveLocation( string domainID );
160
/// Returns the network location for the the specified
163
/// <param name="domainID">Identifier for the domain that the
164
/// collection belongs to.</param>
165
/// <param name="collectionID">Identifier of the collection to
166
/// find the network location for.</param>
167
/// <returns>A Uri object that contains the network location.
169
Uri ResolveLocation( string domainID, string collectionID );
172
/// Returns the network location of where to create a collection.
174
/// <param name="domainID">Identifier of the domain where a
175
/// collection is to be created.</param>
176
/// <param name="userID">The member that will own the
177
/// collection.</param>
178
/// <param name="collectionID">Identifier of the collection that
179
/// is being created.</param>
180
/// <returns>A Uri object that contains the network location.
182
Uri ResolveLocation( string domainID, string userID, string collectionID );
185
/// Returns the network location of where to the specified user's POBox is located.
187
/// <param name="domainID">Identifier of the domain where a
188
/// collection is to be created.</param>
189
/// <param name="userID">The member that will owns the POBox.</param>
190
/// <returns>A Uri object that contains the network location.
192
Uri ResolvePOBoxLocation( string domainID, string userID );
195
/// Returns the network address of the host
197
/// <param name="domainID">Identifier of the domain where a
198
/// collection is to be created.</param>
199
/// <param name="hostID">The host to resolve.</param>
200
/// <returns>A Uri object that contains the network location.</returns>
201
Uri ResolveHostAddress( string domainID, string hostID );
204
/// Sets a new host address for the domain.
206
/// <param name="domainID">Identifier of the domain for network address
207
/// to be changed.</param>
208
/// <param name="hostLocation">A Uri object containing the new network
209
/// address for the domain.</param>
210
void SetHostLocation( string domainID, Uri hostLocation );