Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.javatools.patch
Class PatchEngine

java.lang.Object
  extended by oracle.javatools.patch.PatchEngine

public class PatchEngine
extends java.lang.Object

PatchEngine is the engine for creating, matching and applying a PatchModel to the context provided by a PatchContributor.

Since:
10.1.3.0.3

Constructor Summary
PatchEngine(PatchContributor toFileContributor)
          Constructs a new PatchEngine for the given contributor.
 
Method Summary
 void addPatchListener(PatchListener l)
          Adds a listener to the engine for receiving PatchEvents.
 void applyModel(PatchModel patchModel, PatchContext patchContext, PatchApplyOptions applyOptions)
          Applies the given PatchModel to the engine's to-file contributor, according to options.
 PatchModel createModel(PatchContributor fromFileContributor, PatchCreateOptions createOptions)
          Creates a PatchModel based on differences between the given contributor and the engine's to-file contributor, according to options.
static PatchEntry createPatchEntry(oracle.javatools.compare.algorithm.sequence.SequenceCompareModel compareModel)
           
 PatchContext matchModel(PatchModel patchModel, PatchMatchOptions matchOptions)
          Matches the given PatchModel against the engine's to-file contributor, according to options.
 void removePatchListener(PatchListener l)
          Removes a listener from the engine for receiving PatchEvents.
 PatchModel reverseModel(PatchModel patchModel, java.lang.String fromFileBaseDirectoryPath)
          Reverses the information contained in the given PatchModel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatchEngine

public PatchEngine(PatchContributor toFileContributor)
Constructs a new PatchEngine for the given contributor.

Parameters:
toFileContributor - the to-file (or single) contributor.
Method Detail

addPatchListener

public void addPatchListener(PatchListener l)
Adds a listener to the engine for receiving PatchEvents.

Parameters:
l - the listener.

removePatchListener

public void removePatchListener(PatchListener l)
Removes a listener from the engine for receiving PatchEvents.

Parameters:
l - the listener.

createModel

public PatchModel createModel(PatchContributor fromFileContributor,
                              PatchCreateOptions createOptions)
                       throws java.io.IOException,
                              CompareFailedException
Creates a PatchModel based on differences between the given contributor and the engine's to-file contributor, according to options.

Parameters:
fromFileContributor - the from-file contributor.
createOptions - the patch creation options.
Returns:
the patch model.
Throws:
java.io.IOException - if an I/O exception occurred while reading a file.
CompareFailedException - if a file comparison failed.

matchModel

public PatchContext matchModel(PatchModel patchModel,
                               PatchMatchOptions matchOptions)
                        throws java.io.IOException
Matches the given PatchModel against the engine's to-file contributor, according to options.

Parameters:
patchModel - the patch model.
matchOptions - the patch match options.
Returns:
the context describing the match.
Throws:
java.io.IOException - if an I/O exception occurred while reading a file.

applyModel

public void applyModel(PatchModel patchModel,
                       PatchContext patchContext,
                       PatchApplyOptions applyOptions)
                throws java.io.IOException
Applies the given PatchModel to the engine's to-file contributor, according to options.

Parameters:
patchModel - the patch model.
patchContext - the context describing the match.
applyOptions - the patch apply options.
Throws:
java.io.IOException - if an I/O exception occurred while creating, writing or reading a file.

reverseModel

public PatchModel reverseModel(PatchModel patchModel,
                               java.lang.String fromFileBaseDirectoryPath)
Reverses the information contained in the given PatchModel.

Parameters:
patchModel - the patch model.
fromFileBaseDirectoryPath - the from-file base directory path.
Returns:
the new patch model instance, a reversed representation.

createPatchEntry

public static final PatchEntry createPatchEntry(oracle.javatools.compare.algorithm.sequence.SequenceCompareModel compareModel)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.