|
Awake File v1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.awakefw.file.api.server.DefaultAwakeFileConfigurator
public class DefaultAwakeFileConfigurator
Default implementation of server side configuration for the Awake File Framework:
user.home/.awake-server-root
, where user.home
is
the one of the Servlet container.
Constructor Summary | |
---|---|
DefaultAwakeFileConfigurator()
Constructor. |
Method Summary | |
---|---|
boolean |
allowCallAfterAnalysis(String username,
Connection connection,
String methodName,
List<Object> params)
Allows, for the passed client username, to define a specific piece of Java code to analyze the method name and it's parameter values before allowing or not it's execution. |
File |
getServerRoot()
Allows to define the Awake File Server root directory for the file storage & access. |
void |
runIfCallRefused(String username,
Connection connection,
String ipAddress,
String methodName,
List<Object> params)
The event will be logged as Level.WARNING in the
user.home/.awake/log/Awake.log file |
boolean |
useOneRootPerUsername()
Allows to define if the Awake File Server must use a root directory per client username for the file storage & access. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAwakeFileConfigurator()
Method Detail |
---|
public boolean allowCallAfterAnalysis(String username, Connection connection, String methodName, List<Object> params) throws IOException, SQLException
AwakeFileConfigurator
allowCallAfterAnalysis
in interface AwakeFileConfigurator
username
- the client username to check the rule forconnection
- the SQL Connection as configured in
AwakeCommonsConfigurator.getConnection()
implementation. Will be null if getConnection()
was no
configured.methodName
- the full method name to call in the format
org.acme.config.package.MyClass.myMethod
params
- the list of parameters passed to the method. Empty list if
none.
true
: all methods called are always allowed
for all client usernames
IOException
- if an IOException occurs
SQLException
- if a SQLException occurspublic File getServerRoot()
AwakeFileConfigurator
getServerRoot
in interface AwakeFileConfigurator
user.home/.awake-server-root
. (user.home
is the one of the
servlet container).public void runIfCallRefused(String username, Connection connection, String ipAddress, String methodName, List<Object> params) throws IOException, SQLException
Level.WARNING
in the
user.home/.awake/log/Awake.log
file
runIfCallRefused
in interface AwakeFileConfigurator
username
- the client usernameconnection
- the SQL Connection as configured in
AwakeCommonsConfigurator.getConnection()
implementation. Will be null if getConnection()
was no
configured.ipAddress
- the IP address of the client usermethodName
- the full method name to call in the format
org.acme.config.package.MyClass.myMethod
params
- the list of parameters passed to the method
IOException
- if an IOException occurs
SQLException
- if a SQLException occurspublic boolean useOneRootPerUsername()
AwakeFileConfigurator
true
, the name of the username will be used as root
directory per user.
useOneRootPerUsername
in interface AwakeFileConfigurator
true
: each user have it's own root
directory. (The root directory name is the login username).
|
Awake File v1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |