01: /*
02: * Created on Dec 20, 2004
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package net.sf.drftpd.master.config;
08:
09: import java.io.IOException;
10: import java.util.List;
11: import java.util.Observer;
12: import java.util.Properties;
13:
14: import net.sf.drftpd.util.PortRange;
15:
16: import org.drftpd.GlobalContext;
17: import org.drftpd.commands.Reply;
18: import org.drftpd.permissions.PathPermission;
19: import org.drftpd.remotefile.LinkedRemoteFileInterface;
20: import org.drftpd.usermanager.User;
21:
22: /**
23: * @author mog
24: *
25: * TODO To change the template for this generated type comment go to
26: * Window - Preferences - Java - Code Style - Code Templates
27: */
28: public interface ConfigInterface {
29: public abstract boolean checkPathPermission(String key,
30: User fromUser, LinkedRemoteFileInterface path);
31:
32: public abstract boolean checkPathPermission(String key,
33: User fromUser, LinkedRemoteFileInterface path,
34: boolean defaults);
35:
36: public abstract boolean checkPermission(String key, User user);
37:
38: public abstract void directoryMessage(Reply response, User user,
39: LinkedRemoteFileInterface dir);
40:
41: /**
42: * @return Returns the bouncerIp.
43: */
44: public abstract List getBouncerIps();
45:
46: public abstract float getCreditCheckRatio(
47: LinkedRemoteFileInterface path, User fromUser);
48:
49: public abstract float getCreditCheckRatio(String path, User fromUser);
50:
51: public abstract float getCreditLossRatio(
52: LinkedRemoteFileInterface path, User fromUser);
53:
54: public abstract String getDirName(String name);
55:
56: public abstract String getFileName(String name);
57:
58: public abstract GlobalContext getGlobalContext();
59:
60: public abstract boolean getHideIps();
61:
62: public abstract String getLoginPrompt();
63:
64: public abstract int getMaxUsersExempt();
65:
66: public abstract int getMaxUsersTotal();
67:
68: public abstract void loadConfig(Properties cfg, GlobalContext gctx)
69: throws IOException;
70:
71: public abstract void addPathPermission(String key,
72: PathPermission permission);
73:
74: /**
75: * Returns true if user is allowed into a shutdown server.
76: */
77: public abstract boolean isLoginAllowed(User user);
78:
79: public abstract PortRange getPortRange();
80:
81: public abstract void addObserver(Observer observer);
82:
83: public abstract String getPasvAddress() throws NullPointerException;
84: }
|