Oracle Fusion Middleware extensions for Seed Data Framework
11g Release 1 (11.1.2)

E22564-02

oracle.apps.fnd.applseed.rt.extract.common
Class ExtractFile

java.lang.Object
  extended by oracle.apps.fnd.applseed.rt.extract.common.ExtractFile
All Implemented Interfaces:
java.lang.Comparable<ExtractFile>
Direct Known Subclasses:
ExtractXlfFile

public class ExtractFile
extends java.lang.Object
implements java.lang.Comparable<ExtractFile>

Class holds information about a single file for Extract.


Field Summary
protected  java.lang.String branch
          VCS branch name where the checked in version resides.
protected  boolean checkedIn
          Checked-in state, set when file has been successfully checked in.
protected  boolean checkedOut
          Flag set when this file has been successfully checked out.
protected  boolean complete
          Complete flag, set when extract for this file is complete and successful.
protected  int delRowCount
          Count of rows deleted in new version as compared from previous version.
protected  int diffRowCount
          Count of rows changed from previous version.
protected  int newRowCount
          Count of new rows inserted since previous version.
protected  int processedRowCount
          This is a count of the number of driver node rows processed.
protected  java.lang.String resultMsg
          Extract Result message, success or failure with stack.
static java.lang.String separator
           
protected  java.lang.String taxonomyPartitionValue
          Taxonomy Partition Key Value, eg 101.
protected  java.lang.String taxonomyPath
          Taxonomy path, empty string when none.
protected  java.io.File theFile
           
protected  java.lang.String tipFileLoc
          VCS tip version file location retrieved from vcs.
protected  int tipVersion
          File Version for the Extract File, set from the tip version on vcs.
protected  boolean toBeCheckedIn
          Set when file is complete and ready to be checked in.
 
Constructor Summary
ExtractFile(java.lang.String filepathname)
          Constructor for creating Extract Files from a single source filepath.
ExtractFile(java.lang.String rootPathP, java.lang.String taxonomyPathP, java.lang.String fileNameP, java.lang.String taxonomyPartitionValueP)
          Constructor.
 
Method Summary
 void addXlfFile(ExtractXlfFile xlfFile)
          Add an ExtractXlfFile to the list of Xliff lang files created for this ExtractFile.
protected  boolean adjustTaxonomyPath()
          Perform the Taxonomy path adjustments if necessary.
protected  boolean adjustTaxonomyPath(java.lang.String renamePath)
           
 void clearRowVersionMap()
          Clear the previous row version map.
 int compareTo(ExtractFile other)
          Implement Comparable compareTo.
static java.lang.String constructExtractPath(java.lang.String taxonomyPathP, java.lang.String fileNameP)
           
 void createPath()
          Create the path for this ExtractFile, delete any existing file.
protected  void createPath(java.io.File file)
           
 boolean equals(java.lang.Object other)
          Override equals to compare by the file.
 java.io.File getAbsoluteFile()
          Get the full absolute File object of this ExtractFile.
 java.lang.String getAbsolutePath()
          Get the full absolute path of this ExtractFile.
protected  java.lang.String getBaseFileName()
          Get the extract file name, without extension.
 java.lang.String getBranch()
          Getter for branch.
 int getDelRowCount()
          Getter for delRowCount.
 int getDiffRowCount()
          Getter for diffRowCount.
 SDExternalReferences getExternalReferences()
          Get the external references set for this ExtractFile.
 java.lang.String getFullBranchPath()
          Get the full path name with branch and version info.
 java.lang.String getGuid()
          Get the guid value.
 boolean getHasDiff()
          Check if this extract file contains differences.
 java.lang.String getName()
          Get just the file name of this Extract File witout path.
 int getNewRowCount()
          Getter for newRowCount.
 java.lang.String getPath()
          Get the path of this ExtractFile.
 RowVersionMap getPrevRowVersionMap()
          Get the previous row version map.
 int getProcessedRowCount()
          Getter for processedRowCount.
protected  java.lang.String getRenameTaxonomyPath()
          Get the rename taxonomy path location to move at completion.
 java.lang.String getResultMsg()
          Get the Extract result message String.
protected  java.lang.String getRootPath()
          Root path getter.
 java.lang.String getTaxonomyPartitionValue()
          Getter for taxonomyPartitionValue.
