com.partnersoft.modules.inspection.model
Class InspectionModuleLib

java.lang.Object
  extended by com.partnersoft.modules.inspection.model.InspectionModuleLib
All Implemented Interfaces:
com.partnersoft.core.Lib

public class InspectionModuleLib
extends java.lang.Object
implements com.partnersoft.core.Lib

Convenience Library for Inspection Modules. Deals with building various files from csv or schema.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Field Summary
static java.lang.String INSPECTION_MARKER_DATATYPE
           
static int INSPECTION_MARKER_RANGE
           
 
Constructor Summary
InspectionModuleLib()
           
 
Method Summary
static void buildNomadXmlFromCsv(java.lang.String moduleName)
          Builds an Xml file readable by Tri-Global's Nomad handheld.
static void buildPartnerWebConfigFromSchema(java.lang.String moduleName)
          Reads the Inspection schema of the passed module name and builds a Partner Web config for it.
static void buildReportsFromCsv(java.lang.String moduleName)
          Generates basic reports by reading resources/schema/reports.csv and puts them into the mapset for this module.
static void buildSchemaFromCsv(java.lang.String moduleName)
          Builds an inspection schema from CSV files in the given module's resources/schema/ directory.
static void buildSubtypeForms(java.lang.String moduleName)
          Looks for a non-blank subtypeFields.csv in module/resources/schema and tries to build subtype forms for each subtype found.
static void createModuleFromSkeleton(com.partnersoft.system.Module baseInspectionModule, java.lang.String moduleName)
           
static com.partnersoft.system.Module inspectionSystemModule()
          Returns the Inspection module.
static java.util.List<com.partnersoft.cog.CogStructureField> listStandardFields()
          Returns a list of standard inspection fields - for syncing etc.
static java.util.List<java.lang.String> listValidDataTypes()
          Returns a list of acceptable built-in data types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSPECTION_MARKER_DATATYPE

public static final java.lang.String INSPECTION_MARKER_DATATYPE
See Also:
Constant Field Values

INSPECTION_MARKER_RANGE

public static final int INSPECTION_MARKER_RANGE
See Also:
Constant Field Values
Constructor Detail

InspectionModuleLib

public InspectionModuleLib()
Method Detail

listStandardFields

public static java.util.List<com.partnersoft.cog.CogStructureField> listStandardFields()
Returns a list of standard inspection fields - for syncing etc.

Returns:

listValidDataTypes

public static java.util.List<java.lang.String> listValidDataTypes()
Returns a list of acceptable built-in data types. Does not include picklists.

Returns:

createModuleFromSkeleton

public static void createModuleFromSkeleton(com.partnersoft.system.Module baseInspectionModule,
                                            java.lang.String moduleName)
                                     throws java.io.IOException
Throws:
java.io.IOException

buildSubtypeForms

public static void buildSubtypeForms(java.lang.String moduleName)
                              throws java.io.IOException
Looks for a non-blank subtypeFields.csv in module/resources/schema and tries to build subtype forms for each subtype found.

Parameters:
moduleName -
Throws:
java.io.IOException

buildReportsFromCsv

public static void buildReportsFromCsv(java.lang.String moduleName)
                                throws java.io.IOException
Generates basic reports by reading resources/schema/reports.csv and puts them into the mapset for this module.

Parameters:
moduleName -
Throws:
java.io.IOException

buildSchemaFromCsv

public static void buildSchemaFromCsv(java.lang.String moduleName)
                               throws java.io.IOException
Builds an inspection schema from CSV files in the given module's resources/schema/ directory.

Throws:
java.io.IOException

buildNomadXmlFromCsv

public static void buildNomadXmlFromCsv(java.lang.String moduleName)
                                 throws java.io.IOException
Builds an Xml file readable by Tri-Global's Nomad handheld. Xml describes our Inspection's schema in a format their Inspection system can understand.

Parameters:
moduleName -
Throws:
java.io.IOException

inspectionSystemModule

public static com.partnersoft.system.Module inspectionSystemModule()
Returns the Inspection module.

Returns:

buildPartnerWebConfigFromSchema

public static void buildPartnerWebConfigFromSchema(java.lang.String moduleName)
                                            throws java.io.IOException
Reads the Inspection schema of the passed module name and builds a Partner Web config for it.

Parameters:
moduleName -
Throws:
java.io.IOException