Class 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
    • 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 file
      boolean isApproved​(java.lang.String url)
      Check whether this server was approved by the user
      void removeServerURL​(java.lang.String url)
      Remove an URL from the set of approved URLs
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServerURLManager

        public ServerURLManager()
    • 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