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, SSHA_PREFIX -
Constructor Summary
Constructors Constructor Description DummyUserDatabase() -
Method Summary
Modifier and Type Method Description voiddeleteByLoginName(String loginName)No-op.UserProfilefindByEmail(String index)No-op; always throwsNoSuchPrincipalException.UserProfilefindByFullName(String index)No-op; always throwsNoSuchPrincipalException.UserProfilefindByLoginName(String index)No-op; always throwsNoSuchPrincipalException.UserProfilefindByUid(String uid)No-op; always throwsNoSuchPrincipalException.UserProfilefindByWikiName(String index)No-op; always throwsNoSuchPrincipalException.Principal[]getWikiNames()No-op.voidinitialize(Engine engine, Properties props)No-op.voidrename(String loginName, String newName)No-op; always throwsNoSuchPrincipalException.voidsave(UserProfile profile)No-op.Methods inherited from class org.apache.wiki.auth.user.AbstractUserDatabase
find, generateUid, getHash, getPrincipals, newProfile, parseLong, validatePassword
-
Constructor Details
-
DummyUserDatabase
public DummyUserDatabase()
-
-
Method Details
-
deleteByLoginName
No-op.- Parameters:
loginName- the login name to delete
-
findByEmail
No-op; always throwsNoSuchPrincipalException.- Specified by:
findByEmailin interfaceUserDatabase- Specified by:
findByEmailin classAbstractUserDatabase- Parameters:
index- the name to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException- always...- See Also:
UserDatabase.findByEmail(java.lang.String)
-
findByFullName
No-op; always throwsNoSuchPrincipalException.- Specified by:
findByFullNamein interfaceUserDatabase- Specified by:
findByFullNamein classAbstractUserDatabase- Parameters:
index- the name to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException- always...- See Also:
UserDatabase.findByFullName(java.lang.String)
-
findByLoginName
No-op; always throwsNoSuchPrincipalException.- Specified by:
findByLoginNamein interfaceUserDatabase- Specified by:
findByLoginNamein classAbstractUserDatabase- Parameters:
index- the name to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException- always...- See Also:
UserDatabase.findByLoginName(java.lang.String)
-
findByUid
No-op; always throwsNoSuchPrincipalException.- Parameters:
uid- the unique identifier to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException- always...
-
findByWikiName
No-op; always throwsNoSuchPrincipalException.- Specified by:
findByWikiNamein interfaceUserDatabase- Specified by:
findByWikiNamein classAbstractUserDatabase- Parameters:
index- the name to search for- Returns:
- the user profile
- Throws:
NoSuchPrincipalException- always...- See Also:
UserDatabase.findByWikiName(java.lang.String)
-
getWikiNames
No-op.- Returns:
- a zero-length array
-
initialize
No-op.- Specified by:
initializein interfaceUserDatabase- Specified by:
initializein 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
No-op; always throwsNoSuchPrincipalException.- Parameters:
loginName- the login namenewName- the proposed new login name- Throws:
NoSuchPrincipalException- always...
-
save
No-op.- Specified by:
savein interfaceUserDatabase- Specified by:
savein classAbstractUserDatabase- Parameters:
profile- the user profile- See Also:
UserDatabase.save(org.apache.wiki.auth.user.UserProfile)
-