|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ginp.setup.SetupManagerImpl
public class SetupManagerImpl
Implementation of Setup Manager
SetupManager| Constructor Summary | |
|---|---|
SetupManagerImpl()
|
|
| Method Summary | |
|---|---|
boolean |
configExists(java.net.URL configUrl)
Is there an existing valid config on this machine? |
void |
createConfiguration(java.net.URL configUrl,
java.lang.String configuration)
Create a configuration |
void |
deleteConfiguration(java.net.URL configUrl)
Delete the configuration entry for this host |
java.lang.String |
finalPageTransform(SetupVisit config)
Transform the visit for the file page |
java.lang.String |
getCommandLineForSetupVisit(SetupVisit visit)
Generates a command line from a setup visit |
java.util.List |
getDirectoriesInPictureDirectory(SetupVisit sampleConfig)
Find the available directories to configure in the sample configuration |
SetupVisit |
getSetupVisitForCommandLine(java.lang.String[] argv)
Parses a setup visit out of a command line |
void |
setConfiguration(SetupVisit visit)
Sets the configuration in the preferences from the visit's path and url |
org.dom4j.Document |
testValidConfig(java.io.InputStream stream)
Tests if a configuration passes validation |
java.lang.Boolean |
validConfigLoc(java.lang.String path)
Check if this is a valid location for a config file that means usually is this directory writable |
java.lang.Boolean |
validPicturesLoc(java.lang.String path)
Test for valid picture location. |
boolean |
writeConfig(SetupVisit visit,
org.dom4j.Document outputDocument)
Write a config file to disk |
org.dom4j.Document |
writeConfigFromVisit(SetupVisit visit)
Build and write config file for Ginp from the Tapestry Setup Visit Object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SetupManagerImpl()
| Method Detail |
|---|
public boolean configExists(java.net.URL configUrl)
SetupManager
configExists in interface SetupManagerconfigUrl - the URL identifying the config to check
SetupManager.configExists(URL configUrl)public void deleteConfiguration(java.net.URL configUrl)
SetupManager
deleteConfiguration in interface SetupManagerconfigUrl - the url that the config is forSetupManager.deleteConfiguration(java.net.URL)
public void createConfiguration(java.net.URL configUrl,
java.lang.String configuration)
throws SetupException
SetupManager
createConfiguration in interface SetupManagerconfigUrl - the url to configure forconfiguration - the configuration value
SetupExceptionSetupManager.createConfiguration(java.net.URL, java.lang.String)public java.lang.Boolean validConfigLoc(java.lang.String path)
SetupManager
validConfigLoc in interface SetupManagerpath - the path
SetupManager.validConfigLoc(java.lang.String)
public org.dom4j.Document testValidConfig(java.io.InputStream stream)
throws SetupException,
java.io.IOException
SetupManager
testValidConfig in interface SetupManagerstream - an input stream containing the file
SetupException - if there's a problem reading the doc
note: don't be fooled, we can't report the path of the
offending document because it is supplied as a Stream.
java.io.IOExceptionSetupManager.testValidConfig(java.io.InputStream)public java.lang.Boolean validPicturesLoc(java.lang.String path)
SetupManager
validPicturesLoc in interface SetupManagerpath - the file system path
SetupManager.validPicturesLoc(java.lang.String)
public org.dom4j.Document writeConfigFromVisit(SetupVisit visit)
throws SetupException
SetupManager
writeConfigFromVisit in interface SetupManagervisit - the visit object
SetupExceptionSetupManager.writeConfigFromVisit(net.sf.ginp.setup.data.SetupVisit)
public boolean writeConfig(SetupVisit visit,
org.dom4j.Document outputDocument)
throws java.io.FileNotFoundException,
java.io.UnsupportedEncodingException,
java.io.IOException
SetupManager
writeConfig in interface SetupManagervisit - outputDocument -
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
public java.lang.String finalPageTransform(SetupVisit config)
throws javax.xml.transform.TransformerException,
org.dom4j.DocumentException
SetupManager
finalPageTransform in interface SetupManagerconfig - the config file.
javax.xml.transform.TransformerException
org.dom4j.DocumentExceptionSetupManager.finalPageTransform(net.sf.ginp.setup.data.SetupVisit)public java.lang.String getCommandLineForSetupVisit(SetupVisit visit)
SetupManager
getCommandLineForSetupVisit in interface SetupManagervisit - the setup visit
SetupManager.getCommandLineForSetupVisit(net.sf.ginp.setup.data.SetupVisit)
public SetupVisit getSetupVisitForCommandLine(java.lang.String[] argv)
throws org.dom4j.DocumentException,
javax.xml.transform.TransformerException
SetupManager
getSetupVisitForCommandLine in interface SetupManagerargv - the command line args
org.dom4j.DocumentException - if problem generating config from sample visit
javax.xml.transform.TransformerException - if problem generating config from sample visitSetupManager.getSetupVisitForCommandLine(java.lang.String[])public java.util.List getDirectoriesInPictureDirectory(SetupVisit sampleConfig)
SetupManager
getDirectoriesInPictureDirectory in interface SetupManagersampleConfig -
SetupManager.getDirectoriesInPictureDirectory(net.sf.ginp.setup.data.SetupVisit)
public void setConfiguration(SetupVisit visit)
throws java.net.MalformedURLException,
SetupException
setConfiguration in interface SetupManagervisit - the Setup Visit
SetupException
java.net.MalformedURLExceptionSetupManager.setConfiguration(net.sf.ginp.setup.data.SetupVisit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||