|
|||||||||
| 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 String |
generateHash(File file,
String algorithm)
Generates a hash code for the given file. |
protected static void |
generatePackageIndex(File file,
List<PackageDetailsType> list,
File root,
PackageDetailsKeyType packageTypeInfo)
|
protected Map<String,RemotePackageInfo> |
jaxbParse(InputStream indexStream,
URL indexUrl,
String rootUrlString)
|
static void |
main(String[] args)
A utility that can build an index file that contains metadata for content found in a given directory. |
Map<String,RemotePackageInfo> |
parse(InputStream indexStream,
UrlProvider contentSource)
Given an input stream containing the index data, this will parse that data and return the parsed information. |
protected String |
stripLeadingSlash(String str)
|
protected Property |
translateListProperty(ListPropertyType object,
String defaultName)
|
protected Property |
translateMapProperty(MapPropertyType object,
String defaultName)
|
protected Property |
translateSimpleProperty(SimplePropertyType object,
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 Map<String,RemotePackageInfo> parse(InputStream indexStream,
UrlProvider contentSource)
throws 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
Exception - if failed to parse the index file
protected Map<String,RemotePackageInfo> jaxbParse(InputStream indexStream,
URL indexUrl,
String rootUrlString)
throws Exception
Exception
protected ContentProviderPackageDetails translateXmlToDomain(PackageDetailsType pkg)
throws Exception
pkg - the XML type object
Exception
protected Property translateSimpleProperty(SimplePropertyType object,
String defaultName)
protected Property translateListProperty(ListPropertyType object,
String defaultName)
protected Property translateMapProperty(MapPropertyType object,
String defaultName)
protected String stripLeadingSlash(String str)
public static void main(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(File file,
List<PackageDetailsType> list,
File root,
PackageDetailsKeyType packageTypeInfo)
throws Exception
Exception
protected static String generateHash(File file,
String algorithm)
throws Exception
file - the file whose contents is used to generate the hashalgorithm - "MD5" or "SHA-256"
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||