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

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

public class PROEDocSpec
extends Object
implements CADDocSpecs



Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private static int DOC_NAME_MAX_LIMIT
           
private static int DOC_NUMBER_MAX_LIMIT
           
private static int MODEL_NAME_MAX_LIMIT
           
private  Vector renameCADNameVetosVector
           
private static String RESOURCE
           
 
Constructor Summary
PROEDocSpec()
           
 
Method Summary
 boolean doesModelNameContainValidCharacters(String modelName, String modelType)
          

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)
          

Supported API: false
 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

DOC_NUMBER_MAX_LIMIT

private static final int DOC_NUMBER_MAX_LIMIT
See Also:
Constant Field Values

renameCADNameVetosVector

private Vector renameCADNameVetosVector
Constructor Detail

PROEDocSpec

public PROEDocSpec()
Method Detail

isModelNameSizeValid

public boolean isModelNameSizeValid(String modelName)


Supported API: false

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

doesModelNameContainValidCharacters

public boolean doesModelNameContainValidCharacters(String modelName,
                                                   String modelType)


Supported API: false

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

getModelNamesMaxSize

public int getModelNamesMaxSize()


Supported API: false

Specified by:
getModelNamesMaxSize in interface CADDocSpecs
Returns:
int

isModelExtensionValid

public boolean isModelExtensionValid(String modelName,
                                     String modelType)
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)


Supported API: false

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

isNameSizeValid

public boolean isNameSizeValid(String name)
Validate the size of the document name.

Supported API: false

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

getNamesMaxSize

public int getNamesMaxSize()


Supported API: false

Specified by:
getNamesMaxSize in interface CADDocSpecs
Returns:
int

isNumberSizeValid

public boolean isNumberSizeValid(String number)
Validate the size of the document number.

Supported API: false

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

getNumbersMaxSize

public int getNumbersMaxSize()


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