protected  java.lang.String getTaxonomyPath()
          Returns just the Taxonomy path dir, w/o file name.
 java.lang.String getTipFileLoc()
          Getter for tipFileLoc.
 int getTipVersion()
          Getter for tipVersion.
 java.lang.String getTipVersionString()
          Return the tipVersion as a String value.
 ExtractFileList getXlfFileList()
          Get the Xliff files generated returned as an ExtractFileList.
 java.lang.String getXlfFilePathForLang(java.lang.String lang)
          Get the generated Xliff file path for the requested language.
 java.lang.String[] getXlfLangs()
          Get a list of all the language codes that had Xliff files generated.
 boolean isCheckedIn()
          Get the checked in state value.
 boolean isCheckedOut()
          Getter for checkedOut.
 boolean isComplete()
          Getter for complete flag.
 boolean isToBeCheckedIn()
          Getter for toBeCheckedIn.
 void setBranch(java.lang.String branchP)
          Setting for branch.
 void setCheckedIn(boolean checkedInP)
          Set the checked-in state.
 void setCheckedOut(boolean checkedOutP)
          Setter for checkedOut.
protected  void setComplete(boolean completeP)
          Setter for complete flag.
 void setCompleteState(int processedRowCountP)
          Set the complete state paramaters for this extract file and clean up.
 void setDelRowCount(int delRowCountP)
          Setter for delRowCount.
 void setDiffRowCount(int diffRowCountP)
          Setter for diffRowCount.
protected  void setExternalReferences(SDExternalReferences refs)
          Set the external references for this ExtractFile.
protected  void setGuid(java.lang.String uuid)
          Set the guid value.
 void setNewRowCount(int newRowCountP)
          Setter for newRowCount.
 void setPrevRowVersionMap(RowVersionMap prevRowVersionMapP)
          Set the previous row version map.
 void setProcessedRowCount(int processedRowCountP)
          Setter for processedRowCount.
protected  boolean setReadOnly()
          Set this ExtractFile as ReadOnly.
 void setRenameTaxonomyPath(java.lang.String path)
          Set the rename taxonomy path.
 void setResultMsg(java.lang.String resultMsgP)
          Set the Extract result message String.
 void setTaxonomyPartitionValue(java.lang.String taxonomyPartitionValueP)
          Setter for taxonomyPartitionValue.
 void setTipFileLoc(java.lang.String tipFileLocP)
          Setter for tipFileLoc.
 void setTipVersion(int tipVersionP)
          Setter for tipVersion.
 void setToBeCheckedIn(boolean toBeCheckedInP)
          Setter for toBeCheckedIn.
 java.lang.String toString()
          Get the string representation of this ExtractFile, that is the full path.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

taxonomyPartitionValue

protected java.lang.String taxonomyPartitionValue
Taxonomy Partition Key Value, eg 101.


complete

protected boolean complete
Complete flag, set when extract for this file is complete and successful.


processedRowCount

protected int processedRowCount
This is a count of the number of driver node rows processed.


newRowCount

protected int newRowCount
Count of new rows inserted since previous version.


diffRowCount

protected int diffRowCount
Count of rows changed from previous version.


delRowCount

protected int delRowCount
Count of rows deleted in new version as compared from previous version.


tipVersion

protected int tipVersion
File Version for the Extract File, set from the tip version on vcs.


tipFileLoc

protected transient java.lang.String tipFileLoc
VCS tip version file location retrieved from vcs. Transient since the tip file only lives for single jvm instance.


branch

protected java.lang.String branch
VCS branch name where the checked in version resides.


taxonomyPath

protected java.lang.String taxonomyPath
Taxonomy path, empty string when none.


checkedOut

protected boolean checkedOut
Flag set when this file has been successfully checked out. Only checked files should be processed (in VCS mode).


toBeCheckedIn

protected boolean toBeCheckedIn
Set when file is complete and ready to be checked in. Also used by Check In dialog for user selection.


checkedIn

protected boolean checkedIn
Checked-in state, set when file has been successfully checked in.


resultMsg

protected java.lang.String resultMsg
Extract Result message, success or failure with stack.


theFile

protected java.io.File theFile

separator

public static final java.lang.String separator
Constructor Detail

ExtractFile

public ExtractFile(java.lang.String rootPathP,
                   java.lang.String taxonomyPathP,
                   java.lang.String fileNameP,
                   java.lang.String taxonomyPartitionValueP)
Constructor.

Parameters:
rootPathP - String root path directory.
taxonomyPathP - String taxonomy path location.
fileNameP - String file name
taxonomyPartitionValueP - String taxonomy partition key value, eg 101

ExtractFile

public ExtractFile(java.lang.String filepathname)
Constructor for creating Extract Files from a single source filepath.

Parameters:
filepathname - file path name
Method Detail

constructExtractPath

public static java.lang.String constructExtractPath(java.lang.String taxonomyPathP,
                                                    java.lang.String fileNameP)

getTaxonomyPath

protected java.lang.String getTaxonomyPath()
Returns just the Taxonomy path dir, w/o file name.

Returns:
String Taxonomy path dir w/o filename

getPath

public java.lang.String getPath()
Get the path of this ExtractFile.

