org.rhq.enterprise.server.plugins.rhnhosted
Class PrimaryXML

java.lang.Object
  extended by org.rhq.enterprise.server.plugins.rhnhosted.PrimaryXML

public class PrimaryXML
extends Object

Author:
John Matthews

Constructor Summary
PrimaryXML()
           
 
Method Summary
static String createPackageXML(RhnPackageType pkg)
          Will create a xml string snippet conforming to the entry in a primary.xml file used by yum
static String getEpoch(String version)
          Will return the 'epoch'.
static String getFlags(String sense)
           
static String getRelease(String version)
           
static String getVersion(String version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrimaryXML

public PrimaryXML()
Method Detail

getFlags

public static String getFlags(String sense)

getEpoch

public static String getEpoch(String version)
Will return the 'epoch'. If the epoch is empty, then a "0" is returned to comply with yum's expectations for package metadata

Parameters:
version - string containing epoch:version-release
Returns:

getVersion

public static String getVersion(String version)

getRelease

public static String getRelease(String version)

createPackageXML

public static String createPackageXML(RhnPackageType pkg)
Will create a xml string snippet conforming to the entry in a primary.xml file used by yum

Parameters:
pkg - JAXB Object to transform
Returns:
string snippet of xml data


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.