Package de.cardcontact.cli
Class ServerURLManager
- java.lang.Object
-
- de.cardcontact.cli.ServerURLManager
-
public class ServerURLManager extends java.lang.Object
This class manages a list of approved server URLs. The URLs will be persistently stored in a property file using the ClientProperties class.- Author:
- lew
-
-
Constructor Summary
Constructors Constructor Description ServerURLManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
approveServerURL(java.lang.String url)
Approving this server and save the URL to a fileboolean
isApproved(java.lang.String url)
Check whether this server was approved by the uservoid
removeServerURL(java.lang.String url)
Remove an URL from the set of approved URLs
-
-
-
Method Detail
-
isApproved
public boolean isApproved(java.lang.String url)
Check whether this server was approved by the user- Parameters:
url
- the server URL- Returns:
- true if the the server is approved, false otherwise
-
approveServerURL
public void approveServerURL(java.lang.String url)
Approving this server and save the URL to a file- Parameters:
url
- the server URL- Throws:
java.io.IOException
-
removeServerURL
public void removeServerURL(java.lang.String url)
Remove an URL from the set of approved URLs- Parameters:
url
- the URL to be removed
-
-