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
 org.rhq.core.domain.content.Distribution createDistribution(org.rhq.core.domain.auth.Subject user, String kslabel, String basepath, org.rhq.core.domain.content.DistributionType disttype)
          Creates a new distribution in the system.
 void deleteDistributionByDistId(org.rhq.core.domain.auth.Subject user, int distId)
          Deletes a given instance of distribution object.
 void deleteDistributionFilesByDistId(org.rhq.core.domain.auth.Subject user, int distId)
          deletes list of available distribution files for requested distribution
 void deleteDistributionMappingsForRepo(org.rhq.core.domain.auth.Subject user, int repoId)
          Deletes a given instance of distribution object.
 org.rhq.core.domain.content.Distribution getDistributionByLabel(String kslabel)
          get distribution based on a given label
 List<org.rhq.core.domain.content.DistributionFile> getDistributionFilesByDistId(int distId)
          Returns a list of available distribution files for requested distribution
 org.rhq.core.domain.content.DistributionType getDistributionTypeByName(String name)
          Returns a DistributionType for given name
 void validateDistTree(org.rhq.core.domain.content.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 org.rhq.core.domain.content.Distribution createDistribution(org.rhq.core.domain.auth.Subject user,
                                                                   String kslabel,
                                                                   String basepath,
                                                                   org.rhq.core.domain.content.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(org.rhq.core.domain.auth.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(org.rhq.core.domain.auth.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 org.rhq.core.domain.content.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 org.rhq.core.domain.content.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<org.rhq.core.domain.content.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(org.rhq.core.domain.auth.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(org.rhq.core.domain.content.Distribution kstree)
                      throws DistributionException
validates a given kickstart tree object and throws a KickstartTreeException

Parameters:
kstree - kickstart tree object
Throws:
DistributionException


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