wt.iba.definition
Class DefinitionLoaderWithCache

java.lang.Object
  extended bywt.iba.definition.DefinitionLoaderWithCache

public class DefinitionLoaderWithCache
extends Object

Bulk load data (IBA) into database for initial setup or migrating from legacy data Called by command line: java wt.units.DefinitionLoaderWithCache


Field Summary
private static String CURRENT_CH_KEY
           
static String DEFINITION_CACHE
           
static Installer installService
           
static String ORGANIZER_CACHE
           
private static String ROOT_NAME
           
private static String SERVICE_NAME
           
private static UnitDBService theUnitDBService
           
private static boolean VERBOSE
           
 
Constructor Summary
DefinitionLoaderWithCache()
           
 
Method Summary
static boolean addToAHCache(AbstractAttributeDefinizerView aadv, String path)
           
private static boolean commitUnittedAttributeDefinition(UnitDefView udf)
           
static boolean createAttrDefinizer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create Attribute Definition(s) or Organizer(s) This method can be called by java wt.load.LoadFromFile -d c:\windchill\loadfiles\attrdefinizer.csv This method can also be called from the DefinitionLoaderWithCache main program.
private static boolean createAttributeDefinition(String displayName, Object addv)
           
private static boolean createAttributeDefinitionUnderDefinition(String name, String hierarchyDisplayName, String displayName, String description, String logicalIdentifier, String dataType, String referencedClassName, String parentClassName, AbstractAttributeDefinizerView parent_aadv)
           
private static boolean createAttributeDefinitionUnderOrganizer(String name, String hierarchyDisplayName, String displayName, String description, String logicalIdentifier, String dataType, String referencedClassName, AbstractAttributeDefinizerView parent_aadv)
           
private static boolean createAttributeOrganizer(IBADefinitionService ibaServiceHelper, AttributeOrgDefaultView aodv)
           
private static boolean createUnittedAttributeDefinition(String nameValuePairs, String name, String hierarchyDisplayName, String displayName, String description, String logicalIdentifier, QuantityOfMeasureDefaultView qomdv, AbstractAttributeDefinizerView parent_aadv)
           
static AbstractAttributeDefinizerNodeView findAttributeChild(AbstractAttributeDefinizerNodeView parent, String childName)
           
static AttributeOrgNodeView findOrgRoot(String rootName)
           
static AttributeDefinition getAttributeDefinition(AttributeDefDefaultView defView)
           
static AbstractAttributeDefinizerView getAttributeDefinition(String parentID)
          Pass parent path from root to the new node's parent, return the parent attribute deninition or organizer back
static AttributeDefNodeView getAttributeDefNodeView(AttributeDefinition ad)
           
static AttributeDefNodeView getAttributeDefNodeViewByPath(String path, String dataType)
           
static AttributeOrganizer getAttributeOrganizer(AttributeOrgDefaultView orgView)
           
static AbstractAttributeDefinizerView getAttributeOrganizer(String parentID)
          Pass parent path include organizer from root to the new node's parent, return the parent attribute deninition or organizer back
static AttributeOrgNodeView getAttributeOrgNodeView(AttributeOrganizer ao)
           
static AbstractAttributeDefinizerView getFromAHCache(String parentPath, boolean organizer)
          get AbstractAttributeDefinizerView from Cache to reduce DB access.
static String getObjectLocatorKey(String locator)
           
static void main(String[] args)
          Command line method for loading demonstration data into the Windchill system.
static boolean removeAHCache(Hashtable nv, Hashtable cmd_line, Vector return_objects)
           
private static String removeInvalidCharactersFromPath(String s)
           
static boolean setupAHCache(Hashtable nv, Hashtable cmd_line, Vector return_objects)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

installService

public static Installer installService

CURRENT_CH_KEY

private static String CURRENT_CH_KEY

theUnitDBService

private static UnitDBService theUnitDBService

VERBOSE

private static final boolean VERBOSE

SERVICE_NAME

private static final String SERVICE_NAME
See Also:
Constant Field Values

ROOT_NAME

private static final String ROOT_NAME
See Also:
Constant Field Values

DEFINITION_CACHE

public static final String DEFINITION_CACHE
See Also:
Constant Field Values

ORGANIZER_CACHE

public static final String ORGANIZER_CACHE
See Also:
Constant Field Values
Constructor Detail

DefinitionLoaderWithCache

public DefinitionLoaderWithCache()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Command line method for loading demonstration data into the Windchill system.

Parameters:
args - Not used anymore, ignored.
Throws:
Exception

