org.apache.torque.mojo
Class IdentifyInvalidDataFiles

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.torque.mojo.BaseMojo
          extended by org.apache.torque.mojo.IdentifyInvalidDataFiles
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class IdentifyInvalidDataFiles
extends BaseMojo

This mojo identifies data files that are present on the file system but are not present in schema.xml. This can happen if a table is removed from the schema. It sets a project property called "impex.data.invalid". This property is a comma delimited list of filenames that have no match in the db schema.


Field Summary
private  File dataDir
           
private  String dataDirExcludes
           
private  String dataDirIncludes
           
private  String extension
           
private static String FS
           
private  String schemaXMLFile
           
private  String targetDatabase
           
 
Fields inherited from class org.apache.torque.mojo.BaseMojo
SKIP_PACKAGING_TYPE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
IdentifyInvalidDataFiles()
           
 
Method Summary
protected  void executeMojo()
           
protected  Set<File> getDatabaseFiles(org.apache.torque.engine.database.model.Database db)
           
 File getDataDir()
           
 String getDataDirExcludes()
           
 String getDataDirIncludes()
           
protected  org.apache.tools.ant.DirectoryScanner getDirectoryScanner()
           
protected  Set<File> getExistingFiles(org.apache.tools.ant.DirectoryScanner ds)
           
 String getExtension()
           
protected  File getFile(org.apache.torque.engine.database.model.Table table)
           
 String getSchemaXMLFile()
           
 String getTargetDatabase()
           
 void setDataDir(File dataDir)
           
 void setDataDirExcludes(String dataDirExcludes)
           
 void setDataDirIncludes(String dataDirIncludes)
           
 void setExtension(String extension)
           
 void setSchemaXMLFile(String schemaXMLFile)
           
 void setTargetDatabase(String targetDatabase)
           
 
Methods inherited from class org.apache.torque.mojo.BaseMojo
afterExecution, beforeExecution, execute, getEncoding, getMavenSession, getProject, getSettings, isForceMojoExecution, isSkip, isStartMavenLogger, setEncoding, setForceMojoExecution, setMavenSession, setProject, setSettings, setSkip, setStartMavenLogger, skipMojo
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FS

private static final String FS

extension

private String extension

dataDir

private File dataDir

dataDirIncludes

private String dataDirIncludes

dataDirExcludes

private String dataDirExcludes

schemaXMLFile

private String schemaXMLFile

targetDatabase

private String targetDatabase
Constructor Detail

IdentifyInvalidDataFiles

public IdentifyInvalidDataFiles()
Method Detail

executeMojo

protected void executeMojo()
                    throws org.apache.maven.plugin.MojoExecutionException,
                           org.apache.maven.plugin.MojoFailureException
Specified by:
executeMojo in class BaseMojo
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getDatabaseFiles

protected Set<File> getDatabaseFiles(org.apache.torque.engine.database.model.Database db)

getExistingFiles

protected Set<File> getExistingFiles(org.apache.tools.ant.DirectoryScanner ds)

getDirectoryScanner

protected org.apache.tools.ant.DirectoryScanner getDirectoryScanner()

getFile

protected File getFile(org.apache.torque.engine.database.model.Table table)

getDataDir

public File getDataDir()

setDataDir

public void setDataDir(File dataDir)

getDataDirIncludes

public String getDataDirIncludes()

setDataDirIncludes

public void setDataDirIncludes(String dataDirIncludes)

getDataDirExcludes

public String getDataDirExcludes()

setDataDirExcludes

public void setDataDirExcludes(String dataDirExcludes)

getSchemaXMLFile

public String getSchemaXMLFile()

setSchemaXMLFile

public void setSchemaXMLFile(String schemaXMLFile)

getExtension

public String getExtension()

setExtension

public void setExtension(String extension)

getTargetDatabase

public String getTargetDatabase()

setTargetDatabase

public void setTargetDatabase(String targetDatabase)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.