001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: AMOrganizationalUnit.java,v 1.4 2008/06/25 05:41:21 qcheng Exp $
026 *
027 */
028
029package com.iplanet.am.sdk;
030
031import java.util.Map;
032import java.util.Set;
033
034import com.iplanet.sso.SSOException;
035
036/**
037 * <p>
038 * The <code>AMOrganizationalUnit</code> interface provides methods to manage
039 * organizational unit <code>AMOrganizationalUnit</code> objects can be
040 * obtained by using <code>AMStoreConnection</code>. A handle to this object
041 * can be obtained by using the DN of the object.
042 * 
043 * <PRE>
044 * 
045 * AMStoreConnection amsc = new AMStoreConnection(ssotoken); if
046 * (amsc.doesEntryExist(oDN)) { AMOrganizationalUnit org =
047 * amsc.getOrganizationalUnit(oDN); }
048 * 
049 * </PRE>
050 *
051 * @deprecated  As of Sun Java System Access Manager 7.1.
052 * @supported.all.api
053 */
054public interface AMOrganizationalUnit extends AMObject {
055    /**
056     * Creates organizations.
057     * 
058     * @param organizations
059     *            The set of organizations names to be created.
060     * @return Set set of Organization objects created.
061     * 
062     * @throws AMException
063     *             if an error is encountered when trying to access/retrieve
064     *             data from the data store
065     * @throws SSOException
066     *             if the single sign on token is no longer valid
067     */
068    public Set createOrganizations(Set organizations) throws AMException,
069            SSOException;
070
071    /**
072     * Creates organizations and initializes their attributes.
073     * 
074     * @param organizations
075     *            Map where the key is the name of the organization, and the
076     *            value is a Map to represent Attribute-Value Pairs
077     * @return Set set of Organization objects created.
078     * @throws AMException
079     *             if an error is encountered when trying to access/retrieve
080     *             data from the data store
081     * @throws SSOException
082     *             if the single sign on token is no longer valid
083     */
084    public Set createOrganizations(Map organizations) throws AMException,
085            SSOException;
086
087    /**
088     * Deletes organizations
089     * 
090     * @param organizations
091     *            The set of organizations DNs to be deleted.
092     * 
093     * @throws AMException
094     *             if an error is encountered when trying to access/retrieve
095     *             data from the data store.
096     * @throws SSOException
097     *             if the single sign on token is no longer valid.
098     */
099    public void deleteOrganizations(Set organizations) throws AMException,
100            SSOException;
101
102    /**
103     * Gets the organization by DN
104     * 
105     * @param dn
106     *            DN
107     * @return The Organization object
108     * @throws AMException
109     *             if an error is encountered when trying to access/retrieve
110     *             data from the data store.
111     * @throws SSOException
112     *             if the single sign on token is no longer valid.
113     */
114    public AMOrganization getOrganization(String dn) throws AMException,
115            SSOException;
116
117    /**
118     * Gets the organizations within the specified level.
119     * 
120     * @param level
121     *            The search level starting from the organizational unit.
122     * @return The Set of organizations DNs within the specified level.
123     * @throws AMException
124     *             if an error is encountered when trying to access/retrieve
125     *             data from the data store.
126     * @throws SSOException
127     *             if the single sign on token is no longer valid.
128     */
129    public Set getOrganizations(int level) throws AMException, SSOException;
130
131    /**
132     * Gets number of organizations within the specified level.
133     * 
134     * @param level
135     *            The search level starting from the organizational unit.
136     * @return Number of organizations within the specified level.
137     * @throws AMException
138     *             if an error is encountered when trying to access/retrieve
139     *             data from the data store.
140     * @throws SSOException
141     *             if the single sign on token is no longer valid.
142     */
143    public long getNumberOfOrganizations(int level) throws AMException,
144            SSOException;
145
146    /**
147     * Searches for organizations in this organizational unit using wildcards.
148     * Wildcards can be specified such as a*, *, *a.
149     * 
150     * @param wildcard
151     *            wildcard pattern to be used in the search
152     * @param level
153     *            the search level that needs to be used (
154     *            <code>AMConstants.SCOPE_ONE</code>
155     *            or <code>AMConstants.SCOPE_SUB</code>)
156     * @return Set Set of DNs of organizations matching the search
157     * 
158     * @throws AMException
159     *             if an error is encountered when trying to access/retrieve
160     *             data from the data store
161     * @throws SSOException
162     *             if the single sign on token is no longer valid
163     */
164    public Set searchOrganizations(String wildcard, int level)
165            throws AMException, SSOException;
166
167    /**
168     * Searches for organizations in this organizational unit using wildcards.
169     * Wildcards can be specified such as a*, *, *a.
170     * 
171     * @param wildcard
172     *            wildcard pattern to be used in the search
173     * @param searchControl
174     *            specifies the search scope to be used, VLV ranges etc.
175     * @return <code>AMSearchResults</code> which contains a Set of DNs of
176     *         organizations matching the search.
177     * @throws AMException
178     *             if an error is encountered when trying to access/retrieve
179     *             data from the data store.
180     * @throws SSOException
181     *             if the single sign on token is no longer valid
182     */
183    public AMSearchResults searchOrganizations(String wildcard,
184            AMSearchControl searchControl) throws AMException, SSOException;
185
186    /**
187     * Searches for organizations in this organizational unit using wildcards
188     * and attribute values. Wildcards can be specified such as a*, *, *a. To
189     * further refine the search, attribute-value pairs can be specified so that
190     * DNs of organizations with matching attribute-value pairs will be
191     * returned.
192     * 
193     * @param wildcard
194     *            wildcard pattern to be used in the search
195     * @param avPairs
196     *            attribute-value pairs to match when searching organizations
197     * @param level
198     *            the search level that needs to be used (
199     *            <code>AMConstants.SCOPE_ONE</code>
200     *            or <code>AMConstants.SCOPE_SUB</code>)
201     * @return Set Set of DNs of organizations matching the search
202     * 
203     * @throws AMException
204     *             if an error is encountered when trying to access/retrieve
205     *             data from the data store
206     * @throws SSOException
207     *             if the single sign on token is no longer valid
208     */
209    public Set searchOrganizations(String wildcard, Map avPairs, int level)
210            throws AMException, SSOException;
211
212    /**
213     * Searches for organizations in this organizational unit using wildcards
214     * and attribute values. Wildcards can be specified such as a*, *, *a. To
215     * further refine the search, attribute-value pairs can be specified so that
216     * DNs of organizations with matching attribute-value pairs will be
217     * returned.
218     * 
219     * @param wildcard
220     *            wildcard pattern to be used in the search.
221     * @param avPairs
222     *            attribute-value pairs to match when searching organizations.
223     * @param searchControl
224     *            specifies the search scope to be used, VLV ranges etc.
225     * @return <code>AMSearchResults</code> which contains a Set of DNs of
226     *         organizations matching the search.
227     * @throws AMException
228     *             if an error is encountered when trying to access/retrieve
229     *             data from the data store.
230     * @throws SSOException
231     *             if the single sign on token is no longer valid.
232     */
233    public AMSearchResults searchOrganizations(String wildcard, Map avPairs,
234            AMSearchControl searchControl) throws AMException, SSOException;
235
236    /**
237     * Creates sub-organizational units.
238     * 
239     * @param subOrganizationalUnits
240     *            The set of sub-organizational units names to be created.
241     * @return Set set of sub organizational unit objects created.
242     * 
243     * @throws AMException
244     *             if an error is encountered when trying to access/retrieve
245     *             data from the data store
246     * @throws SSOException
247     *             if the single sign on token is no longer valid
248     */
249    public Set createSubOrganizationalUnits(Set subOrganizationalUnits)
250            throws AMException, SSOException;
251
252    /**
253     * Creates sub-organizational units and initializes their attributes.
254     * 
255     * @param subOrganizationalUnits
256     *            Map where the key is the name of the sub organizational unit,
257     *            and the value is a Map to represent Attribute-Value Pairs.
258     * @return Set set of sub organizational unit objects created.
259     * @throws AMException
260     *             if an error is encountered when trying to access/retrieve
261     *             data from the data store
262     * @throws SSOException
263     *             if the single sign on token is no longer valid
264     */
265    public Set createSubOrganizationalUnits(Map subOrganizationalUnits)
266            throws AMException, SSOException;
267
268    /**
269     * Deletes sub organizational units
270     * 
271     * @param subOrganizationalUnits
272     *            The set of sub organizational units DNs to be deleted.
273     * @throws AMException
274     *             if an error is encountered when trying to access/retrieve
275     *             data from the data store
276     * @throws SSOException
277     *             if the single sign on token is no longer valid
278     */
279    public void deleteSubOrganizationalUnits(Set subOrganizationalUnits)
280            throws AMException, SSOException;
281
282    /**
283     * Gets the sub-organizational unit by DN
284     * 
285     * @param dn
286     *            distinguished name.
287     * @return The sub <code>OrganizationalUnit</code> object.
288     * @throws AMException
289     *             if an error is encountered when trying to access/retrieve
290     *             data from the data store
291     * @throws SSOException
292     *             if the single sign on token is no longer valid
293     */
294    public AMOrganizationalUnit getSubOrganizationalUnit(String dn)
295            throws AMException, SSOException;
296
297    /**
298     * Gets the sub organizational units within the specified level.
299     * 
300     * @param level
301     *            The search level starting from the organizational unit.
302     * @return Set of sub organizational units DNs within the specified level.
303     * @throws AMException
304     *             if an error is encountered when trying to access/retrieve
305     *             data from the data store
306     * @throws SSOException
307     *             if the single sign on token is no longer valid
308     */
309    public Set getSubOrganizationalUnits(int level) throws AMException,
310            SSOException;
311
312    /**
313     * Gets number of sub organizational units within the specified level.
314     * 
315     * @param level
316     *            The search level starting from the organizational unit.
317     * @return Number of sub organizational units within the specified level.
318     * @throws AMException
319     *             if an error is encountered when trying to access/retrieve
320     *             data from the data store
321     * @throws SSOException
322     *             if the single sign on token is no longer valid
323     */
324    public long getNumberOfSubOrganizationalUnits(int level)
325            throws AMException, SSOException;
326
327    /**
328     * Searches for sub organizational units in this organizational unit using
329     * wildcards. Wildcards can be specified such as a*, *, *a.
330     * 
331     * @param wildcard
332     *            wildcard pattern to be used in the search
333     * @param level
334     *            the search level that needs to be used (
335     *            <code>AMConstants.SCOPE_ONE</code>
336     *            or <code>AMConstants.SCOPE_SUB</code>)
337     * @return Set Set of DNs of sub organizational units matching the search
338     * 
339     * @throws AMException
340     *             if an error is encountered when trying to access/retrieve
341     *             data from the data store
342     * @throws SSOException
343     *             if the single sign on token is no longer valid
344     */
345    public Set searchSubOrganizationalUnits(String wildcard, int level)
346            throws AMException, SSOException;
347
348    /**
349     * Searches for sub organizational units in this organizational unit using
350     * wildcards. Wildcards can be specified such as a*, *, *a.
351     * 
352     * @param wildcard
353     *            wildcard pattern to be used in the search.
354     * @param searchControl
355     *            specifies the search scope to be used, VLV ranges etc.
356     * @return <code>AMSearchResults</code> which contains a Set of DNs of sub
357     *         organizational units matching the search.
358     * @throws AMException
359     *             if an error is encountered when trying to access/retrieve
360     *             data from the data store.
361     * @throws SSOException
362     *             if the single sign on token is no longer valid.
363     */
364    public AMSearchResults searchSubOrganizationalUnits(String wildcard,
365            AMSearchControl searchControl) throws AMException, SSOException;
366
367    /**
368     * Searches for sub organizational units in this organizational unit using
369     * wildcards and attribute values. Wildcards can be specified such as a*, *,
370     * *a. To further refine the search, attribute-value pairs can be specified
371     * so that DNs of sub organizations with matching attribute-value pairs will
372     * be returned.
373     * 
374     * @param wildcard
375     *            wildcard pattern to be used in the search
376     * @param avPairs
377     *            attribute-value pairs to match when searching sub
378     *            organizational units
379     * @param level
380     *            the search level that needs to be used (
381     *            <code>AMConstants.SCOPE_ONE</code>
382     *            or <code>AMConstants.SCOPE_SUB</code>)
383     * @return Set Set of DNs of sub organizational units matching the search
384     * 
385     * @throws AMException
386     *             if an error is encountered when trying to access/retrieve
387     *             data from the data store
388     * @throws SSOException
389     *             if the single sign on token is no longer valid
390     */
391    public Set searchSubOrganizationalUnits(String wildcard, Map avPairs,
392            int level) throws AMException, SSOException;
393
394    /**
395     * Searches for sub organizational units in this organizational unit using
396     * wildcards and attribute values. Wildcards can be specified such as a*, *,
397     * *a. To further refine the search, attribute-value pairs can be specified
398     * so that DNs of sub organizations with matching attribute-value pairs will
399     * be returned.
400     * 
401     * @param wildcard
402     *            wildcard pattern to be used in the search.
403     * @param avPairs
404     *            attribute-value pairs to match when searching sub
405     *            organizational units.
406     * @param searchControl
407     *            specifies the search scope to be used, VLV ranges etc.
408     * @return <code>AMSearchResults</code> which contains a Set of DNs of sub
409     *         organizational units matching the search.
410     * @throws AMException
411     *             if an error is encountered when trying to access/retrieve
412     *             data from the data store.
413     * @throws SSOException
414     *             if the single sign on token is no longer valid
415     */
416    public AMSearchResults searchSubOrganizationalUnits(String wildcard,
417            Map avPairs, AMSearchControl searchControl) throws AMException,
418            SSOException;
419
420    /**
421     * Creates roles.
422     * 
423     * @param roles
424     *            The set of Roles' names to be created.
425     * @return Set set of Role objects created.
426     * @throws AMException
427     *             if an error is encountered when trying to access/retrieve
428     *             data from the data store
429     * @throws SSOException
430     *             if the single sign on token is no longer valid
431     */
432    public Set createRoles(Set roles) throws AMException, SSOException;
433
434    /**
435     * Creates roles.
436     * 
437     * @param roles
438     *            Map where the key is the name of the role, and the value is a
439     *            Map to represent Attribute-Value Pairs
440     * @return Set set of Role objects created.
441     * @throws AMException
442     *             if an error is encountered when trying to access/retrieve
443     *             data from the data store
444     * @throws SSOException
445     *             if the single sign on token is no longer valid
446     */
447    public Set createRoles(Map roles) throws AMException, SSOException;
448
449    /**
450     * Deletes roles.
451     * 
452     * @param roles
453     *            The set of roles' DNs to be deleted.
454     * @throws AMException
455     *             if an error is encountered when trying to access/retrieve
456     *             data from the data store
457     * @throws SSOException
458     *             if the single sign on token is no longer valid
459     */
460    public void deleteRoles(Set roles) throws AMException, SSOException;
461
462    /**
463     * Gets the roles within the specified level.
464     * 
465     * @param level
466     *            The search level starting from the organizational unit.
467     * @return The Set of Roles' DNs within the specified level.
468     * @throws AMException
469     *             if an error is encountered when trying to access/retrieve
470     *             data from the data store
471     * @throws SSOException
472     *             if the single sign on token is no longer valid
473     */
474    public Set getRoles(int level) throws AMException, SSOException;
475
476    /**
477     * Gets number of roles within the specified level.
478     * 
479     * @param level
480     *            The search level starting from the organizational unit.
481     * @return Number of roles within the specified level.
482     * @throws AMException
483     *             if an error is encountered when trying to access/retrieve
484     *             data from the data store
485     * @throws SSOException
486     *             if the single sign on token is no longer valid
487     */
488    public long getNumberOfRoles(int level) throws AMException, SSOException;
489
490    /**
491     * Searches for roles in this organizational unit using wildcards. Wildcards
492     * can be specified such as a*, *, *a.
493     * 
494     * @param wildcard
495     *            wildcard pattern to be used in the search
496     * @param level
497     *            the search level that needs to be used (
498     *            <code>AMConstants.SCOPE_ONE</code>
499     *            or <code>AMConstants.SCOPE_SUB</code>)
500     * @return Set Set of DNs of roles matching the search
501     * 
502     * @throws AMException
503     *             if an error is encountered when trying to access/retrieve
504     *             data from the data store
505     * @throws SSOException
506     *             if the single sign on token is no longer valid
507     */
508    public Set searchRoles(String wildcard, int level) throws AMException,
509            SSOException;
510
511    /**
512     * Searches for roles in this organizational unit using wildcards. Wildcards
513     * can be specified such as a*, *, *a.
514     * 
515     * @param wildcard
516     *            wildcard pattern to be used in the search.
517     * @param searchControl
518     *            specifies the search scope to be used, VLV ranges etc.
519     * @return <code>AMSearchResults</code> which contains a Set of DNs of
520     *         roles matching the search.
521     * @throws AMException
522     *             if an error is encountered when trying to access/retrieve
523     *             data from the data store.
524     * @throws SSOException
525     *             if the single sign on token is no longer valid.
526     */
527    public AMSearchResults searchRoles(String wildcard,
528            AMSearchControl searchControl) throws AMException, SSOException;
529
530    /**
531     * Searches for roles in this organizational unit using wildcards and
532     * attribute values. Wildcards can be specified such as a*, *, *a. To
533     * further refine the search, attribute-value pairs can be specified so that
534     * DNs of roles with matching attribute-value pairs will be returned.
535     * 
536     * @param wildcard
537     *            wildcard pattern to be used in the search
538     * @param avPairs
539     *            attribute-value pairs to match when searching roles
540     * @param level
541     *            the search level that needs to be used (
542     *            <code>AMConstants.SCOPE_ONE</code>
543     *            or <code>AMConstants.SCOPE_SUB</code>)
544     * @return Set Set of DNs of roles matching the search
545     * 
546     * @throws AMException
547     *             if an error is encountered when trying to access/retrieve
548     *             data from the data store
549     * @throws SSOException
550     *             if the single sign on token is no longer valid
551     */
552    public Set searchRoles(String wildcard, Map avPairs, int level)
553            throws AMException, SSOException;
554
555    /**
556     * Searches for roles in this organizational unit using wildcards and
557     * attribute values. Wildcards can be specified such as a*, *, *a. To
558     * further refine the search, attribute-value pairs can be specified so that
559     * DNs of roles with matching attribute-value pairs will be returned.
560     * 
561     * @param wildcard
562     *            wildcard pattern to be used in the search.
563     * @param avPairs
564     *            attribute-value pairs to match when searching roles
565     * @param searchControl
566     *            specifies the search scope to be used, VLV ranges etc.
567     * @return <code>AMSearchResults</code> which contains a Set of DNs of
568     *         roles matching the search.
569     * @throws AMException
570     *             if an error is encountered when trying to access/retrieve
571     *             data from the data store.
572     * @throws SSOException
573     *             if the single sign on token is no longer valid.
574     */
575    public AMSearchResults searchRoles(String wildcard, Map avPairs,
576            AMSearchControl searchControl) throws AMException, SSOException;
577
578    /**
579     * Creates filtered roles.
580     * 
581     * @param roles
582     *            The set of filtered roles' names to be created.
583     * @return set of <code>FilteredRole</code> objects created.
584     * @throws AMException
585     *             if an error is encountered when trying to access/retrieve
586     *             data from the data store.
587     * @throws SSOException
588     *             if the single sign on token is no longer valid
589     */
590    public Set createFilteredRoles(Set roles) throws AMException, SSOException;
591
592    /**
593     * Creates filtered roles.
594     * 
595     * @param roles
596     *            Map where the key is the name of the filtered role, and the
597     *            value is a Map to represent Attribute-Value Pairs
598     * @return set of <code>FilteredRole</code> objects created.
599     * @throws AMException
600     *             if an error is encountered when trying to access/retrieve
601     *             data from the data store.
602     * @throws SSOException
603     *             if the single sign on token is no longer valid.
604     */
605    public Set createFilteredRoles(Map roles) throws AMException, SSOException;
606
607    /**
608     * Deletes filtered roles.
609     * 
610     * @param roles
611     *            The set of filtered roles' DNs to be deleted.
612     * @throws AMException
613     *             if an error is encountered when trying to access/retrieve
614     *             data from the data store
615     * @throws SSOException
616     *             if the single sign on token is no longer valid
617     */
618    public void deleteFilteredRoles(Set roles) throws AMException, SSOException;
619
620    /**
621     * Gets the filtered roles within the specified level.
622     * 
623     * @param level
624     *            The search level starting from the organization.
625     * @return The Set of filtered roles' DNs within the specified level.
626     * @throws AMException
627     *             if an error is encountered when trying to access/retrieve
628     *             data from the data store
629     * @throws SSOException
630     *             if the single sign on token is no longer valid
631     */
632    public Set getFilteredRoles(int level) throws AMException, SSOException;
633
634    /**
635     * Gets number of filtered roles within the specified level.
636     * 
637     * @param level
638     *            The search level starting from the organization.
639     * @return Number of filtered roles within the specified level.
640     * @throws AMException
641     *             if an error is encountered when trying to access/retrieve
642     *             data from the data store
643     * @throws SSOException
644     *             if the single sign on token is no longer valid
645     */
646    public long getNumberOfFilteredRoles(int level) throws AMException,
647            SSOException;
648
649    /**
650     * Searches for filtered roles in this organization using wildcards.
651     * Wildcards can be specified such as a*, *, *a.
652     * 
653     * @param wildcard
654     *            wildcard pattern to be used in the search
655     * @param level
656     *            the search level that needs to be used (
657     *            <code>AMConstants.SCOPE_ONE</code>
658     *            or <code>AMConstants.SCOPE_SUB</code>)
659     * @return Set of DNs of filtered roles matching the search
660     * 
661     * @throws AMException
662     *             if an error is encountered when trying to access/retrieve
663     *             data from the data store
664     * @throws SSOException
665     *             if the single sign on token is no longer valid
666     */
667    public Set searchFilteredRoles(String wildcard, int level)
668            throws AMException, SSOException;
669
670    /**
671     * Searches for filtered roles in this organization using wildcards.
672     * Wildcards can be specified such as a*, *, *a.
673     * 
674     * @param wildcard
675     *            wildcard pattern to be used in the search
676     * @param searchControl
677     *            specifies the search scope to be used, VLV ranges etc.
678     * @return <code>AMSearchResults</code> which contains a Set of DNs of
679     *         filtered roles matching the search.
680     * @throws AMException
681     *             if an error is encountered when trying to access/retrieve
682     *             data from the data store.
683     * @throws SSOException
684     *             if the single sign on token is no longer valid.
685     */
686    public AMSearchResults searchFilteredRoles(String wildcard,
687            AMSearchControl searchControl) throws AMException, SSOException;
688
689    /**
690     * Searches for filtered roles in this organization using wildcards and
691     * attribute values. Wildcards can be specified such as a*, *, *a. To
692     * further refine the search, attribute-value pairs can be specified so that
693     * DNs of filtered roles with matching attribute-value pairs will be
694     * returned.
695     * 
696     * @param wildcard
697     *            wildcard pattern to be used in the search
698     * @param avPairs
699     *            attribute-value pairs to match when searching filtered roles
700     * @param level
701     *            the search level that needs to be used (
702     *            <code>AMConstants.SCOPE_ONE</code>
703     *            or <code>AMConstants.SCOPE_SUB</code>).
704     * @return Set of DNs of filtered roles matching the search
705     * @throws AMException
706     *             if an error is encountered when trying to access/retrieve
707     *             data from the data store
708     * @throws SSOException
709     *             if the single sign on token is no longer valid
710     */
711    public Set searchFilteredRoles(String wildcard, Map avPairs, int level)
712            throws AMException, SSOException;
713
714    /**
715     * Searches for filtered roles in this organization using wildcards and
716     * attribute values. Wildcards can be specified such as a*, *, *a. To
717     * further refine the search, attribute-value pairs can be specified so that
718     * DNs of filtered roles with matching attribute-value pairs will be
719     * returned.
720     * 
721     * @param wildcard
722     *            wildcard pattern to be used in the search.
723     * @param avPairs
724     *            attribute-value pairs to match when searching filtered roles.
725     * @param searchControl
726     *            specifies the search scope to be used, VLV ranges etc.
727     * @return <code>AMSearchResults</code> which contains a Set of DNs of
728     *         filtered roles matching the search.
729     * @throws AMException
730     *             if an error is encountered when trying to access/retrieve
731     *             data from the data store.
732     * @throws SSOException
733     *             if the single sign on token is no longer valid.
734     */
735    public AMSearchResults searchFilteredRoles(String wildcard, Map avPairs,
736            AMSearchControl searchControl) throws AMException, SSOException;
737
738    /**
739     * Searches for all roles in this organizational unit using wildcards.
740     * Wildcards can be specified such as a*, *, *a.
741     * 
742     * @param wildcard
743     *            wildcard pattern to be used in the search
744     * @param level
745     *            the search level that needs to be used (
746     *            <code>AMConstants.SCOPE_ONE</code>
747     *            or <code>AMConstants.SCOPE_SUB</code>)
748     * @return Set of DNs of all roles matching the search
749     * 
750     * @throws AMException
751     *             if an error is encountered when trying to access/retrieve
752     *             data from the data store
753     * @throws SSOException
754     *             if the single sign on token is no longer valid
755     */
756    public Set searchAllRoles(String wildcard, int level) throws AMException,
757            SSOException;
758
759    /**
760     * Searches for all roles in this organizational unit using wildcards.
761     * Wildcards can be specified such as a*, *, *a.
762     * 
763     * @param wildcard
764     *            wildcard pattern to be used in the search.
765     * @param searchControl
766     *            specifies the search scope to be used, VLV ranges etc.
767     * @return <code>AMSearchResults</code> which contains a Set of DNs of all
768     *         roles matching the search.
769     * @throws AMException
770     *             if an error is encountered when trying to access/retrieve
771     *             data from the data store.
772     * @throws SSOException
773     *             if the single sign on token is no longer valid.
774     */
775    public AMSearchResults searchAllRoles(String wildcard,
776            AMSearchControl searchControl) throws AMException, SSOException;
777
778    /**
779     * Searches for all roles in this organizational unit using wildcards and
780     * attribute values. Wildcards can be specified such as a*, *, *a. To
781     * further refine the search, attribute-value pairs can be specified so that
782     * DNs of all roles with matching attribute-value pairs will be returned.
783     * 
784     * @param wildcard
785     *            wildcard pattern to be used in the search
786     * @param avPairs
787     *            attribute-value pairs to match when searching all roles
788     * @param level
789     *            the search level that needs to be used (
790     *            <code>AMConstants.SCOPE_ONE</code>
791     *            or <code>AMConstants.SCOPE_SUB</code>)
792     * @return Set of DNs of all roles matching the search
793     * 
794     * @throws AMException
795     *             if an error is encountered when trying to access/retrieve
796     *             data from the data store
797     * @throws SSOException
798     *             if the single sign on token is no longer valid
799     */
800    public Set searchAllRoles(String wildcard, Map avPairs, int level)
801            throws AMException, SSOException;
802
803    /**
804     * Searches for all roles in this organizational unit using wildcards and
805     * attribute values. Wildcards can be specified such as a*, *, *a. To
806     * further refine the search, attribute-value pairs can be specified so that
807     * DNs of all roles with matching attribute-value pairs will be returned.
808     * 
809     * @param wildcard
810     *            wildcard pattern to be used in the search.
811     * @param avPairs
812     *            attribute-value pairs to match when searching all roles
813     * @param searchControl
814     *            specifies the search scope to be used, VLV ranges etc.,
815     * @return <code>AMSearchResults</code> which contains a Set of DNs of all
816     *         roles matching the search.
817     * @throws AMException
818     *             if an error is encountered when trying to access/retrieve
819     *             data from the data store.
820     * @throws SSOException
821     *             if the single sign on token is no longer valid.
822     */
823    public AMSearchResults searchAllRoles(String wildcard, Map avPairs,
824            AMSearchControl searchControl) throws AMException, SSOException;
825
826    /**
827     * Creates assignable dynamic groups.
828     * 
829     * @param assignableDynamicGroups
830     *            The set of assignable dynamic groups's names to be created.
831     * @return set of <code>AssignableDynamicGroup</code> objects created.
832     * @throws AMException
833     *             if an error is encountered when trying to access/retrieve
834     *             data from the data store
835     * @throws SSOException
836     *             if the single sign on token is no longer valid
837     */
838    public Set createAssignableDynamicGroups(Set assignableDynamicGroups)
839            throws AMException, SSOException;
840
841    /**
842     * Deletes assignable dynamic groups.
843     * 
844     * @param assignableDynamicGroups
845     *            The set of assignable dynamic groups's DNs to be deleted.
846     * 
847     * @throws AMException
848     *             if an error is encountered when trying to access/retrieve
849     *             data from the data store
850     * @throws SSOException
851     *             if the single sign on token is no longer valid
852     */
853    public void deleteAssignableDynamicGroups(Set assignableDynamicGroups)
854            throws AMException, SSOException;
855
856    /**
857     * Returns the assignable dynamic groups within the specified level.
858     * 
859     * @param level
860     *            The search level starting from the organizational unit.
861     * @return The Set of DNs of <code>AssignableDynamicGroups</code> within
862     *         the specified level.
863     * @throws AMException
864     *             if an error is encountered when trying to access/retrieve
865     *             data from the data store
866     * @throws SSOException
867     *             if the single sign on token is no longer valid
868     */
869    public Set getAssignableDynamicGroups(int level) throws AMException,
870            SSOException;
871
872    /**
873     * Gets number of assignable dynamic groups within the specified level.
874     * 
875     * @param level
876     *            The search level starting from the organizational unit.
877     * @return Number of assignable dynamic groups within the specified level.
878     * @throws AMException
879     *             if an error is encountered when trying to access/retrieve
880     *             data from the data store
881     * @throws SSOException
882     *             if the single sign on token is no longer valid
883     */
884    public long getNumberOfAssignableDynamicGroups(int level)
885            throws AMException, SSOException;
886
887    /**
888     * Searches for assignable dynamic groups in this organizational unit using
889     * wildcards. Wildcards can be specified such as a*, *, *a.
890     * 
891     * @param wildcard
892     *            wildcard pattern to be used in the search
893     * @param level
894     *            the search level that needs to be used (
895     *            <code>AMConstants.SCOPE_ONE</code>
896     *            or <code>AMConstants.SCOPE_SUB</code>)
897     * @return Set Set of DNs of assignable dynamic groups matching the search
898     * 
899     * @throws AMException
900     *             if an error is encountered when trying to access/retrieve
901     *             data from the data store
902     * @throws SSOException
903     *             if the single sign on token is no longer valid
904     */
905    public Set searchAssignableDynamicGroups(String wildcard, int level)
906            throws AMException, SSOException;
907
908    /**
909     * Searches for assignable dynamic groups in this organizational unit using
910     * wildcards. Wildcards can be specified such as a*, *, *a.
911     * 
912     * @param wildcard
913     *            wildcard pattern to be used in the search.
914     * @param searchControl
915     *            specifies the search scope to be used, VLV ranges etc.
916     * @return <code>AMSearchResults</code> Set of DNs of assignable dynamic
917     *         groups matching the search.
918     * @throws AMException
919     *             if an error is encountered when trying to access/retrieve
920     *             data from the data store.
921     * @throws SSOException
922     *             if the single sign on token is no longer valid.
923     */
924    public AMSearchResults searchAssignableDynamicGroups(String wildcard,
925            AMSearchControl searchControl) throws AMException, SSOException;
926
927    /**
928     * Searches for assignable dynamic groups in this organizational unit using
929     * wildcards and attribute values. Wildcards can be specified such as a*, *,
930     * *a. To further refine the search, attribute-value pairs can be specified
931     * so that DNs of dynamic groups with matching attribute-value pairs will be
932     * returned.
933     * 
934     * @param wildcard
935     *            wildcard pattern to be used in the search
936     * @param avPairs
937     *            attribute-value pairs to match when searching assignable
938     *            dynamic groups
939     * @param level
940     *            the search level that needs to be used (
941     *            <code>AMConstants.SCOPE_ONE</code>
942     *            or <code>AMConstants.SCOPE_SUB</code>)
943     * @return Set Set of DNs of assignable dynamic groups matching the search
944     * 
945     * @throws AMException
946     *             if an error is encountered when trying to access/retrieve
947     *             data from the data store
948     * @throws SSOException
949     *             if the single sign on token is no longer valid
950     */
951    public Set searchAssignableDynamicGroups(String wildcard, Map avPairs,
952            int level) throws AMException, SSOException;
953
954    /**
955     * Searches for assignable dynamic groups in this organizational unit using
956     * wildcards and attribute values. Wildcards can be specified such as a*, *,
957     * *a. To further refine the search, attribute-value pairs can be specified
958     * so that DNs of dynamic groups with matching attribute-value pairs will be
959     * returned.
960     * 
961     * @param wildcard
962     *            wildcard pattern to be used in the search
963     * @param avPairs
964     *            attribute-value pairs to match when searching assignable
965     *            dynamic groups
966     * @param searchControl
967     *            specifies the search scope to be used, VLV ranges etc.
968     * @return <code>AMSearchResults</code> which contains a Set of DNs of
969     *         assignable dynamic groups matching the search.
970     * @throws AMException
971     *             if an error is encountered when trying to access/retrieve
972     *             data from the data store.
973     * @throws SSOException
974     *             if the single sign on token is no longer valid
975     */
976    public AMSearchResults searchAssignableDynamicGroups(String wildcard,
977            Map avPairs, AMSearchControl searchControl) throws AMException,
978            SSOException;
979
980    /**
981     * Creates dynamic groups and initializes their attributes.
982     * 
983     * @param dynamicGroups
984     *            Map where the key is the name of the dynamic group, and the
985     *            value is a Map to represent Attribute-Value Pairs.
986     * @return Set of <code>AMDynamicGroup</code> objects created
987     * @throws AMException
988     *             if an error is encountered when trying to access/retrieve
989     *             data from the data store.
990     * @throws SSOException
991     *             if the single sign on token is no longer valid.
992     */
993    public Set createDynamicGroups(Map dynamicGroups) throws AMException,
994            SSOException;
995
996    /**
997     * Deletes dynamic groups.
998     * 
999     * @param dynamicGroups
1000     *            The set of dynamic groups's DNs to be deleted.
1001     * @throws AMException
1002     *             if there is an internal error in the access management data
1003     *             store.
1004     * @throws SSOException
1005     *             if the single sign on token is no longer valid
1006     */
1007    public void deleteDynamicGroups(Set dynamicGroups) throws AMException,
1008            SSOException;
1009
1010    /**
1011     * Gets the dynamic groups within the specified level.
1012     * 
1013     * @param level
1014     *            The search level starting from the organization unit.
1015     * @return The Set of DNs of dynamic groups within the specified level.
1016     * @throws AMException
1017     *             if an error is encountered when trying to access/retrieve
1018     *             data from the data store
1019     * @throws SSOException
1020     *             if the single sign on token is no longer valid
1021     */
1022    public Set getDynamicGroups(int level) throws AMException, SSOException;
1023
1024    /**
1025     * Gets number of dynamic groups within the specified level.
1026     * 
1027     * @param level
1028     *            The search level starting from the organization unit.
1029     * @return Number of dynamic groups within the specified level.
1030     * @throws AMException
1031     *             if an error is encountered when trying to access/retrieve
1032     *             data from the data store
1033     * @throws SSOException
1034     *             if the single sign on token is no longer valid
1035     */
1036    public long getNumberOfDynamicGroups(int level) throws AMException,
1037            SSOException;
1038
1039    /**
1040     * Searches for dynamic groups in this organization unit using wildcards.
1041     * Wildcards can be specified such as a*, *, *a.
1042     * 
1043     * @param wildcard
1044     *            wildcard pattern to be used in the search
1045     * @param level
1046     *            the search level that needs to be used (
1047     *            <code>AMConstants.SCOPE_ONE</code>
1048     *            or <code>AMConstants.SCOPE_SUB</code>)
1049     * @return Set Set of DNs of dynamic groups matching the search
1050     * @throws AMException
1051     *             if there is an internal error in the access management data
1052     *             store
1053     * @throws SSOException
1054     *             if the single sign on token is no longer valid.
1055     */
1056    public Set searchDynamicGroups(String wildcard, int level)
1057            throws AMException, SSOException;
1058
1059    /**
1060     * Searches for dynamic groups in this organization unit using wildcards.
1061     * Wildcards can be specified such as a*, *, *a.
1062     * 
1063     * @param wildcard
1064     *            wildcard pattern to be used in the search
1065     * @param searchControl
1066     *            specifies the search scope to be used, VLV ranges etc.
1067     * @return <code>AMSearchResults</code> which contains a Set of DNs of
1068     *         dynamic groups matching the search.
1069     * @throws AMException
1070     *             if an error is encountered when trying to access/retrieve
1071     *             data from the data store.
1072     * @throws SSOException
1073     *             if the single sign on token is no longer valid
1074     */
1075    public AMSearchResults searchDynamicGroups(String wildcard,
1076            AMSearchControl searchControl) throws AMException, SSOException;
1077
1078    /**
1079     * Searches for dynamic groups in this organization unit using wildcards and
1080     * attribute values. Wildcards can be specified such as a*, *, *a. To
1081     * further refine the search, attribute-value pairs can be specified so that
1082     * DNs of dynamic groups with matching attribute-value pairs will be
1083     * returned.
1084     * 
1085     * @param wildcard
1086     *            wildcard pattern to be used in the search
1087     * @param avPairs
1088     *            attribute-value pairs to match when searching dynamic groups.
1089     * @param level
1090     *            the search level that needs to be used (
1091     *            <code>AMConstants.SCOPE_ONE</code>
1092     *            or <code>AMConstants.SCOPE_SUB</code>).
1093     * @return Set of DNs of dynamic groups matching the search
1094     * @throws AMException
1095     *             if an error is encountered when trying to access/retrieve
1096     *             data from the data store.
1097     * @throws SSOException
1098     *             if the single sign on token is no longer valid.
1099     */
1100    public Set searchDynamicGroups(String wildcard, Map avPairs, int level)
1101            throws AMException, SSOException;
1102
1103    /**
1104     * Searches for dynamic groups in this organization unit using wildcards and
1105     * attribute values. Wildcards can be specified such as a*, *, *a. To
1106     * further refine the search, attribute-value pairs can be specified so that
1107     * DNs of dynamic groups with matching attribute-value pairs will be
1108     * returned.
1109     * 
1110     * @param wildcard
1111     *            wildcard pattern to be used in the search
1112     * @param avPairs
1113     *            attribute-value pairs to match when searching dynamic groups.
1114     * @param searchControl
1115     *            specifies the search scope to be used, VLV ranges etc.
1116     * @return <code>AMSearchResults</code> which contains a Set of DNs of
1117     *         dynamic groups matching the search.
1118     * @throws AMException
1119     *             if an error is encountered when trying to access/retrieve
1120     *             data from the data store.
1121     * @throws SSOException
1122     *             if the single sign on token is no longer valid.
1123     */
1124    public AMSearchResults searchDynamicGroups(String wildcard, Map avPairs,
1125            AMSearchControl searchControl) throws AMException, SSOException;
1126
1127    /**
1128     * Creates static groups.
1129     * 
1130     * @param groups
1131     *            The set of static groups's names to be created.
1132     * @return set of <code>AMStaticGroup</code> objects created.
1133     * @throws AMException
1134     *             if an error is encountered when trying to access/retrieve
1135     *             data from the data store
1136     * @throws SSOException
1137     *             if the single sign on token is no longer valid
1138     */
1139    public Set createStaticGroups(Set groups) throws AMException, SSOException;
1140
1141    /**
1142     * Deletes static groups.
1143     * 
1144     * @param groups
1145     *            The set of static groups's DNs to be deleted.
1146     * 
1147     * @throws AMException
1148     *             if an error is encountered when trying to access/retrieve
1149     *             data from the data store
1150     * @throws SSOException
1151     *             if the single sign on token is no longer valid
1152     */
1153    public void deleteStaticGroups(Set groups) throws AMException, SSOException;
1154
1155    /**
1156     * Gets the static groups within the specified level.
1157     * 
1158     * @param level
1159     *            The search level starting from the organizational unit.
1160     * @return The Set of DNs of static Groups within the specified level.
1161     * @throws AMException
1162     *             if an error is encountered when trying to access/retrieve
1163     *             data from the data store
1164     * @throws SSOException
1165     *             if the single sign on token is no longer valid
1166     */
1167    public Set getStaticGroups(int level) throws AMException, SSOException;
1168
1169    /**
1170     * Gets number of static groups within the specified level.
1171     * 
1172     * @param level
1173     *            The search level starting from the organizational unit.
1174     * @return Number of static groups within the specified level.
1175     * @throws AMException
1176     *             if an error is encountered when trying to access/retrieve
1177     *             data from the data store
1178     * @throws SSOException
1179     *             if the single sign on token is no longer valid
1180     */
1181    public long getNumberOfStaticGroups(int level) throws AMException,
1182            SSOException;
1183
1184    /**
1185     * Searches for static groups in this organizational unit using wildcards.
1186     * Wildcards can be specified such as a*, *, *a.
1187     * 
1188     * @param wildcard
1189     *            wildcard pattern to be used in the search
1190     * @param level
1191     *            the search level that needs to be used (
1192     *            <code>AMConstants.SCOPE_ONE</code>
1193     *            or <code>AMConstants.SCOPE_SUB</code>).
1194     * @return Set Set of DNs of static groups matching the search
1195     * 
1196     * @throws AMException
1197     *             if an error is encountered when trying to access/retrieve
1198     *             data from the data store
1199     * @throws SSOException
1200     *             if the single sign on token is no longer valid
1201     */
1202    public Set searchStaticGroups(String wildcard, int level)
1203            throws AMException, SSOException;
1204
1205    /**
1206     * Searches for static groups in this organizational unit using wildcards.
1207     * Wildcards can be specified such as a*, *, *a.
1208     * 
1209     * @param wildcard
1210     *            wildcard pattern to be used in the search.
1211     * @param searchControl
1212     *            specifies the search scope to be used, VLV ranges etc.
1213     * @return <code>AMSearchResults</code> which contains a Set of DNs of
1214     *         static groups matching the search.
1215     * @throws AMException
1216     *             if an error is encountered when trying to access/retrieve
1217     *             data from the data store.
1218     * @throws SSOException
1219     *             if the single sign on token is no longer valid.
1220     */
1221    public AMSearchResults searchStaticGroups(String wildcard,
1222            AMSearchControl searchControl) throws AMException, SSOException;
1223
1224    /**
1225     * Searches for static groups in this organizational unit using wildcards
1226     * and attribute values. Wildcards can be specified such as a*, *, *a. To
1227     * further refine the search, attribute-value pairs can be specified so that
1228     * DNs of static groups with matching attribute-value pairs will be
1229     * returned.
1230     * 
1231     * @param wildcard
1232     *            wildcard pattern to be used in the search
1233     * @param avPairs
1234     *            attribute-value pairs to match when searching static groups
1235     * @param level
1236     *            the search level that needs to be used (
1237     *            <code>AMConstants.SCOPE_ONE</code>
1238     *            or <code>AMConstants.SCOPE_SUB</code>)
1239     * @return Set Set of DNs of static groups matching the search
1240     * 
1241     * @throws AMException
1242     *             if an error is encountered when trying to access/retrieve
1243     *             data from the data store
1244     * @throws SSOException
1245     *             if the single sign on token is no longer valid
1246     */
1247    public Set searchStaticGroups(String wildcard, Map avPairs, int level)
1248            throws AMException, SSOException;
1249
1250    /**
1251     * Searches for static groups in this organizational unit using wildcards
1252     * and attribute values. Wildcards can be specified such as a*, *, *a. To
1253     * further refine the search, attribute-value pairs can be specified so that
1254     * DNs of static groups with matching attribute-value pairs will be
1255     * returned.
1256     * 
1257     * @param wildcard
1258     *            wildcard pattern to be used in the search.
1259     * @param avPairs
1260     *            attribute-value pairs to match when searching static groups.
1261     * @param searchControl
1262     *            specifies the search scope to be used, VLV ranges etc.
1263     * @return <code>AMSearchResults</code> which contains a Set of DNs of
1264     *         static groups matching the search.
1265     * @throws AMException
1266     *             if an error is encountered when trying to access/retrieve
1267     *             data from the data store.
1268     * @throws SSOException
1269     *             if the single sign on token is no longer valid.
1270     */
1271    public AMSearchResults searchStaticGroups(String wildcard, Map avPairs,
1272            AMSearchControl searchControl) throws AMException, SSOException;
1273
1274    /**
1275     * Searches for groups in this organizational unit using wildcards and
1276     * attribute values. Wildcards can be specified such as a*, *, *a.
1277     * 
1278     * @param wildcard
1279     *            wildcard pattern to be used in the search
1280     * @param avPairs
1281     *            attribute-value pairs to match when searching groups
1282     * @param level
1283     *            the search level that needs to be used (
1284     *            <code>AMConstants.SCOPE_ONE</code>
1285     *            or <code>AMConstants.SCOPE_SUB</code>)
1286     * @return Set DNs of groups matching the search
1287     * @throws AMException
1288     *             if an error is encountered when trying to access/retrieve
1289     *             data from the data store
1290     * @throws SSOException
1291     *             if the single sign on token is no longer valid
1292     */
1293    public Set searchGroups(String wildcard, Map avPairs, int level)
1294            throws AMException, SSOException;
1295
1296    /**
1297     * Searches for groups in this organizational unit using wildcards and
1298     * attribute values. Wildcards can be specified such as a*, *, *a.
1299     * 
1300     * @param wildcard
1301     *            wildcard pattern to be used in the search.
1302     * @param avPairs
1303     *            attribute-value pairs to match when searching groups.
1304     * @param searchControl
1305     *            specifies the search scope to be used.
1306     * @return <code>AMSearchResults</code> which contains Set a of DNs of
1307     *         groups matching the search.
1308     * @throws AMException
1309     *             if an error is encountered when trying to access/retrieve
1310     *             data from the data store.
1311     * @throws SSOException
1312     *             if the single sign on token is no longer valid.
1313     */
1314    public AMSearchResults searchGroups(String wildcard, Map avPairs,
1315            AMSearchControl searchControl) throws AMException, SSOException;
1316
1317    /**
1318     * Creates people containers.
1319     * 
1320     * @param peopleContainers
1321     *            set of people containers' names to be created.
1322     * @return set of <code>PeopleContainer</code> objects created
1323     * @throws AMException
1324     *             if an error is encountered when trying to access/retrieve
1325     *             data from the data store.
1326     * @throws SSOException
1327     *             if the single sign on token is no longer valid.
1328     */
1329    public Set createPeopleContainers(Set peopleContainers) throws AMException,
1330            SSOException;
1331
1332    /**
1333     * Creates people containers and initializes their attributes.
1334     * 
1335     * @param peopleContainers
1336     *            Map where the key is the name of the people container, and the
1337     *            value is a Map to represent attribute-value pairs.
1338     * @return set of people container objects created.
1339     * @throws AMException
1340     *             if there is an internal error in the access management data
1341     *             store.
1342     * @throws SSOException
1343     *             if the single sign on token is no longer valid
1344     */
1345    public Set createPeopleContainers(Map peopleContainers) throws AMException,
1346            SSOException;
1347
1348    /**
1349     * Creates people containers and initializes their attributes.
1350     * 
1351     * @param peopleContainers
1352     *            Map where the key is the name of the people container, and the
1353     *            value is a Map to represent Attribute-Value Pairs.
1354     * @throws AMException
1355     *             if an error is encountered when trying to access/retrieve
1356     *             data from the data store.
1357     * @throws SSOException
1358     *             if the single sign on token is no longer valid.
1359     */
1360    public void deletePeopleContainers(Set peopleContainers)
1361            throws AMException, SSOException;
1362
1363    /**
1364     * Gets the people containers within the specified level.
1365     * 
1366     * @param level
1367     *            The search level starting from the organizational unit.
1368     * @return The Set of people containers within the specified level.
1369     * @throws AMException
1370     *             if an error is encountered when trying to access/retrieve
1371     *             data from the data store
1372     * @throws SSOException
1373     *             if the single sign on token is no longer valid
1374     */
1375    public Set getPeopleContainers(int level) throws AMException, SSOException;
1376
1377    /**
1378     * Gets number of people containers within the specified level.
1379     * 
1380     * @param level
1381     *            The search level starting from the organizational unit.
1382     * @return long Number of people containers within the specified level.
1383     * @throws AMException
1384     *             if an error is encountered when trying to access/retrieve
1385     *             data from the data store
1386     * @throws SSOException
1387     *             if the single sign on token is no longer valid
1388     */
1389    public long getNumberOfPeopleContainers(int level) throws AMException,
1390            SSOException;
1391
1392    /**
1393     * Searches for people containers in this organizational unit using
1394     * wildcards and attribute values. Wildcards can be specified such as a*, *,
1395     * *a.
1396     * 
1397     * @param wildcard
1398     *            wildcard pattern to be used in the search
1399     * @param level
1400     *            the search level that needs to be used (
1401     *            <code>AMConstants.SCOPE_ONE</code>
1402     *            or <code>AMConstants.SCOPE_SUB</code>)
1403     * @return Set DNs of people containers matching the search
1404     * @throws AMException
1405     *             if an error is encountered when trying to access/retrieve
1406     *             data from the data store
1407     * @throws SSOException
1408     *             if the single sign on token is no longer valid
1409     */
1410    public Set searchPeopleContainers(String wildcard, int level)
1411            throws AMException, SSOException;
1412
1413    /**
1414     * Searches for people containers in this organizational unit using
1415     * wildcards and attribute values. Wildcards can be specified such as a*, *,
1416     * *a.
1417     * 
1418     * @param wildcard
1419     *            wildcard pattern to be used in the search.
1420     * @param searchControl
1421     *            specifies the search scope to be used, VLV ranges etc.
1422     * @return <code>AMSearchResults</code> which contains a Set DNs of people
1423     *         containers matching the search.
1424     * @throws AMException
1425     *             if an error is encountered when trying to access/retrieve
1426     *             data from the data store.
1427     * @throws SSOException
1428     *             if the single sign on token is no longer valid.
1429     */
1430    public AMSearchResults searchPeopleContainers(String wildcard,
1431            AMSearchControl searchControl) throws AMException, SSOException;
1432
1433    /**
1434     * Searches for people containers in this organizational unit using
1435     * wildcards * and * attribute values. Wildcards can be specified such as
1436     * a*, *, *a. To further refine the search, attribute-value pairs can be
1437     * specified so that DNs of people containers with matching attribute-value
1438     * pairs will be returned.
1439     * 
1440     * @param wildcard
1441     *            pattern to be used in the search.
1442     * @param avPairs
1443     *            attribute-value pairs to match when searching people
1444     *            containers.
1445     * @param level
1446     *            the search level that needs to be used (
1447     *            <code>AMConstants.SCOPE_ONE</code>
1448     *            or <code>AMConstants.SCOPE_SUB</code>).
1449     * @return Set DNs of people containers matching the search.
1450     * @throws AMException
1451     *             if an error is encountered when trying to access/retrieve
1452     *             data from the data store.
1453     * @throws SSOException
1454     *             if the single sign on token is no longer valid.
1455     */
1456    public Set searchPeopleContainers(String wildcard, Map avPairs, int level)
1457            throws AMException, SSOException;
1458
1459    /**
1460     * Searches for people containers in this organizational unit using
1461     * wildcards * and * attribute values. Wildcards can be specified such as
1462     * a*, *, *a. To further refine the search, attribute-value pairs can be
1463     * specified so that DNs of people containers with matching attribute-value
1464     * pairs will be returned.
1465     * 
1466     * @param wildcard
1467     *            wildcard pattern to be used in the search
1468     * @param avPairs
1469     *            attribute-value pairs to match when searching people
1470     *            containers.
1471     * @param searchControl
1472     *            specifies the search scope to be used, VLV ranges etc.
1473     * @return <code>AMSearchResults</code> which contains a Set DNs of people
1474     *         containers matching the search.
1475     * @throws AMException
1476     *             if an error is encountered when trying to access/retrieve
1477     *             data from the data store.
1478     * @throws SSOException
1479     *             if the single sign on token is no longer valid
1480     */
1481    public AMSearchResults searchPeopleContainers(String wildcard, Map avPairs,
1482            AMSearchControl searchControl) throws AMException, SSOException;
1483
1484    /**
1485     * Creates group containers.
1486     * 
1487     * @param groupContainers
1488     *            The set of group containers' names to be created
1489     * @return set of <code>GroupContainer</code> objects created.
1490     * @throws AMException
1491     *             if an error is encountered when trying to access/retrieve
1492     *             data from the data store.
1493     * @throws SSOException
1494     *             if the single sign on token is no longer valid.
1495     */
1496    public Set createGroupContainers(Set groupContainers) throws AMException,
1497            SSOException;
1498
1499    /**
1500     * Creates group containers and initializes their attributes.
1501     * 
1502     * @param groupContainers
1503     *            Map where the key is the name of the
1504     *            <code>groupContainer</code>, and the value is a Map to
1505     *            represent Attribute-Value Pairs.
1506     * @return set of <code>GroupContainer</code> objects created.
1507     * @throws AMException
1508     *             if an error is encountered when trying to access/retrieve
1509     *             data from the data store.
1510     * @throws SSOException
1511     *             if the single sign on token is no longer valid.
1512     */
1513    public Set createGroupContainers(Map groupContainers) throws AMException,
1514            SSOException;
1515
1516    /**
1517     * Deletes group containers.
1518     * 
1519     * @param groupContainers
1520     *            The set of group containers' DN to be deleted.
1521     * 
1522     * @throws AMException
1523     *             if an error is encountered when trying to access/retrieve
1524     *             data from the data store
1525     * @throws SSOException
1526     *             if the single sign on token is no longer valid
1527     */
1528    public void deleteGroupContainers(Set groupContainers) throws AMException,
1529            SSOException;
1530
1531    /**
1532     * Gets the group containers within the specified level.
1533     * 
1534     * @param level
1535     *            The search level starting from the organizational unit.
1536     * @return The Set of group containers within the specified level.
1537     * @throws AMException
1538     *             if an error is encountered when trying to access/retrieve
1539     *             data from the data store
1540     * @throws SSOException
1541     *             if the single sign on token is no longer valid
1542     */
1543    public Set getGroupContainers(int level) throws AMException, SSOException;
1544
1545    /**
1546     * Gets number of group containers within the specified level.
1547     * 
1548     * @param level
1549     *            The search level starting from the organizational unit.
1550     * @return long Number of group containers within the specified level.
1551     * @throws AMException
1552     *             if an error is encountered when trying to access/retrieve
1553     *             data from the data store
1554     * @throws SSOException
1555     *             if the single sign on token is no longer valid
1556     */
1557    public long getNumberOfGroupContainers(int level) throws AMException,
1558            SSOException;
1559
1560    /**
1561     * Searches for group containers in this organizational unit using wildcards
1562     * and attribute values. Wildcards can be specified such as a*, *, *a. To
1563     * further refine the search, attribute-value pairs can be specified so that
1564     * DNs of group containers with matching attribute-value pairs will be
1565     * returned.
1566     * 
1567     * @param wildcard
1568     *            wildcard pattern to be used in the search
1569     * @param avPairs
1570     *            attribute-value pairs to match when searching group containers
1571     * @param level
1572     *            the search level that needs to be used (
1573     *            <code>AMConstants.SCOPE_ONE</code>
1574     *            or <code>AMConstants.SCOPE_SUB</code>)
1575     * @return Set DNs of group containers matching the search
1576     * @throws AMException
1577     *             if an error is encountered when trying to access/retrieve
1578     *             data from the data store
1579     * @throws SSOException
1580     *             if the single sign on token is no longer valid
1581     */
1582    public Set searchGroupContainers(String wildcard, Map avPairs, int level)
1583            throws AMException, SSOException;
1584
1585    /**
1586     * Searches for group containers in this organizational unit using wildcards
1587     * and attribute values. Wildcards can be specified such as a*, *, *a. To
1588     * further refine the search, attribute-value pairs can be specified so that
1589     * DNs of group containers with matching attribute-value pairs will be
1590     * returned.
1591     * 
1592     * @param wildcard
1593     *            pattern to be used in the search.
1594     * @param avPairs
1595     *            attribute-value pairs to match when searching group
1596     *            containers.
1597     * @param searchControl
1598     *            specifies the search scope to be used, VLV ranges etc.
1599     * @return <code>AMSearchResults</code> which contains a Set DNs of group
1600     *         containers matching the search.
1601     * @throws AMException
1602     *             if there is an internal error in the access management data
1603     *             store.
1604     * @throws SSOException
1605     *             if the single sign on token is no longer valid.
1606     */
1607    public AMSearchResults searchGroupContainers(String wildcard, Map avPairs,
1608            AMSearchControl searchControl) throws AMException, SSOException;
1609
1610    /**
1611     * Creates users and initializes their attributes. For each user the, object
1612     * classes specified by organization type attribute
1613     * <code>iplanet-am-required-services</code> of the service
1614     * <code>iPlanetAMAdminConsoleService</code> template are added. If a
1615     * corresponding template does not exist, the default values are picked up
1616     * from schema.
1617     * 
1618     * @param users
1619     *            Map where the key is the name of the user, and the value is a
1620     *            Map to represent Attribute-Value Pairs
1621     * @return Set Set of User objects created
1622     * @throws AMException
1623     *             if there is an internal error in the access management data
1624     *             store
1625     * @throws SSOException
1626     *             if the single sign on token is no longer valid
1627     */
1628    public Set createUsers(Set users) throws AMException, SSOException;
1629
1630    /**
1631     * Creates users and initializes their attributes.For each user the, object
1632     * classes specified by organization type attribute
1633     * <code>iplanet-am-required-services</code> of the service
1634     * <code>iPlanetAMAdminConsoleService</code> template are added. If a
1635     * corresponding template does not exist, the default values are picked up
1636     * from schema.
1637     * 
1638     * @param users
1639     *            Map where the key is the name of the user, and the value is a
1640     *            Map to represent Attribute-Value Pairs
1641     * @return Set Set of User objects created
1642     * @throws AMException
1643     *             if an error is encountered when trying to access/retrieve
1644     *             data from the data store
1645     * @throws SSOException
1646     *             if the single sign on token is no longer valid
1647     */
1648    public Set createUsers(Map users) throws AMException, SSOException;
1649
1650    /**
1651     * Deletes users from this organizational unit.
1652     * 
1653     * @param users
1654     *            The set of user DN's to be deleted from the organizational
1655     *            unit.
1656     * 
1657     * @throws AMException
1658     *             if an error is encountered when trying to access/retrieve
1659     *             data from the data store
1660     * @throws SSOException
1661     *             if the single sign on token is no longer valid
1662     */
1663    public void deleteUsers(Set users) throws AMException, SSOException;
1664
1665    /**
1666     * Gets the names (DNs) of users in the organizational unit.
1667     * 
1668     * @return Set The names(DNs) of users in the organizational unit.
1669     * 
1670     * @throws AMException
1671     *             if an error is encountered when trying to access/retrieve
1672     *             data from the data store
1673     * @throws SSOException
1674     *             if the single sign on token is no longer valid
1675     */
1676    public Set getUserDNs() throws AMException, SSOException;
1677
1678    /**
1679     * Gets number of users within the specified level.
1680     * 
1681     * @param level
1682     *            The search level starting from the organizational unit.
1683     * @return Number of users within the specified level.
1684     * @throws AMException
1685     *             if an error is encountered when trying to access/retrieve
1686     *             data from the data store
1687     * @throws SSOException
1688     *             if the single sign on token is no longer valid
1689     */
1690    public long getNumberOfUsers(int level) throws AMException, SSOException;
1691
1692    /**
1693     * Searches for users in this organizational unit using wildcards and
1694     * attribute values. Wildcards can be specified such as a*, *, *a.
1695     * 
1696     * @param wildcard
1697     *            wildcard pattern to be used in the search
1698     * @param level
1699     *            the search level that needs to be used (
1700     *            <code>AMConstants.SCOPE_ONE</code>
1701     *            or <code>AMConstants.SCOPE_SUB</code>)
1702     * @return Set DNs of Users matching the search
1703     * @throws AMException
1704     *             if an error is encountered when trying to access/retrieve
1705     *             data from the data store
1706     * @throws SSOException
1707     *             if the single sign on token is no longer valid
1708     */
1709    public Set searchUsers(String wildcard, int level) throws AMException,
1710            SSOException;
1711
1712    /**
1713     * Searches for users in this organizational unit using wildcards and
1714     * attribute values. Wildcards can be specified such as a*, *, *a.
1715     * 
1716     * @param wildcard
1717     *            wildcard pattern to be used in the search.
1718     * @param searchControl
1719     *            specifies the search scope to be used, VLV ranges etc.
1720     * @return <code>AMSearchResults</code> which contains a Set DNs of Users
1721     *         matching the search.
1722     * @throws AMException
1723     *             if an error is encountered when trying to access/retrieve
1724     *             data from the data store.
1725     * @throws SSOException
1726     *             if the single sign on token is no longer valid
1727     */
1728    public AMSearchResults searchUsers(String wildcard,
1729            AMSearchControl searchControl) throws AMException, SSOException;
1730
1731    /**
1732     * Searches for users in this organizational unit using wildcards and
1733     * attribute values. Wildcards can be specified such as a*, *, *a. To
1734     * further refine the search, attribute-value pairs can be specified so that
1735     * DNs of users with matching attribute-value pairs will be returned.
1736     * 
1737     * @param wildcard
1738     *            wildcard pattern to be used in the search
1739     * @param avPairs
1740     *            attribute-value pairs to match when searching users
1741     * @param level
1742     *            the search level that needs to be used (
1743     *            <code>AMConstants.SCOPE_ONE</code>
1744     *            or <code>AMConstants.SCOPE_SUB</code>)
1745     * @return Set DNs of Users matching the search
1746     * @throws AMException
1747     *             if an error is encountered when trying to access/retrieve
1748     *             data from the data store
1749     * @throws SSOException
1750     *             if the single sign on token is no longer valid
1751     */
1752    public Set searchUsers(String wildcard, Map avPairs, int level)
1753            throws AMException, SSOException;
1754
1755    /**
1756     * Searches for users in this organizational unit using wildcards and
1757     * attribute values. Wildcards can be specified such as a*, *, *a. To
1758     * further refine the search, attribute-value pairs can be specified so that
1759     * DNs of users with matching attribute-value pairs will be returned.
1760     * 
1761     * @param wildcard
1762     *            wildcard pattern to be used in the search
1763     * @param avPairs
1764     *            attribute-value pairs to match when searching users
1765     * @param searchControl
1766     *            specifies the search scope to be used, VLV ranges etc.
1767     * @return <code>AMSearchResults</code> which contains a Set of DNs of
1768     *         Users matching the search.
1769     * @throws AMException
1770     *             if an error is encountered when trying to access/retrieve
1771     *             data from the data store.
1772     * @throws SSOException
1773     *             if the single sign on token is no longer valid
1774     */
1775    public AMSearchResults searchUsers(String wildcard, Map avPairs,
1776            AMSearchControl searchControl) throws AMException, SSOException;
1777
1778    /**
1779     * Searches for users in this organizational unit using wildcards and
1780     * filter. Wildcards can be specified such as a*, *, *a. To further refine
1781     * the search, filter can be specified so that DNs of users with matching
1782     * filter will be returned.
1783     * 
1784     * @param wildcard
1785     *            wildcard pattern to be used in the search.
1786     * @param searchControl
1787     *            specifies the search scope to be used, VLV ranges etc.
1788     * @param avfilter
1789     *            this attribute-value pairs filter will be logical AND with
1790     *            user search filter.
1791     * @return <code>AMSearchResults</code> which contains a Set DNs of Users
1792     *         matching the search.
1793     * @throws AMException
1794     *             if an error is encountered when trying to access/retrieve
1795     *             data from the data store.
1796     * @throws SSOException
1797     *             if the single sign on token is no longer valid.
1798     */
1799    public AMSearchResults searchUsers(String wildcard,
1800            AMSearchControl searchControl, String avfilter) throws AMException,
1801            SSOException;
1802
1803    /**
1804     * Searches for users in this organization attribute values. Wildcards such
1805     * as can be specified for the attribute values. The DNs of users with
1806     * matching attribute-value pairs will be returned.
1807     * 
1808     * @param searchControl
1809     *            specifies the search scope to be used, VLV ranges etc.
1810     * @param avfilter
1811     *            this attribute-value pairs filter will be logical AND with
1812     *            user search filter.
1813     * @return <code>AMSearchResults</code> which contains a Set DNs of Users
1814     *         matching the search.
1815     * @throws AMException
1816     *             if there is an internal error in the access management data
1817     *             store.
1818     * @throws SSOException
1819     *             if the single sign on token is no longer valid
1820     */
1821    public AMSearchResults searchUsers(AMSearchControl searchControl,
1822            String avfilter) throws AMException, SSOException;
1823
1824    /**
1825     * Returns the number of services.
1826     * 
1827     * @return number of services.
1828     * @throws AMException
1829     *             if an error is encountered when trying to access/retrieve
1830     *             data from the data store
1831     * @throws SSOException
1832     *             if the single sign on token is no longer valid
1833     */
1834    public long getNumberOfServices() throws AMException, SSOException;
1835
1836    /**
1837     * Gets the names of registered services.
1838     * 
1839     * @return The Set of the names of registered services.
1840     * @throws AMException
1841     *             if an error is encountered when trying to access/retrieve
1842     *             data from the data store
1843     * @throws SSOException
1844     *             if the single sign on token is no longer valid
1845     */
1846    public Set getRegisteredServiceNames() throws AMException, SSOException;
1847
1848    /**
1849     * Register a service for this organizational unit.
1850     * 
1851     * @param serviceName
1852     *            The name of service to be registered
1853     * @param createTemplate
1854     *            true if to create default template
1855     * @param activate
1856     *            true if to activate the service
1857     * @throws AMException
1858     *             if the service does not exist or could not be registered.
1859     * @throws SSOException
1860     *             if the single sign on token is no longer valid.
1861     */
1862    public void registerService(String serviceName, boolean createTemplate,
1863            boolean activate) throws AMException, SSOException;
1864
1865    /**
1866     * Unregister a service for this organizational unit.
1867     * 
1868     * @param serviceName
1869     *            service name to be unregistered
1870     * @throws AMException
1871     *             if the service does not exist or could not be unregistered.
1872     * @throws SSOException
1873     *             if the single sign on token is no longer valid.
1874     */
1875    public void unregisterService(String serviceName) throws AMException,
1876            SSOException;
1877
1878    /**
1879     * Unassigns the given policies from this organizational unit and its roles.
1880     * 
1881     * @param serviceName
1882     *            service name.
1883     * @param policyDNs
1884     *            Set of policy DN string
1885     * 
1886     * @throws AMException
1887     *             if an error is encountered when trying to access/retrieve
1888     *             data from the data store.
1889     * @throws SSOException
1890     *             if the single sign on token is no longer valid.
1891     */
1892    public void unassignAllPolicies(String serviceName, Set policyDNs)
1893            throws AMException, SSOException;
1894
1895    /**
1896     * Modifies all the templates under this organizational unit that contain
1897     * any <code>policyDN</code> in given <code>policyDNs</code>.
1898     * 
1899     * @param serviceName
1900     *            service name.
1901     * @param policyDNs
1902     *            Set of policy DN string.
1903     * @throws AMException
1904     *             if an error is encountered when trying to access/retrieve
1905     *             data from the data store.
1906     * @throws SSOException
1907     *             if the single sign on token is no longer valid.
1908     */
1909    public void modifyAllPolicyTemplates(String serviceName, Set policyDNs)
1910            throws AMException, SSOException;
1911
1912    /**
1913     * Deletes all the named policy templates for this Organizational Unit
1914     * corresponding to the given policy. This includes organizational based and
1915     * role based policy templates. This is a convenience method.
1916     * 
1917     * @param policyDN
1918     *            a policy DN string.
1919     * @return true if templates existed and were deleted.
1920     * @throws AMException
1921     *             if an error is encountered when trying to access/retrieve
1922     *             data from the data store.
1923     * @throws SSOException
1924     *             if the single sign on token is no longer valid.
1925     */
1926    public boolean deleteAllNamedPolicyTemplates(String policyDN)
1927            throws AMException, SSOException;
1928
1929    /**
1930     * Returns all the assigned policies for this organizational unit.
1931     * 
1932     * @return a set of assigned policy DNs
1933     * @throws AMException
1934     *             if an error is encountered when trying to access/retrieve
1935     *             data from the data store.
1936     * @throws SSOException
1937     *             if the single sign on token is no longer valid.
1938     */
1939    public Set getAssignedPolicyDNs() throws AMException, SSOException;
1940
1941    /**
1942     * Returns true if a <code>policyDN</code> is assigned to this
1943     * organizational unit or a role.
1944     * 
1945     * @param policyDN
1946     *            a policy DN.
1947     * @param serviceName
1948     *            service name.
1949     * @return true if policy is assigned to an organization or role.
1950     * @throws AMException
1951     *             if an error is encountered when trying to access/retrieve
1952     *             data from the data store
1953     * @throws SSOException
1954     *             if the single sign on token is no longer valid
1955     */
1956    public boolean isPolicyAssigned(String policyDN, String serviceName)
1957            throws AMException, SSOException;
1958
1959    /**
1960     * Returns true if an organizational template exists for the service.
1961     * 
1962     * @param serviceName
1963     *            service name
1964     * @return true if the organizational template exists.
1965     * @throws AMException
1966     *             if an error is encountered when trying to access/retrieve
1967     *             data from the data store
1968     * @throws SSOException
1969     *             if the single sign on token is no longer valid
1970     */
1971    public boolean orgTemplateExists(String serviceName) throws AMException,
1972            SSOException;
1973
1974    /**
1975     * Assign service to the organizational unit. Also sets the attributes as
1976     * provided in the map. If the service is already assigned to the user than
1977     * it sets the attribute-values as defined in the attribute map. Attribute
1978     * value is validated before being set. Any values for attributes already
1979     * there are replaced with the ones provided in the attribute map.
1980     * 
1981     * @param serviceName
1982     *            Name of service to be assigned to user.
1983     * @param attrMap
1984     *            Map of attribute name and values (as a Set) to be set
1985     * @throws AMException
1986     *             if an error is encounters when trying to access/retrieve data
1987     *             from the data store.
1988     * @throws SSOException
1989     *             if the single sign on token is no longer valid.
1990     */
1991    public void assignService(String serviceName, Map attrMap)
1992            throws AMException, SSOException;
1993
1994    /**
1995     * Unassigns services from the organizational unit. Also removes service
1996     * specific attributes, if defined in the user entry.
1997     * 
1998     * @param serviceNames
1999     *            Set of service names.
2000     * @throws AMException
2001     *             if an error is encountered when trying to access/retrieve
2002     *             data from the data store.
2003     * @throws SSOException
2004     *             if the single sign on token is no longer valid.
2005     */
2006    public void unassignServices(Set serviceNames) throws AMException,
2007            SSOException;
2008
2009    /**
2010     * Create managed entities in this container. Supported entities, as defined
2011     * in the configuration service <code>DAI</code>, can be created using
2012     * this method.
2013     * 
2014     * @param type
2015     *            Type of entity to be create (For example "user" or "agent"
2016     * @param entities
2017     *            Set of names for the entities to be created
2018     * @return Set of <code>AMEntity</code> objects
2019     * @throws AMException
2020     *             If there is an error when trying to save to the data store
2021     * @throws SSOException
2022     *             if the single sign on token is invalid.
2023     */
2024    public Set createEntities(String type, Set entities) throws AMException,
2025            SSOException;
2026
2027    /**
2028     * Creates entities and initializes their attributes. Supported entities, as
2029     * defined in the configuration service <code>DAI</code>, can be created
2030     * using this method.
2031     * 
2032     * @param stype
2033     *            Type of entity to be create (For example "user" or "agent"
2034     * @param entities
2035     *            Map where the key is the name of the entity, and the value is
2036     *            a Map to represent Attribute-Value Pairs
2037     * @return Set of <code>AMEntity</code> objects created
2038     * @throws AMException
2039     *             if an error is encountered when trying to create entity in
2040     *             the data store.
2041     * @throws SSOException
2042     *             if the single sign on token is no longer valid
2043     */
2044    public Set createEntities(String stype, Map entities) throws AMException,
2045            SSOException;
2046
2047    /**
2048     * Searches for resources in this organization using wildcards and attribute
2049     * values. Wildcards can be specified such as a*, *, *a. SDK uses the
2050     * <code>eSearchTemplate</code>, if provided. Otherwise, it uses the
2051     * <code>BasicEntitySearch</code> template.
2052     * 
2053     * @param wildcard
2054     *            wildcard pattern to be used in the search
2055     * @param level
2056     *            the search level that needs to be used (
2057     *            <code>AMConstants.SCOPE_ONE</code>
2058     *            or <code>AMConstants.SCOPE_SUB</code>)
2059     * @param eSearchTemplate
2060     *            Name of search template to be used. If a null is passed then
2061     *            the default search template for entities
2062     *            <code>BasicEntitySearch</code> is used.
2063     * @param avPairs
2064     *            This option can be used to further qualify the search filter.
2065     *            The attribute-value pairs provided by this map are appended to
2066     *            the search filter.
2067     * @return Set DNs of resources matching the search.
2068     * @throws AMException
2069     *             if an error is encountered when trying to access/retrieve
2070     *             data from the data store.
2071     * @throws SSOException
2072     *             if the single sign on token is no longer valid.
2073     */
2074    public Set searchEntities(String wildcard, int level,
2075            String eSearchTemplate, Map avPairs) throws AMException,
2076            SSOException;
2077
2078    /**
2079     * Searches for resources in this people container using wildcards and
2080     * attribute values. Wildcards can be specified such as a*, *, *a. To
2081     * further refine the search, attribute-value pairs can be specified so that
2082     * DNs of users with matching attribute-value pairs will be returned.
2083     * 
2084     * @param wildcard
2085     *            wildcard pattern to be used in the search.
2086     * @param avPairs
2087     *            attribute-value pairs to match when searching users
2088     * @param eSearchTemplate
2089     *            Name of search template to be used.
2090     * @param searchControl
2091     *            specifies the search scope to be used, VLV ranges etc.
2092     * @return <code>AMSearchResults</code> which contains a Set DNs of
2093     *         resources matching the search.
2094     * @throws AMException
2095     *             if an error is encountered when trying to access/retrieve
2096     *             data from the data store.
2097     * @throws SSOException
2098     *             if the single sign on token is no longer valid.
2099     */
2100    public AMSearchResults searchEntities(String wildcard, Map avPairs,
2101            String eSearchTemplate, AMSearchControl searchControl)
2102            throws AMException, SSOException;
2103
2104    /**
2105     * Searches for entities in this container using wildcards and a filter.
2106     * Wildcards can be specified such as a*, *, *a. To further refine the
2107     * search, a filter can be passed, which is used to further qualify the
2108     * basic entity search filter.
2109     * 
2110     * @param wildcard
2111     *            pattern to be used in the search.
2112     * @param searchControl
2113     *            specifies the search scope to be used, VLV ranges etc.
2114     * @param avfilter
2115     *            this attribute-value pairs filter will be logical AND with
2116     *            user search filter.
2117     * @param eSearchTemplate
2118     *            Name of search template to be used. If a null is passed then
2119     *            the default search template for entities
2120     *            <code>BasicEntitySearch</code> is used.
2121     * @return <code>AMSearchResults</code> which contains a Set DNs of users
2122     *         matching the search.
2123     * @throws AMException
2124     *             if an error is encountered when trying to access/retrieve
2125     *             data from the data store.
2126     * @throws SSOException
2127     *             if the single sign on token is no longer valid.
2128     */
2129    public AMSearchResults searchEntities(String wildcard,
2130            AMSearchControl searchControl, String avfilter,
2131            String eSearchTemplate) throws AMException, SSOException;
2132
2133    /**
2134     * Deletes a set of resources in this people container.
2135     * 
2136     * @param resources
2137     *            The set of resource DNs to be removed.
2138     * @throws AMException
2139     *             if an error is encountered when trying to access/retrieve
2140     *             data from the data store.
2141     * @throws SSOException
2142     *             if the single sign on token is no longer valid.
2143     */
2144    public void deleteEntities(Set resources) throws AMException, SSOException;
2145
2146    /**
2147     * Returns a set of the supported entity names in this container. This will
2148     * help the application or console determine what kind of entities are
2149     * stored in this container, and accordingly look for them.
2150     * 
2151     * @return Set of names of the supported objects in this container.
2152     * @throws AMException
2153     *             if an error is encountered when trying to access/retrieve
2154     *             data from the data store.
2155     * @throws SSOException
2156     *             if the single sign on token is no longer valid.
2157     */
2158    public Set getSupportedTypes() throws AMException, SSOException;
2159
2160    /**
2161     * Sets the list of supported types for this container.
2162     * 
2163     * @param sTypes
2164     *            The set of supported entity names.
2165     * @throws AMException
2166     *             if an error is encountered when trying to access/retrieve
2167     *             data from the data store.
2168     * @throws SSOException
2169     *             if the single sign on token is no longer valid.
2170     */
2171    public void setSupportedTypes(Set sTypes) throws AMException, SSOException;
2172
2173}