|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.rhq.enterprise.server.plugins.url.XmlIndexParser
public class XmlIndexParser
Parses the index XML file whose format follows the package details schema.
| Constructor Summary | |
|---|---|
XmlIndexParser()
|
|
| Method Summary | |
|---|---|
protected static java.lang.String |
generateHash(java.io.File file,
java.lang.String algorithm)
Generates a hash code for the given file. |
protected static void |
generatePackageIndex(java.io.File file,
java.util.List<PackageDetailsType> list,
java.io.File root,
PackageDetailsKeyType packageTypeInfo)
|
protected java.util.Map<java.lang.String,RemotePackageInfo> |
jaxbParse(java.io.InputStream indexStream,
java.net.URL indexUrl,
java.lang.String rootUrlString)
|
static void |
main(java.lang.String[] args)
A utility that can build an index file that contains metadata for content found in a given directory. |
java.util.Map<java.lang.String,RemotePackageInfo> |
parse(java.io.InputStream indexStream,
UrlProvider contentSource)
Given an input stream containing the index data, this will parse that data and return the parsed information. |
protected java.lang.String |
stripLeadingSlash(java.lang.String str)
|
protected Property |
translateListProperty(ListPropertyType object,
java.lang.String defaultName)
|
protected Property |
translateMapProperty(MapPropertyType object,
java.lang.String defaultName)
|
protected Property |
translateSimpleProperty(SimplePropertyType object,
java.lang.String defaultName)
|
protected ContentProviderPackageDetails |
translateXmlToDomain(PackageDetailsType pkg)
Translates the details XML type to its domain object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlIndexParser()
| Method Detail |
|---|
public java.util.Map<java.lang.String,RemotePackageInfo> parse(java.io.InputStream indexStream,
UrlProvider contentSource)
throws java.lang.Exception
IndexParser
parse in interface IndexParserindexStream - stream containing the index data (it is not necessary for this method to close this)contentSource - the content source where the index file came from
java.lang.Exception - if failed to parse the index file
protected java.util.Map<java.lang.String,RemotePackageInfo> jaxbParse(java.io.InputStream indexStream,
java.net.URL indexUrl,
java.lang.String rootUrlString)
throws java.lang.Exception
java.lang.Exception
protected ContentProviderPackageDetails translateXmlToDomain(PackageDetailsType pkg)
throws java.lang.Exception
pkg - the XML type object
java.lang.Exception
protected Property translateSimpleProperty(SimplePropertyType object,
java.lang.String defaultName)
protected Property translateListProperty(ListPropertyType object,
java.lang.String defaultName)
protected Property translateMapProperty(MapPropertyType object,
java.lang.String defaultName)
protected java.lang.String stripLeadingSlash(java.lang.String str)
public static void main(java.lang.String[] args)
java -cp "target\rhq-serverplugin-url-1.3.0-SNAPSHOT.jar;
..\..\..\..\core\client-api\target\rhq-core-client-api-1.3.0-SNAPSHOT.jar;
..\..\..\..\core\domain\target\rhq-core-domain-ejb3.jar;
%HOMEPATH%\.m2\repository\commons-logging\commons-logging\1.1.0.jboss\commons-logging-1.1.0.jboss.jar"
org.rhq.enterprise.server.plugins.url.XmlIndexParser
C:\my\content\source\directory
library
noarch
"JBossAS Server"
JBossAS
args -
protected static void generatePackageIndex(java.io.File file,
java.util.List<PackageDetailsType> list,
java.io.File root,
PackageDetailsKeyType packageTypeInfo)
throws java.lang.Exception
java.lang.Exception
protected static java.lang.String generateHash(java.io.File file,
java.lang.String algorithm)
throws java.lang.Exception
file - the file whose contents is used to generate the hashalgorithm - "MD5" or "SHA-256"
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||