Returns:
String path

getAbsolutePath

public java.lang.String getAbsolutePath()
Get the full absolute path of this ExtractFile.

Returns:
String absolute path

getAbsoluteFile

public java.io.File getAbsoluteFile()
Get the full absolute File object of this ExtractFile.

Returns:
File object

getName

public java.lang.String getName()
Get just the file name of this Extract File witout path.

Returns:
String file name

toString

public java.lang.String toString()
Get the string representation of this ExtractFile, that is the full path.

Overrides:
toString in class java.lang.Object
Returns:
String

getFullBranchPath

public java.lang.String getFullBranchPath()
Get the full path name with branch and version info. path@@branch/version

Returns:
String full branch path and version info

setTaxonomyPartitionValue

public void setTaxonomyPartitionValue(java.lang.String taxonomyPartitionValueP)
Setter for taxonomyPartitionValue.

Parameters:
taxonomyPartitionValueP - String taxonomy partition value.

getTaxonomyPartitionValue

public java.lang.String getTaxonomyPartitionValue()
Getter for taxonomyPartitionValue.

Returns:
String taxonomy partition value.

setRenameTaxonomyPath

public void setRenameTaxonomyPath(java.lang.String path)
Set the rename taxonomy path. File will get renamed to this location when complete. Used to move exclusive extract files when have known path during processing. See Bug 9172233.

Parameters:
path - Taxonomy path to move file to at completion

getRenameTaxonomyPath

protected java.lang.String getRenameTaxonomyPath()
Get the rename taxonomy path location to move at completion.

Returns:
String path

adjustTaxonomyPath

protected boolean adjustTaxonomyPath()
                              throws ExtractWriteAccessException
Perform the Taxonomy path adjustments if necessary. Move the file to the location specified by the renameTaxonomyPath location. For Exclusive Extract when the taxonomy location is not known until processed. See Bug 9172233.

Returns:
boolen True file was moved, False no action performed
Throws:
ExtractWriteAccessException - new location does not have write access

adjustTaxonomyPath

protected boolean adjustTaxonomyPath(java.lang.String renamePath)
                              throws ExtractWriteAccessException
Throws:
ExtractWriteAccessException

setTipVersion

public void setTipVersion(int tipVersionP)
Setter for tipVersion.

Parameters:
tipVersionP - int file tip version.

getTipVersion

public int getTipVersion()
Getter for tipVersion.

Returns:
int tip version number value.

getTipVersionString

public java.lang.String getTipVersionString()
Return the tipVersion as a String value.

Returns:
String tipVersion number

setTipFileLoc

public void setTipFileLoc(java.lang.String tipFileLocP)
Setter for tipFileLoc. Defines the file system location of the vcs tip version

Parameters:
tipFileLocP - String full file path name to vcs tip version.

getTipFileLoc

public java.lang.String getTipFileLoc()
Getter for tipFileLoc. Retrieves the file system location of the vcs tip version.

Returns:
String full file path name to vcs tip version.

setBranch

public void setBranch(java.lang.String branchP)
Setting for branch. Holds the branch location of the vcs file.

Parameters:
branchP - branch location name

getBranch

public java.lang.String getBranch()
Getter for branch. Holds the branch location of the vcs file.

Returns:
branch location name

setComplete

protected void setComplete(boolean completeP)
Setter for complete flag.

Parameters:
completeP - boolean true when extract is complete and successful for this file.

isComplete

public boolean isComplete()
Getter for complete flag.

Returns:
true when extract is complete and successful for this file.

setProcessedRowCount

public void setProcessedRowCount(int processedRowCountP)
Setter for processedRowCount. Tracks the number of root driver node rows processed

Parameters:
processedRowCountP - int number of driver rows processed

getProcessedRowCount

public int getProcessedRowCount()
Getter for processedRowCount. Returns the total number of root driver rows that were processed for this extract file.

Returns:
number of rows processed

setCheckedIn

public void setCheckedIn(boolean checkedInP)
Set the checked-in state.

Parameters:
checkedInP - boolean state value

isCheckedIn

public boolean isCheckedIn()
Get the checked in state value.

Returns:
true if file has been checked in, false otherwise

setToBeCheckedIn

public void setToBeCheckedIn(boolean toBeCheckedInP)
Setter for toBeCheckedIn. Set to indicated the file is ready for checkin.

Parameters:
toBeCheckedInP - boolean flag value

isToBeCheckedIn

public boolean isToBeCheckedIn()
Getter for toBeCheckedIn.

Returns:
True when file is complete and ready to be checked in.

setCheckedOut

public void setCheckedOut(boolean checkedOutP)
Setter for checkedOut. Set to indicate the file has been checked out.

Parameters:
checkedOutP - boolean flag value

