com.ptc.windchill.cadx.common.util
Class CATIAV4DocSpec

java.lang.Object
  extended bycom.ptc.windchill.cadx.common.util.CATIAV4DocSpec
All Implemented Interfaces:
CADDocSpecs

public class CATIAV4DocSpec
extends Object
implements CADDocSpecs


Field Summary
private static String CLASSNAME
           
private static int DOC_NAME_MAX_LIMIT
           
private static int MODEL_NAME_MAX_LIMIT
           
private  Vector renameCADNameVetosVector
           
private static String RESOURCE
           
 
Constructor Summary
CATIAV4DocSpec()
           
 
Method Summary
 boolean doesModelNameContainValidCharacters(String modelName, String modelType)
          checks whether the user entered valid CAD model name

Supported API: false
 boolean doesModelNameExistInWorkspace(EPMWorkspace wsObj, String modelName)
          Checks whether any EPM document in the workspace has the given model name.
 int getModelNamesMaxSize()
          

Supported API: false
 int getNamesMaxSize()
          

Supported API: false
 int getNumbersMaxSize()
          

Supported API: false
 String getPrefFileSectionName()
          This method returns name of the section in newdocument.ini preference file.
private  Vector getRenamableVetoVector(EPMDocument epmDocument)
           
 boolean isFileNameChangeable(EPMDocument epmDocument)
           
 boolean isModelExtensionValid(String modelName, String modelType)
          Validate extension (.prt, .asm etc.) as specified in this model name.
 boolean isModelNameSizeValid(String modelName)
          Validate the size of the model name as for some of the documents (e.g.
 boolean isNameChangeable(EPMDocument epmDocument)
           
 boolean isNameSizeValid(String name)
          Validate the size of the document name.
 boolean isNumberChangeable(EPMDocument epmDocument)
           
 boolean isNumberSizeValid(String number)
          Validate the size of the document number.
 String validModelExtensions(String modelType)
          

Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

MODEL_NAME_MAX_LIMIT

private static final int MODEL_NAME_MAX_LIMIT
See Also:
Constant Field Values

DOC_NAME_MAX_LIMIT

private static final int DOC_NAME_MAX_LIMIT
See Also:
Constant Field Values

renameCADNameVetosVector

private Vector renameCADNameVetosVector
Constructor Detail

CATIAV4DocSpec

public CATIAV4DocSpec()
Method Detail

isModelNameSizeValid

public boolean isModelNameSizeValid(String modelName)
Description copied from interface: CADDocSpecs
Validate the size of the model name as for some of the documents (e.g. PRO/E component, the size of the name (excluding any extension) is limited due to some constraint by the CAD application.

Supported API: false

Specified by:
isModelNameSizeValid in interface CADDocSpecs
Parameters:
modelName -
Returns:
boolean

doesModelNameContainValidCharacters

public boolean doesModelNameContainValidCharacters(String modelName,
                                                   String modelType)
Description copied from interface: CADDocSpecs
checks whether the user entered valid CAD model name

Supported API: false

Specified by:
doesModelNameContainValidCharacters in interface CADDocSpecs
Parameters:
modelName -
modelType -
Returns:
boolean

getModelNamesMaxSize

public int getModelNamesMaxSize()
Description copied from interface: CADDocSpecs


Supported API: false

Specified by:
getModelNamesMaxSize in interface CADDocSpecs
Returns:
int

isModelExtensionValid

public boolean isModelExtensionValid(String modelName,
                                     String modelType)
Description copied from interface: CADDocSpecs
Validate extension (.prt, .asm etc.) as specified in this model name. The model file name is allowed to have certain valid extensions. Hence the extension needs to be checked here (for the document number). The valid extensions are specified in the configuration (.ini) file for a specified document type.

Supported API: false

Specified by:
isModelExtensionValid in interface CADDocSpecs
Parameters:
modelName -
modelType -
Returns:
boolean

validModelExtensions

public String validModelExtensions(String modelType)
Description copied from interface: CADDocSpecs


Supported API: false

Specified by:
validModelExtensions in interface CADDocSpecs
Parameters:
modelType -
Returns:
String

isNameSizeValid

public boolean isNameSizeValid(String name)
Description copied from interface: CADDocSpecs
Validate the size of the document name.

Supported API: false

Specified by:
isNameSizeValid in interface CADDocSpecs
Parameters:
name -
Returns:
boolean

getNamesMaxSize

public int getNamesMaxSize()
Description copied from interface: CADDocSpecs


Supported API: false

Specified by:
getNamesMaxSize in interface CADDocSpecs
Returns:
int

isNumberSizeValid

public boolean isNumberSizeValid(String number)
Description copied from interface: CADDocSpecs
Validate the size of the document number.

Supported API: false

Specified by:
isNumberSizeValid in interface CADDocSpecs
Parameters:
number -
Returns:
boolean

getNumbersMaxSize

public int getNumbersMaxSize()
Description copied from interface: CADDocSpecs


Supported API: false

Specified by:
getNumbersMaxSize in interface CADDocSpecs
Returns:
int

getPrefFileSectionName

public String getPrefFileSectionName()
This method returns name of the section in newdocument.ini preference file. This section holds templated document numbers for different document types.

Supported API: false

Specified by:
getPrefFileSectionName in interface CADDocSpecs
Returns:
String

doesModelNameExistInWorkspace

public boolean doesModelNameExistInWorkspace(EPMWorkspace wsObj,
                                             String modelName)
                                      throws WTException
Checks whether any EPM document in the workspace has the given model name.

Supported API: false

Specified by:
doesModelNameExistInWorkspace in interface CADDocSpecs
Parameters:
wsObj -
modelName -
Returns:
boolean
Throws:
WTException

isNameChangeable

public boolean isNameChangeable(EPMDocument epmDocument)
                         throws WTException
Specified by:
isNameChangeable in interface CADDocSpecs
Throws:
WTException

isNumberChangeable

public boolean isNumberChangeable(EPMDocument epmDocument)
                           throws WTException
Specified by:
isNumberChangeable in interface CADDocSpecs
Throws:
WTException

isFileNameChangeable

public boolean isFileNameChangeable(EPMDocument epmDocument)
                             throws WTException
Specified by:
isFileNameChangeable in interface CADDocSpecs
Throws:
WTException

getRenamableVetoVector

private Vector getRenamableVetoVector(EPMDocument epmDocument)
                               throws WTException
Throws:
WTException