project35.util
Class ConfigurationURLUtility

java.lang.Object
  extended by project35.util.ConfigurationURLUtility

public class ConfigurationURLUtility
extends Object

utility for creating the URL or full file path of a resource file. Usually resoure files in Project35 are found in the "resources" folder inside a model folder.


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net),

Constructor Summary
ConfigurationURLUtility()
           
 
Method Summary
 URL createHelpLink(Project35FormContext project35FormContext, String fileNameCandidate, boolean isInternalHelpPage)
           
 URL createHelpLink(String fileNameCandidate)
           
static URL createHelpLinkForJARFile(URL helpDirectoryURL, String fileNameCandidate)
           
static File createResourceFile(URL resourceDirectoryURL, String fileNameCandidate)
           
static URL createResourceURL(URL resourceDirectoryURL, String fileNameCandidate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationURLUtility

public ConfigurationURLUtility()
Method Detail

createHelpLink

public URL createHelpLink(String fileNameCandidate)

createHelpLink

public URL createHelpLink(Project35FormContext project35FormContext,
                          String fileNameCandidate,
                          boolean isInternalHelpPage)

createHelpLinkForJARFile

public static URL createHelpLinkForJARFile(URL helpDirectoryURL,
                                           String fileNameCandidate)

createResourceFile

public static File createResourceFile(URL resourceDirectoryURL,
                                      String fileNameCandidate)
Parameters:
resourceDirectoryURL - describes location of a directory where resource files can be found
fileNameCandidate - the name of a file found in the resource directory
Returns:
full path of a resource file that uses the name of the file and a resource directory

createResourceURL

public static URL createResourceURL(URL resourceDirectoryURL,
                                    String fileNameCandidate)
Parameters:
resourceDirectoryURL - describes location of a directory where resource files can be found
fileNameCandidate - the name of a file found in the resource directory
Returns:
URL of a resource file that uses the name of the file and a resource directory URL