isCheckedOut

public boolean isCheckedOut()
Getter for checkedOut.

Returns:
True when file is checked out.

setNewRowCount

public void setNewRowCount(int newRowCountP)
Setter for newRowCount.

Parameters:
newRowCountP - count of rows inserted since last version

getNewRowCount

public int getNewRowCount()
Getter for newRowCount.

Returns:
count of new rows inserted since last version

setDiffRowCount

public void setDiffRowCount(int diffRowCountP)
Setter for diffRowCount.

Parameters:
diffRowCountP - count of rows that differ since last version

getHasDiff

public boolean getHasDiff()
Check if this extract file contains differences.

Returns:
true when diffs found, false otherwise

getDiffRowCount

public int getDiffRowCount()
Getter for diffRowCount.

Returns:
count of rows that differ from previous version

setDelRowCount

public void setDelRowCount(int delRowCountP)
Setter for delRowCount.

Parameters:
delRowCountP - count of rows deleted from this version as compared from the previous vesion.

getDelRowCount

public int getDelRowCount()
Getter for delRowCount.

Returns:
count of rows deleted from this version as compared from the previous vesion.

setResultMsg

public void setResultMsg(java.lang.String resultMsgP)
Set the Extract result message String.

Parameters:
resultMsgP - String extract result message

getResultMsg

public java.lang.String getResultMsg()
Get the Extract result message String.

Returns:
String extract result message

setPrevRowVersionMap

public void setPrevRowVersionMap(RowVersionMap prevRowVersionMapP)
Set the previous row version map. This holds the row version values from the previous version, used to update the row versions for the current extract file.

Parameters:
prevRowVersionMapP - RowVersionMap

getPrevRowVersionMap

public RowVersionMap getPrevRowVersionMap()
Get the previous row version map.

Returns:
RowVersionMap

setGuid

protected void setGuid(java.lang.String uuid)
Set the guid value.

Parameters:
uuid - String guid

getGuid

public java.lang.String getGuid()
Get the guid value.

Returns:
String guid

getRootPath

protected java.lang.String getRootPath()
Root path getter.

Returns:
String root path

getBaseFileName

protected java.lang.String getBaseFileName()
Get the extract file name, without extension.

Returns:
String extract file name part, no extension

clearRowVersionMap

public void clearRowVersionMap()
Clear the previous row version map.


addXlfFile

public void addXlfFile(ExtractXlfFile xlfFile)
Add an ExtractXlfFile to the list of Xliff lang files created for this ExtractFile.

Parameters:
xlfFile - ExtractXlfFile to track

getXlfFilePathForLang

public java.lang.String getXlfFilePathForLang(java.lang.String lang)
Get the generated Xliff file path for the requested language.

Parameters:
lang - String lang code
Returns:
String file path to the generated Xliff file for the language, null if no xliff file generated for the lang

getXlfFileList

public ExtractFileList getXlfFileList()
Get the Xliff files generated returned as an ExtractFileList.

Returns:
ExtractFileList xliff files for current base file

getXlfLangs

public java.lang.String[] getXlfLangs()
Get a list of all the language codes that had Xliff files generated.

Returns:
String[] of lang codes where an xliff file exists

setCompleteState

public void setCompleteState(int processedRowCountP)
Set the complete state paramaters for this extract file and clean up.

Parameters:
processedRowCountP - count of rows processed

setReadOnly

protected boolean setReadOnly()
Set this ExtractFile as ReadOnly.

Returns:
boolean True on succes

setExternalReferences

protected void setExternalReferences(SDExternalReferences refs)
Set the external references for this ExtractFile.

Parameters:
refs - SDExternalReferences

getExternalReferences

public SDExternalReferences getExternalReferences()
Get the external references set for this ExtractFile.

Returns:
SDExternalReferences

createPath

public void createPath()
                throws ExtractWriteAccessException
Create the path for this ExtractFile, delete any existing file.

Throws:
ExtractWriteAccessException

createPath

protected void createPath(java.io.File file)
                   throws ExtractWriteAccessException
Throws:
ExtractWriteAccessException

compareTo

public int compareTo(ExtractFile other)
Implement Comparable compareTo.

Specified by:
compareTo in interface java.lang.Comparable<ExtractFile>
Parameters:
other - ExtractFile to compate to
Returns:
int <0 less, 0 equals, >0 greater

equals

public boolean equals(java.lang.Object other)
Override equals to compare by the file.

Overrides:
equals in class java.lang.Object
Parameters:
other - ExtractFile to compare to
Returns:
true when the extract files represent same File object

Oracle Fusion Middleware extensions for Seed Data Framework
11g Release 1 (11.1.2)

E22564-02

Copyright © 2011 Oracle. All Rights Reserved.