org.rhq.enterprise.server.content
Class DistributionManagerBean

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

public class DistributionManagerBean
extends Object
implements DistributionManagerLocal

Author:
Pradeep Kilambi

Constructor Summary
DistributionManagerBean()
           
 
Method Summary
 Distribution createDistribution(Subject user, String kslabel, 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 deleteDistributionFilesByDistId(Subject user, int distId)
          deletes list of available distribution files for requested distribution
 void deleteDistributionMappingsForRepo(Subject user, int repoId)
          Deletes a given instance of distribution object.
 Distribution getDistributionByLabel(String kslabel)
          get distribution based on a given label
 List<DistributionFile> getDistributionFilesByDistId(int distId)
          Returns a list of available distribution files for requested distribution
 DistributionType getDistributionTypeByName(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,
                                       String kslabel,
                                       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
kslabel - kickstart tree label
basepath - ks base path on filesystem
Returns:
newly created distribution tree object
Throws:
DistributionException

deleteDistributionMappingsForRepo

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

Specified by:
deleteDistributionMappingsForRepo in interface DistributionManagerLocal

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

getDistributionByLabel

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

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

getDistributionTypeByName

public DistributionType getDistributionTypeByName(String name)
Returns a DistributionType for given name

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

getDistributionFilesByDistId

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

Specified by:
getDistributionFilesByDistId in interface DistributionManagerLocal
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
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-2011 Red Hat, Inc.. All Rights Reserved.