Package org.eclipse.net4j.util.security
Class FileUserManager
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.security.UserManager
org.eclipse.net4j.util.security.FileUserManager
- All Implemented Interfaces:
INotifier
,INotifier.INotifier2
,IDeactivateable
,ILifecycle
,ILifecycle.DeferrableActivation
,IAuthenticator
,IUserManager
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
Field Summary
Fields inherited from class org.eclipse.net4j.util.security.UserManager
users
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
final File
getFile()
protected void
protected void
load
(Map<String, char[]> users, InputStream stream) protected File
resolveFile
(String fileName) protected void
protected void
save
(Map<String, char[]> users, FileOutputStream stream) void
setFileName
(String fileName) Sets the name of the file to be used by this user manager.Methods inherited from class org.eclipse.net4j.util.security.UserManager
addUser, authenticate, doActivate, encrypt, getPassword, removeUser
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Field Details
-
fileName
-
-
Constructor Details
-
FileUserManager
public FileUserManager()
-
-
Method Details
-
getFileName
-
setFileName
Sets the name of the file to be used by this user manager.The
file
is resolved in the following order:- If it starts with the path segment "@config" the subsequent path segments are interpreted as relative to the
config folder
. - If it is relative it is interpreted as relative to the application's current directory.
- Otherwise it is interpreted as absolute.
addUser()
orremoveUser()
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).
- If it starts with the path segment "@config" the subsequent path segments are interpreted as relative to the
-
getFile
- Since:
- 3.7
-
resolveFile
- Throws:
Exception
- Since:
- 3.7
-
doBeforeActivate
- Overrides:
doBeforeActivate
in classLifecycle
- Throws:
Exception
-
doDeactivate
- Overrides:
doDeactivate
in classUserManager
- Throws:
Exception
-
load
- Overrides:
load
in classUserManager
- Throws:
IORuntimeException
-
load
- Throws:
IOException
-
save
- Overrides:
save
in classUserManager
- Throws:
IORuntimeException
-
save
- Throws:
IOException
-