org.rhq.core.pc.drift
Class ChangeSetManagerImpl

java.lang.Object
  extended by org.rhq.core.pc.drift.ChangeSetManagerImpl
All Implemented Interfaces:
ChangeSetManager

public class ChangeSetManagerImpl
extends Object
implements ChangeSetManager


Constructor Summary
ChangeSetManagerImpl(File changeSetsDir)
           
 
Method Summary
 boolean changeSetExists(int resourceId, Headers headers)
           
 File findChangeSet(int resourceId, String driftDefinitionName)
          Locates the latest coverage change set for the specified resource id and drift definition.
 File findChangeSet(int resourceId, String name, org.rhq.core.domain.drift.DriftChangeSetCategory type)
           
 ChangeSetReader getChangeSetReader(File changeSetFile)
           
 ChangeSetReader getChangeSetReader(int resourceId, String driftDefinitionName)
          Locates the latest change set for the given resource and drift definition and returns a ChangeSetReader for that change set.
 ChangeSetWriter getChangeSetWriter(File changeSetFile, Headers headers)
           
 ChangeSetWriter getChangeSetWriter(int resourceId, Headers headers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeSetManagerImpl

public ChangeSetManagerImpl(File changeSetsDir)
Method Detail

changeSetExists

public boolean changeSetExists(int resourceId,
                               Headers headers)
Specified by:
changeSetExists in interface ChangeSetManager

findChangeSet

public File findChangeSet(int resourceId,
                          String driftDefinitionName)
                   throws IOException
Description copied from interface: ChangeSetManager
Locates the latest coverage change set for the specified resource id and drift definition.

Specified by:
findChangeSet in interface ChangeSetManager
Parameters:
resourceId - The id of the resource to which the change set belongs
driftDefinitionName - The name of the drift definition for which the change set was generated
Returns:
The change set file or null if it is not found
Throws:
IOException

findChangeSet

public File findChangeSet(int resourceId,
                          String name,
                          org.rhq.core.domain.drift.DriftChangeSetCategory type)
Specified by:
findChangeSet in interface ChangeSetManager

getChangeSetReader

public ChangeSetReader getChangeSetReader(int resourceId,
                                          String driftDefinitionName)
                                   throws IOException
Description copied from interface: ChangeSetManager
Locates the latest change set for the given resource and drift definition and returns a ChangeSetReader for that change set. Note that a resource can have multiple drift definitions; so, both the resource id and the drift definition are required to uniquely identify a particular change set.

Specified by:
getChangeSetReader in interface ChangeSetManager
Parameters:
resourceId - The id of the resource to which the change set belongs
driftDefinitionName - The name of the drift definition for which the change set was generated
Returns:
A ChangeSetReader that is open on the change set identified by resourceId and driftDefinition. Returns null if no change set has previously been generated.
Throws:
IOException
See Also:
ChangeSetReader

getChangeSetReader

public ChangeSetReader getChangeSetReader(File changeSetFile)
                                   throws IOException
Specified by:
getChangeSetReader in interface ChangeSetManager
Throws:
IOException

getChangeSetWriter

public ChangeSetWriter getChangeSetWriter(int resourceId,
                                          Headers headers)
                                   throws IOException
Specified by:
getChangeSetWriter in interface ChangeSetManager
Throws:
IOException

getChangeSetWriter

public ChangeSetWriter getChangeSetWriter(File changeSetFile,
                                          Headers headers)
                                   throws IOException
Specified by:
getChangeSetWriter in interface ChangeSetManager
Throws:
IOException


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