com.ecyrd.jspwiki.auth
Class UserManager.DummyUserDatabase

java.lang.Object
  extended by com.ecyrd.jspwiki.auth.user.AbstractUserDatabase
      extended by com.ecyrd.jspwiki.auth.UserManager.DummyUserDatabase
All Implemented Interfaces:
UserDatabase
Enclosing class:
UserManager

public static class UserManager.DummyUserDatabase
extends AbstractUserDatabase

This is a database that gets used if nothing else is available. It does nothing of note - it just mostly thorws NoSuchPrincipalExceptions if someone tries to log in.


Field Summary
 
Fields inherited from class com.ecyrd.jspwiki.auth.user.AbstractUserDatabase
log, SHA_PREFIX, SSHA_PREFIX
 
Constructor Summary
UserManager.DummyUserDatabase()
           
 
Method Summary
 void commit()
          No-op.
 void deleteByLoginName(String loginName)
          No-op.
 UserProfile findByEmail(String index)
          No-op; always throws NoSuchPrincipalException.
 UserProfile findByFullName(String index)
          No-op; always throws NoSuchPrincipalException.
 UserProfile findByLoginName(String index)
          No-op; always throws NoSuchPrincipalException.
 UserProfile findByUid(String uid)
          No-op; always throws NoSuchPrincipalException.
 UserProfile findByWikiName(String index)
          No-op; always throws NoSuchPrincipalException.
 Principal[] getWikiNames()
          No-op.
 void initialize(WikiEngine engine, Properties props)
          No-op.
 void rename(String loginName, String newName)
          No-op; always throws NoSuchPrincipalException.
 void save(UserProfile profile)
          No-op.
 
Methods inherited from class com.ecyrd.jspwiki.auth.user.AbstractUserDatabase
find, generateUid, getHash, getOldHash, getPrincipals, newProfile, parseLong, validatePassword
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManager.DummyUserDatabase

public UserManager.DummyUserDatabase()
Method Detail

commit

public void commit()
            throws WikiSecurityException
No-op.

Specified by:
commit in interface UserDatabase
Overrides:
commit in class AbstractUserDatabase
Throws:
WikiSecurityException - never...

deleteByLoginName

public void deleteByLoginName(String loginName)
                       throws WikiSecurityException
No-op.

Parameters:
loginName - the login name to delete
Throws:
WikiSecurityException - never...

findByEmail

public UserProfile findByEmail(String index)
                        throws NoSuchPrincipalException
No-op; always throws NoSuchPrincipalException.

Specified by:
findByEmail in interface UserDatabase
Specified by:
findByEmail in class AbstractUserDatabase
Parameters:
index - the name to search for
Returns:
the user profile
Throws:
NoSuchPrincipalException - never...
See Also:
UserDatabase.findByEmail(java.lang.String)

findByFullName

public UserProfile findByFullName(String index)
                           throws NoSuchPrincipalException
No-op; always throws NoSuchPrincipalException.

Specified by:
findByFullName in interface UserDatabase
Specified by:
findByFullName in class AbstractUserDatabase
Parameters:
index - the name to search for
Returns:
the user profile
Throws:
NoSuchPrincipalException - never...
See Also:
UserDatabase.findByFullName(java.lang.String)

findByLoginName

public UserProfile findByLoginName(String index)
                            throws NoSuchPrincipalException
No-op; always throws NoSuchPrincipalException.

Specified by:
findByLoginName in interface UserDatabase
Specified by:
findByLoginName in class AbstractUserDatabase
Parameters:
index - the name to search for
Returns:
the user profile
Throws:
NoSuchPrincipalException - never...
See Also:
UserDatabase.findByLoginName(java.lang.String)

findByUid

public UserProfile findByUid(String uid)
                      throws NoSuchPrincipalException
No-op; always throws NoSuchPrincipalException.

Parameters:
uid - the unique identifier to search for
Returns:
the user profile
Throws:
NoSuchPrincipalException - never...

findByWikiName

public UserProfile findByWikiName(String index)
                           throws NoSuchPrincipalException
No-op; always throws NoSuchPrincipalException.

Specified by:
findByWikiName in interface UserDatabase
Specified by:
findByWikiName in class AbstractUserDatabase
Parameters:
index - the name to search for
Returns:
the user profile
Throws:
NoSuchPrincipalException - never...
See Also:
UserDatabase.findByWikiName(java.lang.String)

getWikiNames

public Principal[] getWikiNames()
                         throws WikiSecurityException
No-op.

Returns:
a zero-length array
Throws:
WikiSecurityException - never...

initialize

public void initialize(WikiEngine engine,
                       Properties props)
                throws NoRequiredPropertyException
No-op.

Specified by:
initialize in interface UserDatabase
Specified by:
initialize in class AbstractUserDatabase
Parameters:
engine - the wiki engine
props - the properties used to initialize the wiki engine
Throws:
NoRequiredPropertyException - never...
See Also:
UserDatabase.initialize(com.ecyrd.jspwiki.WikiEngine, java.util.Properties)

rename

public void rename(String loginName,
                   String newName)
            throws DuplicateUserException,
                   WikiSecurityException
No-op; always throws NoSuchPrincipalException.

Parameters:
loginName - the login name
newName - the proposed new login name
Throws:
DuplicateUserException - never...
WikiSecurityException - never...

save

public void save(UserProfile profile)
          throws WikiSecurityException
No-op.

Specified by:
save in interface UserDatabase
Specified by:
save in class AbstractUserDatabase
Parameters:
profile - the user profile
Throws:
WikiSecurityException - never...
See Also:
UserDatabase.save(com.ecyrd.jspwiki.auth.user.UserProfile)