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, removeUser
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getListeners, hasListeners, removeListener
public 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.Exception
protected void doBeforeActivate() throws java.lang.Exception
doBeforeActivate
in class Lifecycle
java.lang.Exception
protected void doDeactivate() throws java.lang.Exception
doDeactivate
in class UserManager
java.lang.Exception
protected void load(java.util.Map<java.lang.String,char[]> users) throws IORuntimeException
load
in class UserManager
IORuntimeException
protected void load(java.util.Map<java.lang.String,char[]> users, java.io.InputStream stream) throws java.io.IOException
java.io.IOException
protected void save(java.util.Map<java.lang.String,char[]> users) throws IORuntimeException
save
in class UserManager
IORuntimeException
protected void save(java.util.Map<java.lang.String,char[]> users, java.io.FileOutputStream stream) throws java.io.IOException
java.io.IOException
Copyright (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