1 package com.atlassian.user.impl.osuser;
2
3 /**
4 * An Atlassian {@link OSUUserManager} needs to be able
5 * to reference an DelegationAccessor whenever it constructs a {@link com.opensymphony.user.User} and uses this interface to do it.
6 *
7 * The {@link com.opensymphony.user.ManagerAccessor} lets the {@link com.opensymphony.user.UserManager}
8 * locate appropriate providers to use when reconstructing an entity - which is to say for each
9 * getUser('fred') call a new {@link com.opensymphony.user.User} object is constructed,
10 * with the capability to reference a {@link CredentialsProvider}.
11 *
12 * The {@link com.opensymphony.user.ManagerAccessor} therefore offers accessors to providers for the {@link com.opensymphony.user.UserManager},
13 * as a helper access object.
14 *
15 * As provider information is served out by the accessor for osuser needs, Atlassian User reuses this interface as a way to
16 * find its provider information for the entity managers - {@link OSUUserManager} and {@link OSUGroupManager}.
17 *
18 * One important thing to note is that the Atlassian User OSUAccessor extension has to operate in a delegated environment,
19 * where a number of OSUAccessor objects might
20 * exist, so it specifies a one-to-one relationship between the entity managers ({@link OSUUserManager}, {@link OSUGroupManager}) and
21 * the accessor. The original OSUUser UserManager singleton maintained static lists of all providers and used the ManagerAccessor as a means
22 * of letting each constructed {@link com.opensymphony.user.Entity} find the appropriate one.
23 */
24
25 import com.opensymphony.user.provider.AccessProvider;
26 import com.opensymphony.user.provider.CredentialsProvider;
27 import com.opensymphony.user.provider.ProfileProvider;
28 import com.opensymphony.user.provider.UserProvider;
29
30 import java.util.Collection;
31 import java.util.List;
32
33 public interface OSUAccessor extends com.opensymphony.user.ManagerAccessor
34 {
35 AccessProvider getAccessProvider();
36
37 CredentialsProvider getCredentialsProvider();
38
39 ProfileProvider getProfileProvider();
40
41 void setCredentialsProvider(CredentialsProvider credentialsProvider);
42
43 void setAccessProvider(AccessProvider accessProvider);
44
45 void setProfileProvider(ProfileProvider profileProvider);
46 }