source: ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/ComponentRegistryFactory.java @ 1993

Last change on this file since 1993 was 1993, checked in by twagoo, 12 years ago

ComponentRegistryFactory? now using ComponentStatus? and Owner instead of userId and userspace parameter.

Refs #142 and #143

File size: 1.1 KB
Line 
1package clarin.cmdi.componentregistry;
2
3import clarin.cmdi.componentregistry.model.RegistryUser;
4import java.security.Principal;
5import java.util.List;
6
7/**
8 *
9 * @author Twan Goosen <twan.goosen@mpi.nl>
10 */
11public interface ComponentRegistryFactory {
12
13    public static final String ANONYMOUS_USER = "anonymous"; //Default shibboleth fallback.
14
15    List<ComponentRegistry> getAllUserRegistries();
16
17    /**
18     * Gets the specified registry
19     *
20     * @param status status of the registry
21     * @param owner owner of the registry. Passing null will assume the authenticated user as a {@link OwnerUser}
22     * @param credentials credentials that authenticate user, can be left null if requested registry has a public status
23     * @return
24     */
25    ComponentRegistry getComponentRegistry(ComponentStatus status, Owner owner, UserCredentials credentials) throws UserUnauthorizedException;
26
27    ComponentRegistry getOtherUserComponentRegistry(Principal adminPrincipal, ComponentStatus status, Owner owner);
28
29    ComponentRegistry getPublicRegistry();
30
31    RegistryUser getOrCreateUser(UserCredentials credentials);
32}
Note: See TracBrowser for help on using the repository browser.