public class FileUserManager extends UserManager
ILifecycle.DeferrableActivation| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
fileName |
users| Constructor and Description |
|---|
FileUserManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doBeforeActivate() |
protected void |
doDeactivate() |
java.io.File |
getFile() |
java.lang.String |
getFileName() |
protected void |
load(java.util.Map<java.lang.String,char[]> users) |
protected void |
load(java.util.Map<java.lang.String,char[]> users,
java.io.InputStream stream) |
protected java.io.File |
resolveFile(java.lang.String fileName) |
protected void |
save(java.util.Map<java.lang.String,char[]> users) |
protected void |
save(java.util.Map<java.lang.String,char[]> users,
java.io.FileOutputStream stream) |
void |
setFileName(java.lang.String fileName)
Sets the name of the file to be used by this user manager.
|
addUser, authenticate, doActivate, encrypt, getPassword, removeUseractivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringaddListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, getListeners, hasListeners, removeListenerpublic java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
The file is resolved in the following order:
config folder.
addUser() or removeUser() are called.
With "-Dnet4j.security.FileUserManager.fallBackToConfigFolder=true" a relative path is resolved in both the application's current folder and the config folder (in this order).
public final java.io.File getFile()
protected java.io.File resolveFile(java.lang.String fileName)
throws java.lang.Exception
java.lang.Exceptionprotected void doBeforeActivate()
throws java.lang.Exception
doBeforeActivate in class Lifecyclejava.lang.Exceptionprotected void doDeactivate()
throws java.lang.Exception
doDeactivate in class UserManagerjava.lang.Exceptionprotected void load(java.util.Map<java.lang.String,char[]> users)
throws IORuntimeException
load in class UserManagerIORuntimeExceptionprotected void load(java.util.Map<java.lang.String,char[]> users,
java.io.InputStream stream)
throws java.io.IOException
java.io.IOExceptionprotected void save(java.util.Map<java.lang.String,char[]> users)
throws IORuntimeException
save in class UserManagerIORuntimeExceptionprotected void save(java.util.Map<java.lang.String,char[]> users,
java.io.FileOutputStream stream)
throws java.io.IOException
java.io.IOExceptionCopyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html