org.fcrepo.server.utilities
Class ServerUtility

java.lang.Object
  extended by org.fcrepo.server.utilities.ServerUtility

public class ServerUtility
extends Object


Field Summary
static String FEDORA_REDIRECT_PORT
           
static String FEDORA_SERVER_CONTEXT
           
static String FEDORA_SERVER_HOST
           
static String FEDORA_SERVER_PORT
           
static String HTTP
           
static String HTTPS
           
 
Constructor Summary
ServerUtility()
           
 
Method Summary
static String getBaseURL(String protocol)
          Get the baseURL of the Fedora server from the host and port configured.
static boolean isURLFedoraServer(String url)
          Tell whether the given URL appears to be referring to somewhere within the Fedora webapp.
static void main(String[] args)
          Command-line entry point to reload policies.
static InputStream modifyDatastreamControlGroup(String protocol, String user, String pass, String pidspec, String datastreamspec, String controlGroup, boolean addXMLHeader, boolean reformat, boolean setMIMETypeCharset)
           
static boolean pingServer(String protocol, String user, String pass)
          Tell whether the server is running by pinging it as a client.
static void reloadPolicies(String protocol, String user, 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 String HTTP
See Also:
Constant Field Values

HTTPS

public static final String HTTPS
See Also:
Constant Field Values

FEDORA_SERVER_HOST

public static final String FEDORA_SERVER_HOST
See Also:
Constant Field Values

FEDORA_SERVER_PORT

public static final String FEDORA_SERVER_PORT
See Also:
Constant Field Values

FEDORA_SERVER_CONTEXT

public static final String FEDORA_SERVER_CONTEXT
See Also:
Constant Field Values

FEDORA_REDIRECT_PORT

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

ServerUtility

public ServerUtility()
Method Detail

pingServer

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


getBaseURL

public static String getBaseURL(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(String protocol,
                                  String user,
                                  String pass)
                           throws IOException
Signals for the server to reload its policies.

Throws:
IOException

isURLFedoraServer

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


modifyDatastreamControlGroup

public static InputStream modifyDatastreamControlGroup(String protocol,
                                                       String user,
                                                       String pass,
                                                       String pidspec,
                                                       String datastreamspec,
                                                       String controlGroup,
                                                       boolean addXMLHeader,
                                                       boolean reformat,
                                                       boolean setMIMETypeCharset)
                                                throws IOException
Throws:
IOException

main

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



Copyright © 2012 DuraSpace. All Rights Reserved.