View Javadoc

1   package com.atlassian.user.impl;
2   
3   import com.atlassian.user.EntityException;
4   import com.atlassian.user.User;
5   import com.atlassian.user.UserManager;
6   
7   public abstract class ReadOnlyUserManager implements UserManager
8   {
9       public User createUser(String username) throws EntityException
10      {
11          throw new UnsupportedOperationException("Cannot write to read-only UserManager [" + getIdentifier().getKey() +"]");
12      }
13  
14      public void alterPassword(User user, String plainTextPass) throws EntityException
15      {
16          throw new UnsupportedOperationException("Cannot write to read-only UserManager [" + getIdentifier().getKey() + "]");
17      }
18  
19      public void saveUser(User user) throws EntityException
20      {
21          throw new UnsupportedOperationException("Cannot write to read-only UserManager [" + getIdentifier().getKey() + "]");
22      }
23  
24      public void removeUser(User user) throws EntityException
25      {
26          throw new UnsupportedOperationException("Cannot write to read-only UserManager [" + getIdentifier().getKey() + "]");
27      }
28  
29      public boolean isReadOnly(User user) throws EntityException
30      {
31          return (getUser(user.getName()) != null);
32      }
33  
34      public boolean isCreative()
35      {
36          return false;
37      }
38  }