com.ptc.windchill.uwgm.proesrv.cache
Class EpmRenameInstructionCacheAdapter

java.lang.Object
  extended bycom.ptc.windchill.uwgm.proesrv.cache.RequestCacheAdapter
      extended bycom.ptc.windchill.uwgm.proesrv.cache.RenameInstructionCacheAdapter
          extended bycom.ptc.windchill.uwgm.proesrv.cache.EpmRenameInstructionCacheAdapter
All Implemented Interfaces:
EpmRenameInstructionCache, RenameInstructionCache

public class EpmRenameInstructionCacheAdapter
extends RenameInstructionCacheAdapter
implements EpmRenameInstructionCache

Implementation adapter for EpmRenameInstructionCache. Works only with EpmRenameInstructions.


Field Summary
private static String CACHE_RESOURCE
           
private  WTKeyedMap cadNameInstructions
           
private static Log log
          logging
private static int PROE_MAX_CAD_NAME_LENGTH
           
 
Fields inherited from class com.ptc.windchill.uwgm.proesrv.cache.RenameInstructionCacheAdapter
 
Fields inherited from class com.ptc.windchill.uwgm.proesrv.cache.RequestCacheAdapter
 
Constructor Summary
EpmRenameInstructionCacheAdapter()
           
 
Method Summary
protected  void addInstruction(com.ptc.windchill.uwgm.soap.uwgmsvc.RenameInstruction uwgmInstruction, Persistable persistable)
           
private  void addValidationError(String resourceCode, Object[] params, RequestContext context, List validationErrors, EPMDocumentMaster master)
           
private  boolean containsValidChars(String cadName)
           
 WTKeyedMap getCadNameMap()
          returns WTKeyedMap of CAD name change instructions [Master, CAD Name]
private  String getNewName(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction instruction, EPMDocumentMaster master)
           
private  String getNewNumber(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction instruction, EPMDocumentMaster master)
           
private  boolean isCadNameChangeRequired(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction epmRenameInstruction, EPMDocumentMaster master)
           
private  boolean isIdentityChangeRequired(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction epmRenameInstruction, EPMDocumentMaster master)
           
private  void validateCADName(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction epmRenameInstruction, List validationErrors, EPMDocumentMaster master, RequestContext context)
           
protected  List validateInstruction(com.ptc.windchill.uwgm.soap.uwgmsvc.RenameInstruction uwgmInstruction, Persistable persistable, RequestContext context)
           
protected  void validateRequestData(RequestContext requestContext, com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest)
          abstract validateRequestData method to be overwritten by RequestCacheAdapter implementations
 
Methods inherited from class com.ptc.windchill.uwgm.proesrv.cache.RenameInstructionCacheAdapter
getIdentityInfoMap
 
Methods inherited from class com.ptc.windchill.uwgm.proesrv.cache.RequestCacheAdapter
checkCacheData, isValid, setValid, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ptc.windchill.uwgm.proesrv.cache.RenameInstructionCache
getIdentityInfoMap
 

Field Detail

PROE_MAX_CAD_NAME_LENGTH

private static final int PROE_MAX_CAD_NAME_LENGTH
See Also:
Constant Field Values

CACHE_RESOURCE

private static final String CACHE_RESOURCE

cadNameInstructions

private WTKeyedMap cadNameInstructions

log

private static Log log
logging

Constructor Detail

EpmRenameInstructionCacheAdapter

public EpmRenameInstructionCacheAdapter()
Method Detail

getCadNameMap

public WTKeyedMap getCadNameMap()
Description copied from interface: EpmRenameInstructionCache
returns WTKeyedMap of CAD name change instructions [Master, CAD Name]

Specified by:
getCadNameMap in interface EpmRenameInstructionCache
Returns:
WTKeyedMap

validateRequestData

protected void validateRequestData(RequestContext requestContext,
                                   com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest)
                            throws RequestValidationException,
                                   UwgmErrorException
Description copied from class: RequestCacheAdapter
abstract validateRequestData method to be overwritten by RequestCacheAdapter implementations

Overrides:
validateRequestData in class RenameInstructionCacheAdapter
Throws:
RequestValidationException
UwgmErrorException

validateInstruction

protected List validateInstruction(com.ptc.windchill.uwgm.soap.uwgmsvc.RenameInstruction uwgmInstruction,
                                   Persistable persistable,
                                   RequestContext context)
Specified by:
validateInstruction in class RenameInstructionCacheAdapter

addInstruction

protected void addInstruction(com.ptc.windchill.uwgm.soap.uwgmsvc.RenameInstruction uwgmInstruction,
                              Persistable persistable)
Specified by:
addInstruction in class RenameInstructionCacheAdapter

validateCADName

private void validateCADName(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction epmRenameInstruction,
                             List validationErrors,
                             EPMDocumentMaster master,
                             RequestContext context)

isCadNameChangeRequired

private boolean isCadNameChangeRequired(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction epmRenameInstruction,
                                        EPMDocumentMaster master)

isIdentityChangeRequired

private boolean isIdentityChangeRequired(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction epmRenameInstruction,
                                         EPMDocumentMaster master)

getNewName

private String getNewName(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction instruction,
                          EPMDocumentMaster master)

getNewNumber

private String getNewNumber(com.ptc.windchill.uwgm.soap.uwgmsvc.EpmRenameInstruction instruction,
                            EPMDocumentMaster master)

addValidationError

private void addValidationError(String resourceCode,
                                Object[] params,
                                RequestContext context,
                                List validationErrors,
                                EPMDocumentMaster master)

containsValidChars

private boolean containsValidChars(String cadName)