org.rhq.enterprise.server.drift
Interface DriftManagerRemote


public interface DriftManagerRemote


Method Summary
 void deleteDriftDefinition(Subject subject, EntityContext entityContext, String driftDefName)
          Remove the provided driftDef (identified by name) on the specified entityContext.
 PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject, DriftChangeSetCriteria criteria)
          Standard criteria based fetch method
 PageList<DriftDefinition> findDriftDefinitionsByCriteria(Subject subject, DriftDefinitionCriteria criteria)
           
 PageList<? extends Drift<?,?>> findDriftsByCriteria(Subject subject, DriftCriteria criteria)
          Standard criteria based fetch method
 FileDiffReport generateUnifiedDiff(Subject subject, Drift<?,?> drift)
          Generates a unified diff of the two files references by drift.
 FileDiffReport generateUnifiedDiff(Subject subject, Drift<?,?> drift1, Drift<?,?> drift2)
          Generates a unified diff of the two files referenced by drift1 and drift2.
 FileDiffReport generateUnifiedDiffByIds(Subject subject, String driftId1, String driftId2)
          Generates a unified diff of the two file versions referenced by drift ids.
 String getDriftFileBits(Subject subject, String hash)
          Returns the content associated with the specified hash as a string
 DriftSnapshot getSnapshot(Subject subject, DriftSnapshotRequest request)
          Calculate and return requested Drift Snapshot.
 void pinSnapshot(Subject subject, int driftDefId, int snapshotVersion)
           
 void updateDriftDefinition(Subject subject, EntityContext entityContext, DriftDefinition driftConfig)
           
 

Method Detail

deleteDriftDefinition

void deleteDriftDefinition(Subject subject,
                           EntityContext entityContext,
                           String driftDefName)
Remove the provided driftDef (identified by name) on the specified entityContext. Agents, if available, will be notified of the change.

Parameters:
subject -
entityContext -
driftDefName -

findDriftChangeSetsByCriteria

PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject,
                                                                    DriftChangeSetCriteria criteria)
                                                                    throws Exception
Standard criteria based fetch method

Parameters:
subject -
criteria -
Returns:
The DriftChangeSets matching the criteria
Throws:
Exception

findDriftDefinitionsByCriteria

PageList<DriftDefinition> findDriftDefinitionsByCriteria(Subject subject,
                                                         DriftDefinitionCriteria criteria)

findDriftsByCriteria

PageList<? extends Drift<?,?>> findDriftsByCriteria(Subject subject,
                                                    DriftCriteria criteria)
                                                    throws Exception
Standard criteria based fetch method

Parameters:
subject -
criteria -
Returns:
The Drifts matching the criteria
Throws:
Exception

generateUnifiedDiff

FileDiffReport generateUnifiedDiff(Subject subject,
                                   Drift<?,?> drift)
Generates a unified diff of the two files references by drift. In the case of a modified file, a Drift object references the current and previous versions of the file. This method generates a diff of the two versions.

Parameters:
drift - Specifies the two files that will be compared
Returns:
A report containing a unified diff of the two versions of the file referenced by drift

generateUnifiedDiff

FileDiffReport generateUnifiedDiff(Subject subject,
                                   Drift<?,?> drift1,
                                   Drift<?,?> drift2)
Generates a unified diff of the two files referenced by drift1 and drift2. More specifically, the files referenced by Drift.getNewDriftFile() are compared.

Parameters:
drift1 - References the first file to be compared
drift2 - References the second file to be compared
Returns:
A report containing a unified diff of the two files compared

generateUnifiedDiffByIds

FileDiffReport generateUnifiedDiffByIds(Subject subject,
                                        String driftId1,
                                        String driftId2)
Generates a unified diff of the two file versions referenced by drift ids.

Parameters:
drift1Id - the "new" version of the first drift
drift2Id - the "new" version of the second drift
Returns:
A report containing a unified diff of the two versions of the file referenced by drift

getDriftFileBits

String getDriftFileBits(Subject subject,
                        String hash)
Returns the content associated with the specified hash as a string

Parameters:
hash - The hash the uniquely identifies the requested content
Returns:
The content as a string

getSnapshot

DriftSnapshot getSnapshot(Subject subject,
                          DriftSnapshotRequest request)
Calculate and return requested Drift Snapshot.

Parameters:
subject -
request -
Returns:
The DriftSnapshot Not null but version is set to -1 if the drift definition does not yet have any snapshots or there are no snapshots that meet the requested snapshot version constraints.
Throws:
IllegalArgumentException - if the specified drift definition does not exist

pinSnapshot

void pinSnapshot(Subject subject,
                 int driftDefId,
                 int snapshotVersion)

updateDriftDefinition

void updateDriftDefinition(Subject subject,
                           EntityContext entityContext,
                           DriftDefinition driftConfig)


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