|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wookie.w3c.W3CWidgetFactory
public class W3CWidgetFactory
Factory for parsing W3C Widget packages (.wgt files).
To use the factory you MUST supply a valid output directory into which the Factory will unpack the widget. Other factory properties are optional.
Factory properties:
| Constructor Summary | |
|---|---|
W3CWidgetFactory()
|
|
| Method Summary | |
|---|---|
java.io.File |
getUnzippedWidgetDirectory()
|
W3CWidget |
parse(java.io.File zipFile)
Parse a given ZipFile and return a W3CWidget object representing the processed information in the package. |
W3CWidget |
parse(java.io.File zipFile,
java.lang.String defaultIdentifier)
Parse a given ZipFile and return a W3CWidget object representing the processed information in the package. |
W3CWidget |
parse(java.net.URL url)
Parse a widget at a given URL and return a W3CWidget object representing the processed information in the package. |
W3CWidget |
parse(java.net.URL url,
boolean ignoreContentType)
Parse a widget at a given URL and return a W3CWidget object representing the processed information in the package. |
W3CWidget |
parse(java.net.URL url,
boolean ignoreContentType,
java.lang.String defaultIdentifier)
Parse a widget at a given URL and return a W3CWidget object representing the processed information in the package. |
void |
setDigitalSignatureParser(IDigitalSignatureProcessor digitalSignatureParser)
|
void |
setEncodings(java.lang.String[] encodings)
|
void |
setFeatures(java.lang.String[] features)
Set the features to be included when parsing widgets |
void |
setLocales(java.lang.String[] locales)
Set the supported locales to be used when parsing widgets |
void |
setLocalPath(java.lang.String localPath)
Set the base URL to use |
void |
setOutputDirectory(java.lang.String outputDirectory)
Set the directory to use to save widgets. |
void |
setStartPageProcessor(IStartPageProcessor startPageProcessor)
Set the start page processor to use when parsing widgets |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public W3CWidgetFactory()
| Method Detail |
|---|
public void setFeatures(java.lang.String[] features)
features -
public void setOutputDirectory(java.lang.String outputDirectory)
throws java.io.IOException
outputDirectory -
java.io.IOException - if the directory does not existpublic void setStartPageProcessor(IStartPageProcessor startPageProcessor)
startPageProcessor - public void setDigitalSignatureParser(IDigitalSignatureProcessor digitalSignatureParser)
public void setLocales(java.lang.String[] locales)
locales - public void setLocalPath(java.lang.String localPath)
localPath -
java.lang.Exception
public W3CWidget parse(java.io.File zipFile)
throws java.lang.Exception,
BadWidgetZipFileException,
BadManifestException
zipFile -
BadWidgetZipFileException - if there is a problem with the zip package
BadManifestException - if there is a problem with the config.xml manifest file in the package
java.lang.Exception
public W3CWidget parse(java.io.File zipFile,
java.lang.String defaultIdentifier)
throws java.lang.Exception,
BadWidgetZipFileException,
BadManifestException
zipFile - defaultIdentifier - a default identifier to use if the widget package does not have an identifier
BadWidgetZipFileException - if there is a problem with the zip package
BadManifestException - if there is a problem with the config.xml manifest file in the package
java.lang.Exception
public W3CWidget parse(java.net.URL url)
throws BadWidgetZipFileException,
BadManifestException,
InvalidContentTypeException,
java.io.IOException,
java.lang.Exception
url -
BadWidgetZipFileException - if there is a problem with the zip package
BadManifestException - if there is a problem with the config.xml manifest file in the package
InvalidContentTypeException - if the widget has an invalid content type
java.io.IOException - if the widget cannot be downloaded
java.lang.Exception
public W3CWidget parse(java.net.URL url,
boolean ignoreContentType)
throws BadWidgetZipFileException,
BadManifestException,
InvalidContentTypeException,
java.io.IOException,
java.lang.Exception
url - ignoreContentType - set to true to instruct the parser to ignore invalid content type exceptions
BadWidgetZipFileException - if there is a problem with the zip package
BadManifestException - if there is a problem with the config.xml manifest file in the package
InvalidContentTypeException - if the widget has an invalid content type
java.io.IOException - if the widget cannot be downloaded
java.lang.Exception
public W3CWidget parse(java.net.URL url,
boolean ignoreContentType,
java.lang.String defaultIdentifier)
throws BadWidgetZipFileException,
BadManifestException,
InvalidContentTypeException,
java.io.IOException,
java.lang.Exception
url - ignoreContentType - set to true to instruct the parser to ignore invalid content type exceptionsdefaultIdentifier - an identifier to use if the downloaded widget has no identifier - for example when updating a widget
BadWidgetZipFileException - if there is a problem with the zip package
BadManifestException - if there is a problem with the config.xml manifest file in the package
InvalidContentTypeException - if the widget has an invalid content type
java.io.IOException - if the widget cannot be downloaded
java.lang.Exception
public void setEncodings(java.lang.String[] encodings)
throws java.lang.Exception
java.lang.Exceptionpublic java.io.File getUnzippedWidgetDirectory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||