com.ptc.windchill.uwgm.proesrv
Class ProeServiceRequest

java.lang.Object
  extended bycom.ptc.windchill.uwgm.proesrv.ProeServiceRequest
All Implemented Interfaces:
RequestResultCache.Populator
Direct Known Subclasses:
AddToWorkspaceRequest, CheckinRequest, DbObjGetInformationRequest, EpmRenameRequest, EpmUploadRequest, FindIterationsRequest, GetContentDownloadInfoRequest, GetFolderContentRequest, GetNewDocumentNumbersRequest, IBAModificationRequest, PartRenameRequest, PrepareEpmForUploadRequest, ProeServiceFrameworkTestDelegate, ProeServiceTestProxy, RemoveFromWorkspaceRequest, ServerGetInformationRequest, SetTargetFolderRequest, UndoCheckoutRequest, UpdateWorkspaceRequest, WorkspaceCreateRequest, WorkspaceDeleteRequest, WorkspaceGetInformationRequest, WsConflictReportRequest

public abstract class ProeServiceRequest
extends Object
implements RequestResultCache.Populator

super class for all ProeService requests

each request should implement validateRequest() and executeRequest() methods


Field Summary
protected  RequestContext context
           
private static Log log
          logging
private static String REQUEST_RESOURCE
          intenral resource bundle for request names
private  String requestNameCode
          Localized request Name : should be set in constructors
protected static String RESOURCE
          shared Resource bundle for all ProeService requests
protected  RequestResultCache.Populator resultPopulator
           
private  RequestResultCache rrc
           
protected  com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest
           
 
Constructor Summary
protected ProeServiceRequest(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest, RequestResultCache resultCache)
          constructor to be overwritten by implementation classes
 
Method Summary
 com.ptc.windchill.uwgm.soap.uwgmdb.Container addContainer(WTContainer wtContainer)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.Content addContent(ContentItem item)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration addEPMDocument(EPMDocument epmDocument)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.EpmMaster addEPMDocumentMaster(EPMDocumentMaster wtEpmMaster)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.Workspace addEPMWorkspace(EPMWorkspace epmWorkspace)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.Workspace addEPMWorkspace(EPMWorkspace epmWorkspace, long clientStateId)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.Folder addFakeFolder(FakeFolder fakeFolder)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.Folder addFolder(Folder wtFolder, WTCollection foldered)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.EpmMemberDependency addLink(EPMMemberLink link)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.EpmReferenceDependency addLink(EPMReferenceLink link)
           
 void addPreferedContentURLs(String[] preferedURLs)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.PartIteration addWTPart(WTPart wtPart)
           
 com.ptc.windchill.uwgm.soap.uwgmdb.PartMaster addWTPartMaster(WTPartMaster wtPartMaster)
           
 void bindContent(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter, com.ptc.windchill.uwgm.soap.uwgmdb.Content content)
           
 void bindFoldered(com.ptc.windchill.uwgm.soap.uwgmdb.Folder folder, com.ptc.windchill.uwgm.soap.uwgmdb.Foldered foldered)
           
protected  com.ptc.windchill.uwgm.soap.uwgmdb.DbObj.Iterator createDbObjIterator()
           
abstract  com.ptc.windchill.uwgm.soap.uwgm.UwgmMessage executeRequest()
          executes request
 RequestContext getContext()
           
 String getLocalizedName()
          returns Localized request name to show in the Server Console
 com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest getUwgmRequest()
           
protected  void ignoreOriginalState(Workable iter)
           
 void reportFailure()
           
protected  void reportInfoMessage(String rbCode, Object[] params, WTCollection objects)
          report info message
protected  void reportInfoMessage(WTMessage wtMessage, WTCollection objects)
          report Info (success) message
protected  void reportMessage(InfoElement message)
          Report Info/Warning message
protected  void reportMessages(InfoElement[] messages)
          Report Info/Warning messages
protected  void reportWarnings(List warnings)
          process and report Warnings
protected  void resetCurrentEpmWS()
           
protected  void setRequestCode(String requestCode)
          sets name request code (used by Dispatcher)
abstract  void validateRequest()
          validates request data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

protected static final String RESOURCE
shared Resource bundle for all ProeService requests


REQUEST_RESOURCE

private static final String REQUEST_RESOURCE
intenral resource bundle for request names


resultPopulator

protected final RequestResultCache.Populator resultPopulator

uwgmRequest

protected final com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest

context

protected final RequestContext context

rrc

private final RequestResultCache rrc

requestNameCode

private String requestNameCode
Localized request Name : should be set in constructors


log

private static Log log
logging

Constructor Detail

ProeServiceRequest

protected ProeServiceRequest(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest uwgmRequest,
                             RequestResultCache resultCache)
constructor to be overwritten by implementation classes

Parameters:
uwgmRequest - UwgmRequest
resultCache - RequestResultCache
Method Detail

setRequestCode

protected void setRequestCode(String requestCode)
sets name request code (used by Dispatcher)

Parameters:
requestCode - String

createDbObjIterator

protected com.ptc.windchill.uwgm.soap.uwgmdb.DbObj.Iterator createDbObjIterator()

validateRequest

public abstract void validateRequest()
                              throws RequestValidationException,
                                     UwgmErrorException
validates request data

Throws:
RequestValidationException - to report validation problems
UwgmErrorException - to report errors

