001: /*
002: * Copyright 2004 Outerthought bvba and Schaubroeck nv
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.outerj.daisy.repository.commonimpl.user;
017:
018: import org.outerj.daisy.repository.user.*;
019: import org.outerj.daisy.repository.RepositoryException;
020: import org.outerj.daisy.repository.commonimpl.AuthenticatedUser;
021:
022: public class UserManagerImpl implements UserManager {
023: private CommonUserManager delegate;
024: /* Mind the fully qualified name of this user!
025: * This needs to happen because we clearly need
026: * a distinction between an Authenticated User
027: * and a User meant for User Management!
028: */
029: private org.outerj.daisy.repository.commonimpl.AuthenticatedUser user;
030:
031: public UserManagerImpl(CommonUserManager commonUserManager,
032: AuthenticatedUser user) {
033: delegate = commonUserManager;
034: this .user = user;
035: }
036:
037: public Users getUsers() throws RepositoryException {
038: return delegate.getUsers(user);
039: }
040:
041: public long[] getUserIds() throws RepositoryException {
042: return delegate.getUserIds(user);
043: }
044:
045: public PublicUserInfo getPublicUserInfo(long userId)
046: throws RepositoryException {
047: return delegate.getPublicUserInfo(userId);
048: }
049:
050: public PublicUserInfo getPublicUserInfo(String login)
051: throws RepositoryException {
052: return delegate.getPublicUserInfo(login);
053: }
054:
055: public PublicUserInfos getPublicUserInfos()
056: throws RepositoryException {
057: return delegate.getPublicUserInfos(user);
058: }
059:
060: public Roles getRoles() throws RepositoryException {
061: return delegate.getRoles(user);
062: }
063:
064: public User createUser(String login) {
065: return delegate.createUser(login, user);
066: }
067:
068: public void deleteUser(long userId) throws RepositoryException {
069: delegate.deleteUser(userId, user);
070: }
071:
072: public Role createRole(String roleName) {
073: return delegate.createRole(roleName, user);
074: }
075:
076: public User getUser(String login, boolean updateable)
077: throws RepositoryException {
078: return delegate.getUser(login, updateable, user);
079: }
080:
081: public Role getRole(String name, boolean updateable)
082: throws RepositoryException {
083: return delegate.getRole(name, updateable, user);
084: }
085:
086: public void deleteRole(long roleId) throws RepositoryException {
087: delegate.deleteRole(roleId, user);
088: }
089:
090: public User getUser(long userId, boolean updateable)
091: throws RepositoryException {
092: return delegate.getUser(userId, updateable, user);
093: }
094:
095: public Role getRole(long roleId, boolean updateable)
096: throws RepositoryException {
097: return delegate.getRole(roleId, updateable, user);
098: }
099:
100: public String getUserDisplayName(long userId)
101: throws RepositoryException {
102: return delegate.getUserDisplayName(userId);
103: }
104:
105: public String getUserLogin(long userId) throws RepositoryException {
106: return delegate.getUserLogin(userId);
107: }
108:
109: public long getUserId(String login) throws RepositoryException {
110: return delegate.getUserId(login);
111: }
112:
113: public String getRoleDisplayName(long roleId)
114: throws RepositoryException {
115: return delegate.getRoleDisplayName(roleId);
116: }
117:
118: public Users getUsersByEmail(String email)
119: throws RepositoryException {
120: return delegate.getUsersByEmail(email, user);
121: }
122:
123: public AuthenticationSchemeInfos getAuthenticationSchemes()
124: throws RepositoryException {
125: return delegate.getAuthenticationSchemes(user);
126: }
127: }
|