org.rhq.enterprise.server.content
Class DistributionManagerBean

java.lang.Object
  extended by org.rhq.enterprise.server.content.DistributionManagerBean
All Implemented Interfaces:
DistributionManagerLocal, DistributionManagerRemote

public class DistributionManagerBean
extends java.lang.Object
implements DistributionManagerLocal, DistributionManagerRemote

Author:
Pradeep Kilambi

Constructor Summary
DistributionManagerBean()
           
 
Method Summary
 Distribution createDistribution(Subject user, java.lang.String kslabel, java.lang.String basepath, DistributionType disttype)
          Creates a new distribution in the system.
 void deleteDistributionByDistId(Subject user, int distId)
          Deletes a given instance of distribution object.
 void deleteDistributionByRepo(Subject user, int repoId)
          Deletes a given instance of distribution object.
 void deleteDistributionFilesByDistId(Subject user, int distId)
          deletes list of available distribution files for requested distribution
 void getDistributionBits(Subject user, java.lang.String kslabel)
          get the kickstart tree bits either from database or filesystem based on kickstart label
 Distribution getDistributionByLabel(java.lang.String kslabel)
          get distribution based on a given label
 Distribution getDistributionByPath(java.lang.String basepath)
          Returns a kickstarttree from the database for a given basepath
 java.util.List<DistributionFile> getDistributionFilesByDistId(int distId)
          Returns a list of available distribution files for requested distribution
 DistributionType getDistributionTypeByName(java.lang.String name)
          Returns a DistributionType for given name
 void validateDistTree(Distribution kstree)
          validates a given kickstart tree object and throws a KickstartTreeException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionManagerBean

public DistributionManagerBean()
Method Detail

createDistribution

public Distribution createDistribution(Subject user,
                                       java.lang.String kslabel,
                                       java.lang.String basepath,
                                       DistributionType disttype)
                                throws DistributionException
Description copied from interface: DistributionManagerLocal
Creates a new distribution in the system. If the tree does not exist, it will be created. If a tree exists with the specified version ID, a new one will not be created and the existing tree will be returned.

Specified by:
createDistribution in interface DistributionManagerLocal
Specified by:
createDistribution in interface DistributionManagerRemote
kslabel - kickstart tree label
basepath - ks base path on filesystem
Returns:
newly created distribution tree object
Throws:
DistributionException

deleteDistributionByRepo

public void deleteDistributionByRepo(Subject user,
                                     int repoId)
Description copied from interface: DistributionManagerLocal
Deletes a given instance of distribution object. If the object does not exist

Specified by:
deleteDistributionByRepo in interface DistributionManagerLocal
Specified by:
deleteDistributionByRepo in interface DistributionManagerRemote

deleteDistributionByDistId

public void deleteDistributionByDistId(Subject user,
                                       int distId)
Description copied from interface: DistributionManagerLocal
Deletes a given instance of distribution object. If the object does not exist

Specified by:
deleteDistributionByDistId in interface DistributionManagerLocal
Specified by:
deleteDistributionByDistId in interface DistributionManagerRemote

getDistributionBits

public void getDistributionBits(Subject user,
                                java.lang.String kslabel)
Description copied from interface: DistributionManagerLocal
get the kickstart tree bits either from database or filesystem based on kickstart label

Specified by:
getDistributionBits in interface DistributionManagerLocal
Specified by:
getDistributionBits in interface DistributionManagerRemote

getDistributionByLabel

public Distribution getDistributionByLabel(java.lang.String kslabel)
Description copied from interface: DistributionManagerLocal
get distribution based on a given label

Specified by:
getDistributionByLabel in interface DistributionManagerLocal
Specified by:
getDistributionByLabel in interface DistributionManagerRemote
Parameters:
kslabel - distribution tree label
Returns:
kickstart tree object

getDistributionByPath

public Distribution getDistributionByPath(java.lang.String basepath)
Returns a kickstarttree from the database for a given basepath

Specified by:
getDistributionByPath in interface DistributionManagerLocal
Specified by:
getDistributionByPath in interface DistributionManagerRemote
Parameters:
basepath - location on filesystem
Returns:
kickstarttree object from db

getDistributionTypeByName

public DistributionType getDistributionTypeByName(java.lang.String name)
Returns a DistributionType for given name

Specified by:
getDistributionTypeByName in interface DistributionManagerLocal
Specified by:
getDistributionTypeByName in interface DistributionManagerRemote
Parameters:
name - name of distribution type
Returns:
distribution type from db

getDistributionFilesByDistId

public java.util.List<DistributionFile> getDistributionFilesByDistId(int distId)
Returns a list of available distribution files for requested distribution

Specified by:
getDistributionFilesByDistId in interface DistributionManagerLocal
Specified by:
getDistributionFilesByDistId in interface DistributionManagerRemote
Parameters:
distId -
Returns:
A list of Distributionfile objects associated to a given distribution

deleteDistributionFilesByDistId

public void deleteDistributionFilesByDistId(Subject user,
                                            int distId)
deletes list of available distribution files for requested distribution

Specified by:
deleteDistributionFilesByDistId in interface DistributionManagerLocal
Specified by:
deleteDistributionFilesByDistId in interface DistributionManagerRemote
Parameters:
distId -

validateDistTree

public void validateDistTree(Distribution kstree)
                      throws DistributionException
validates a given kickstart tree object and throws a KickstartTreeException

Parameters:
kstree - kickstart tree object
Throws:
DistributionException


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