Package org.apache.wiki.auth.user
Class DummyUserDatabase
- java.lang.Object
-
- org.apache.wiki.auth.user.AbstractUserDatabase
-
- org.apache.wiki.auth.user.DummyUserDatabase
-
- All Implemented Interfaces:
UserDatabase
public class DummyUserDatabase extends AbstractUserDatabase
This is a database that gets used if nothing else is available. It does nothing of note - it just mostly throws NoSuchPrincipalExceptions if someone tries to log in.
-
-
Field Summary
-
Fields inherited from class org.apache.wiki.auth.user.AbstractUserDatabase
log, SHA_PREFIX, SHA256_PREFIX, SSHA_PREFIX
-
-
Constructor Summary
Constructors Constructor Description DummyUserDatabase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteByLoginName(java.lang.String loginName)
No-op.UserProfile
findByEmail(java.lang.String index)
No-op; always throwsNoSuchPrincipalException
.UserProfile
findByFullName(java.lang.String index)
No-op; always throwsNoSuchPrincipalException
.UserProfile
findByLoginName(java.lang.String index)
No-op; always throwsNoSuchPrincipalException
.UserProfile
findByUid(java.lang.String uid)
No-op; always throwsNoSuchPrincipalException
.UserProfile
findByWikiName(java.lang.String index)
No-op; always throwsNoSuchPrincipalException
.java.security.Principal[]
getWikiNames()
No-op.void
initialize(Engine engine, java.util.Properties props)
No-op.void
rename(java.lang.String loginName, java.lang.String newName)
No-op; always throwsNoSuchPrincipalException
.void
save(UserProfile profile)
No-op.-
Methods inherited from class org.apache.wiki.auth.user.AbstractUserDatabase
find, generateUid, getHash, getPrincipals, newProfile, parseLong, validatePassword
-
-
-
-
Constructor Detail
-
DummyUserDatabase
public DummyUserDatabase()
-
-
Method Detail
-
deleteByLoginName
public void deleteByLoginName(java.lang.String loginName)
No-op.- Parameters:
loginName
- the login name to delete
-
findByEmail
public UserProfile findByEmail(java.lang.String index) throws NoSuchPrincipalException
No-op; always throwsNoSuchPrincipalException
.- Specified by:
findByEmail
in interfaceUserDatabase
- Specified by:
findByEmail
in classAbstractUserDatabase
- Parameters:
index
- the name to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException
- always...- See Also:
UserDatabase.findByEmail(java.lang.String)
-
findByFullName
public UserProfile findByFullName(java.lang.String index) throws NoSuchPrincipalException
No-op; always throwsNoSuchPrincipalException
.- Specified by:
findByFullName
in interfaceUserDatabase
- Specified by:
findByFullName
in classAbstractUserDatabase
- Parameters:
index
- the name to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException
- always...- See Also:
UserDatabase.findByFullName(java.lang.String)
-
findByLoginName
public UserProfile findByLoginName(java.lang.String index) throws NoSuchPrincipalException
No-op; always throwsNoSuchPrincipalException
.- Specified by:
findByLoginName
in interfaceUserDatabase
- Specified by:
findByLoginName
in classAbstractUserDatabase
- Parameters:
index
- the name to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException
- always...- See Also:
UserDatabase.findByLoginName(java.lang.String)
-
findByUid
public UserProfile findByUid(java.lang.String uid) throws NoSuchPrincipalException
No-op; always throwsNoSuchPrincipalException
.- Parameters:
uid
- the unique identifier to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException
- always...
-
findByWikiName
public UserProfile findByWikiName(java.lang.String index) throws NoSuchPrincipalException
No-op; always throwsNoSuchPrincipalException
.- Specified by:
findByWikiName
in interfaceUserDatabase
- Specified by:
findByWikiName
in classAbstractUserDatabase
- Parameters:
index
- the name to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException
- always...- See Also:
UserDatabase.findByWikiName(java.lang.String)
-
getWikiNames
public java.security.Principal[] getWikiNames()
No-op.- Returns:
- a zero-length array
-
initialize
public void initialize(Engine engine, java.util.Properties props)
No-op.- Specified by:
initialize
in interfaceUserDatabase
- Specified by:
initialize
in classAbstractUserDatabase
- Parameters:
engine
- the wiki engineprops
- the properties used to initialize the wiki engine- See Also:
UserDatabase.initialize(org.apache.wiki.api.core.Engine, java.util.Properties)
-
rename
public void rename(java.lang.String loginName, java.lang.String newName) throws NoSuchPrincipalException
No-op; always throwsNoSuchPrincipalException
.- Parameters:
loginName
- the login namenewName
- the proposed new login name- Throws:
NoSuchPrincipalException
- always...
-
save
public void save(UserProfile profile)
No-op.- Specified by:
save
in interfaceUserDatabase
- Specified by:
save
in classAbstractUserDatabase
- Parameters:
profile
- the user profile- See Also:
UserDatabase.save(org.apache.wiki.auth.user.UserProfile)
-
-