fedora.server.utilities
Class ServerUtility

java.lang.Object
  extended by fedora.server.utilities.ServerUtility

public class ServerUtility
extends java.lang.Object


Field Summary
static java.lang.String FEDORA_REDIRECT_PORT
           
static java.lang.String FEDORA_SERVER_HOST
           
static java.lang.String FEDORA_SERVER_PORT
           
static java.lang.String HTTP
           
static java.lang.String HTTPS
           
 
Constructor Summary
ServerUtility()
           
 
Method Summary
static java.lang.String getBaseURL(java.lang.String protocol)
          Get the baseURL of the Fedora server from the host and port configured.
static boolean isURLFedoraServer(java.lang.String url)
          Tell whether the given URL appears to be referring to somewhere within the Fedora webapp.
static void main(java.lang.String[] args)
          Command-line entry point to reload policies.
static boolean pingServer(java.lang.String protocol, java.lang.String user, java.lang.String pass)
          Tell whether the server is running by pinging it as a client.
static void reloadPolicies(java.lang.String protocol, java.lang.String user, java.lang.String pass)
          Signals for the server to reload its policies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP

public static final java.lang.String HTTP
See Also:
Constant Field Values

HTTPS

public static final java.lang.String HTTPS
See Also:
Constant Field Values

FEDORA_SERVER_HOST

public static final java.lang.String FEDORA_SERVER_HOST
See Also:
Constant Field Values

FEDORA_SERVER_PORT

public static final java.lang.String FEDORA_SERVER_PORT
See Also:
Constant Field Values

FEDORA_REDIRECT_PORT

public static final java.lang.String FEDORA_REDIRECT_PORT
See Also:
Constant Field Values
Constructor Detail

ServerUtility

public ServerUtility()
Method Detail

pingServer

public static boolean pingServer(java.lang.String protocol,
                                 java.lang.String user,
                                 java.lang.String pass)
Tell whether the server is running by pinging it as a client.


getBaseURL

public static java.lang.String getBaseURL(java.lang.String protocol)
Get the baseURL of the Fedora server from the host and port configured. It will look like http://localhost:8080/fedora


reloadPolicies

public static void reloadPolicies(java.lang.String protocol,
                                  java.lang.String user,
                                  java.lang.String pass)
                           throws java.io.IOException
Signals for the server to reload its policies.

Throws:
java.io.IOException

isURLFedoraServer

public static boolean isURLFedoraServer(java.lang.String url)
Tell whether the given URL appears to be referring to somewhere within the Fedora webapp.


main

public static void main(java.lang.String[] args)
Command-line entry point to reload policies. Takes 3 args: protocol user pass