executeRequest

public abstract com.ptc.windchill.uwgm.soap.uwgm.UwgmMessage executeRequest()
                                                                     throws UwgmConflictException,
                                                                            UwgmErrorException
executes request

reports success UwgmMessage

Returns:
UwgmMessage
Throws:
UwgmConflictException - to report execution conflicts
UwgmErrorException - to report errors

getLocalizedName

public String getLocalizedName()
returns Localized request name to show in the Server Console

Returns:
Container
Throws:
WTException

reportMessage

protected void reportMessage(InfoElement message)
Report Info/Warning message

Parameters:
message - InfoMessage

reportMessages

protected void reportMessages(InfoElement[] messages)
Report Info/Warning messages

Parameters:
messages - InfoMessage[]

reportWarnings

protected void reportWarnings(List warnings)
process and report Warnings

Parameters:
warnings - List

reportInfoMessage

protected void reportInfoMessage(String rbCode,
                                 Object[] params,
                                 WTCollection objects)
report info message

Parameters:
rbCode - String from requestResource.rbInfo
params - Object[]
objects - WTCollection

reportInfoMessage

protected void reportInfoMessage(WTMessage wtMessage,
                                 WTCollection objects)
report Info (success) message

Parameters:
wtMessage - WTMessage
objects - WTCollection

addContainer

public com.ptc.windchill.uwgm.soap.uwgmdb.Container addContainer(WTContainer wtContainer)
                                                          throws WTException
Specified by:
addContainer in interface RequestResultCache.Populator
Throws:
WTException

addFolder

public com.ptc.windchill.uwgm.soap.uwgmdb.Folder addFolder(Folder wtFolder,
                                                           WTCollection foldered)
                                                    throws WTException
Specified by:
addFolder in interface RequestResultCache.Populator
Throws:
WTException

addFakeFolder

public com.ptc.windchill.uwgm.soap.uwgmdb.Folder addFakeFolder(FakeFolder fakeFolder)
                                                        throws WTException
Specified by:
addFakeFolder in interface RequestResultCache.Populator
Throws:
WTException

bindFoldered

public void bindFoldered(com.ptc.windchill.uwgm.soap.uwgmdb.Folder folder,
                         com.ptc.windchill.uwgm.soap.uwgmdb.Foldered foldered)
Specified by:
bindFoldered in interface RequestResultCache.Populator

addContent

public com.ptc.windchill.uwgm.soap.uwgmdb.Content addContent(ContentItem item)
                                                      throws WTException
Specified by:
addContent in interface RequestResultCache.Populator
Throws:
WTException

bindContent

public void bindContent(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter,
                        com.ptc.windchill.uwgm.soap.uwgmdb.Content content)
Specified by:
bindContent in interface RequestResultCache.Populator

addEPMDocument

public com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration addEPMDocument(EPMDocument epmDocument)
                                                               throws WTException
Specified by:
addEPMDocument in interface RequestResultCache.Populator
Throws:
WTException

addEPMDocumentMaster

public com.ptc.windchill.uwgm.soap.uwgmdb.EpmMaster addEPMDocumentMaster(EPMDocumentMaster wtEpmMaster)
                                                                  throws WTException
Specified by:
addEPMDocumentMaster in interface RequestResultCache.Populator
Throws:
WTException

addEPMWorkspace

public com.ptc.windchill.uwgm.soap.uwgmdb.Workspace addEPMWorkspace(EPMWorkspace epmWorkspace)
                                                             throws WTException
Specified by:
addEPMWorkspace in interface RequestResultCache.Populator
Throws:
WTException

addEPMWorkspace

public com.ptc.windchill.uwgm.soap.uwgmdb.Workspace addEPMWorkspace(EPMWorkspace epmWorkspace,
                                                                    long clientStateId)
                                                             throws WTException
Specified by:
addEPMWorkspace in interface RequestResultCache.Populator
Throws:
WTException

addLink

public com.ptc.windchill.uwgm.soap.uwgmdb.EpmReferenceDependency addLink(EPMReferenceLink link)
                                                                  throws WTException
Specified by:
addLink in interface RequestResultCache.Populator
Throws:
WTException

addLink

public com.ptc.windchill.uwgm.soap.uwgmdb.EpmMemberDependency addLink(EPMMemberLink link)
                                                               throws WTException
Specified by:
addLink in interface RequestResultCache.Populator
Throws:
WTException

addWTPart

public com.ptc.windchill.uwgm.soap.uwgmdb.PartIteration addWTPart(WTPart wtPart)
                                                           throws WTException
Specified by:
addWTPart in interface RequestResultCache.Populator
Throws:
WTException

addWTPartMaster

public com.ptc.windchill.uwgm.soap.uwgmdb.PartMaster addWTPartMaster(WTPartMaster wtPartMaster)
                                                              throws WTException
Specified by:
addWTPartMaster in interface RequestResultCache.Populator
Throws:
WTException

addPreferedContentURLs

public void addPreferedContentURLs(String[] preferedURLs)

reportFailure

public void reportFailure()
Specified by:
reportFailure in interface RequestResultCache.Populator

getContext

public RequestContext getContext()

getUwgmRequest

public com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest getUwgmRequest()

resetCurrentEpmWS

protected void resetCurrentEpmWS()

ignoreOriginalState

protected void ignoreOriginalState(Workable iter)