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, m_engine, SHA_PREFIX, SHA256_PREFIX, SSHA_PREFIX`

## Constructor Summary

Constructors
Constructor
Description
`DummyUserDatabase()`

## Method Summary

Modifier and Type
Method
Description
`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(org.apache.wiki.api.core.Engine 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 org.apache.wiki.auth.user.AbstractUserDatabase

`find, generateUid, getHash, getPrincipals, newProfile, parseLong, validatePassword, validatePasswordReuse`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DummyUserDatabase

public DummyUserDatabase()

## Method Details

### deleteByLoginName

public void deleteByLoginName(String loginName)
No-op.

Parameters:
  `loginName` - the login name to delete

### 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` - always...
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` - always...
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` - always...
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` - always...

### 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` - always...
See Also:
  - `UserDatabase.findByWikiName(java.lang.String)`

### getWikiNames

public Principal[] getWikiNames()
No-op.

Returns:
  a zero-length array

### initialize

public void initialize(org.apache.wiki.api.core.Engine engine, Properties props)
No-op.

Specified by:
  `initialize` in interface `UserDatabase`
Overrides:
  `initialize` in class `AbstractUserDatabase`
Parameters:
  `engine` - the wiki engine
  `props` - 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(String loginName, String newName) throws NoSuchPrincipalException
No-op; always throws `NoSuchPrincipalException`.

Parameters:
  `loginName` - the login name
  `newName` - the proposed new login name
Throws:
  `NoSuchPrincipalException` - always...

### save

public void save(UserProfile profile)
No-op.

Specified by:
  `save` in interface `UserDatabase`
Specified by:
  `save` in class `AbstractUserDatabase`
Parameters:
  `profile` - the user profile
See Also:
  - `UserDatabase.save(org.apache.wiki.auth.user.UserProfile)`