setupAHCache

public static boolean setupAHCache(Hashtable nv,
                                   Hashtable cmd_line,
                                   Vector return_objects)

removeAHCache

public static boolean removeAHCache(Hashtable nv,
                                    Hashtable cmd_line,
                                    Vector return_objects)

createAttrDefinizer

public static boolean createAttrDefinizer(Hashtable nv,
                                          Hashtable cmd_line,
                                          Vector return_objects)
Create Attribute Definition(s) or Organizer(s) This method can be called by java wt.load.LoadFromFile -d c:\windchill\loadfiles\attrdefinizer.csv This method can also be called from the DefinitionLoaderWithCache main program.

Parameters:
cmd_line -
Returns:
boolean for success or failure

findAttributeChild

public static AbstractAttributeDefinizerNodeView findAttributeChild(AbstractAttributeDefinizerNodeView parent,
                                                                    String childName)

findOrgRoot

public static AttributeOrgNodeView findOrgRoot(String rootName)

createAttributeDefinitionUnderDefinition

private static boolean createAttributeDefinitionUnderDefinition(String name,
                                                                String hierarchyDisplayName,
                                                                String displayName,
                                                                String description,
                                                                String logicalIdentifier,
                                                                String dataType,
                                                                String referencedClassName,
                                                                String parentClassName,
                                                                AbstractAttributeDefinizerView parent_aadv)
                                                         throws WTPropertyVetoException
Throws:
WTPropertyVetoException

createUnittedAttributeDefinition

private static boolean createUnittedAttributeDefinition(String nameValuePairs,
                                                        String name,
                                                        String hierarchyDisplayName,
                                                        String displayName,
                                                        String description,
                                                        String logicalIdentifier,
                                                        QuantityOfMeasureDefaultView qomdv,
                                                        AbstractAttributeDefinizerView parent_aadv)
                                                 throws WTPropertyVetoException
Throws:
WTPropertyVetoException

commitUnittedAttributeDefinition

private static boolean commitUnittedAttributeDefinition(UnitDefView udf)

createAttributeDefinitionUnderOrganizer

private static boolean createAttributeDefinitionUnderOrganizer(String name,
                                                               String hierarchyDisplayName,
                                                               String displayName,
                                                               String description,
                                                               String logicalIdentifier,
                                                               String dataType,
                                                               String referencedClassName,
                                                               AbstractAttributeDefinizerView parent_aadv)
                                                        throws WTPropertyVetoException
Throws:
WTPropertyVetoException

createAttributeDefinition

private static boolean createAttributeDefinition(String displayName,
                                                 Object addv)

createAttributeOrganizer

private static boolean createAttributeOrganizer(IBADefinitionService ibaServiceHelper,
                                                AttributeOrgDefaultView aodv)

getAttributeDefinition

public static AbstractAttributeDefinizerView getAttributeDefinition(String parentID)
Pass parent path from root to the new node's parent, return the parent attribute deninition or organizer back

Returns:
AbstractAttributeDefinizerView: can be a definition or Organizer.

getAttributeOrganizer

public static AbstractAttributeDefinizerView getAttributeOrganizer(String parentID)
Pass parent path include organizer from root to the new node's parent, return the parent attribute deninition or organizer back

Returns:
AbstractAttributeDefinizerView: can be a definition or Organizer.

getAttributeDefNodeViewByPath

public static AttributeDefNodeView getAttributeDefNodeViewByPath(String path,
                                                                 String dataType)

getFromAHCache

public static AbstractAttributeDefinizerView getFromAHCache(String parentPath,
                                                            boolean organizer)
get AbstractAttributeDefinizerView from Cache to reduce DB access. param parentPath param dataType return AbstractAttributeDefinizerView (it is a NodeView)


addToAHCache

public static boolean addToAHCache(AbstractAttributeDefinizerView aadv,
                                   String path)

getAttributeOrgNodeView

public static AttributeOrgNodeView getAttributeOrgNodeView(AttributeOrganizer ao)

getAttributeDefNodeView

public static AttributeDefNodeView getAttributeDefNodeView(AttributeDefinition ad)

getAttributeOrganizer

public static AttributeOrganizer getAttributeOrganizer(AttributeOrgDefaultView orgView)

getAttributeDefinition

public static AttributeDefinition getAttributeDefinition(AttributeDefDefaultView defView)

getObjectLocatorKey

public static String getObjectLocatorKey(String locator)

removeInvalidCharactersFromPath

private static String removeInvalidCharactersFromPath(String s)