|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.uwgm.proesrv.rrc.RequestResultCache
A cache to compose the data for the response.
Nested Class Summary | |
private static class |
RequestResultCache.LocalIdInfo
Information attached to WorkspaceUpdateMessage_i in order to fill up its DbObjects collection with onew objects created during an upload. |
static interface |
RequestResultCache.Populator
|
private static class |
RequestResultCache.RequestedAttributes
|
Constructor Summary | |
RequestResultCache(RequestContext context)
|
Method Summary | |
(package private) void |
addInfoElement(InfoElement message)
|
(package private) void |
addNewlyCreatedObject(com.ptc.windchill.uwgm.soap.uwgmdb.DbObj dbObj)
|
RequestResultCache.Populator |
addRequest(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest request)
|
(package private) boolean |
attributeRequested(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration obj,
com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType attrType)
Package-private method to effectively check if an attribute of a given type has been requested for a particular EpmIteration |
private boolean |
attributeRequested(Map attrMap,
com.ptc.windchill.uwgm.soap.uwgmdb.DbObj obj,
com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType attrType)
|
(package private) boolean |
attributeRequested(com.ptc.windchill.uwgm.soap.uwgmdb.PartIteration obj,
com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType attrType)
Package-private method to effectively check if an attribute of a given type has been requested for a particular PartIteration |
private void |
buildEpmIterationAttrsMaps()
|
private void |
buildPartIterationAttrsMaps()
|
(package private) com.ptc.windchill.uwgm.soap.impl.uwgmdb.Content_i |
createContent(ContentItem item)
|
RequestContext |
getContext()
|
EPMWorkspace |
getCurrentEpmWS()
Will return the last set WS. |
private Collection |
getFolderEpmIterations(com.ptc.windchill.uwgm.soap.uwgmdb.Folder folder)
|
private Collection |
getFolderIterations(com.ptc.windchill.uwgm.soap.uwgmdb.Folder folder,
Class iterClass)
|
InfoElement[] |
getInfoElements()
All info and warning mesages collected during post-processing. |
Locale |
getLocale()
|
(package private) String |
getNDVersion(EPMDocument epmDoc)
|
String |
getOidString(ObjectIdentifier oid)
|
String |
getOidString(Persistable obj)
|
String |
getOidString(WTReference ref)
|
WTPrincipal |
getPrincipal()
|
RequestResultCache.Populator |
getRequestCache(String requestId)
|
(package private) com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes |
getRequestedAttributes(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration obj)
Package-private method to effectively check if an attribute of a given type has been requested for a particular EpmIteration |
(package private) com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes |
getRequestedAttributes(com.ptc.windchill.uwgm.soap.uwgmdb.PartIteration obj)
Package-private method to effectively check if an attribute of a given type has been requested for a particular PartIteration |
private Collection |
getWorkspaceEpmIterations(com.ptc.windchill.uwgm.soap.uwgmdb.Workspace ws)
|
private Collection |
getWorkspaceIterations(com.ptc.windchill.uwgm.soap.uwgmdb.Workspace ws,
Class iterClass)
|
(package private) String |
getWorkspacePageURL(EPMWorkspace epmWS)
|
void |
ignoreOriginalState(Workable iter)
|
void |
ignoreWorkspaceOriginalState(EPMWorkspace epmWS)
Marks the WS to always retrieve all requested attributes regardless of the original state. |
private boolean |
isNullOrHasAttribute(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra,
com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType attrType)
|
boolean |
isRequestFailed(String requestId)
|
void |
postProcess()
|
private void |
processAssociated()
|
private void |
processContainers()
|
private void |
processContentInfo()
|
private void |
processEpmIterations()
|
private void |
processEpmMasters()
|
private void |
processFamilyTables()
|
private void |
processFoldered()
For all Foldered objects which are already in the cache, check if LocationFolder attribute is requested and make sure the corresponding Folder object is also there. |
private void |
processFolders()
|
private void |
processIbaHolders()
|
private void |
processNewlyCreatedObjects()
|
private void |
processPartIterations()
|
private void |
processPartMasters()
|
private void |
processPdmState()
|
private void |
processProductViewInfo()
|
private void |
processUpdateCounters()
|
private void |
processWorkspaceFamilyTables()
Fill in the WorkspaceFamilyTables lazy attribute for workspaces with ignored original state. |
private void |
processWorkspaces()
|
(package private) void |
reportException(String resourceCode,
Throwable t,
Persistable applicableObject)
Convenience method. |
(package private) void |
reportException(String resourceCode,
Throwable t,
WTCollection applicableObjects)
Create warning InfoElement with applicable objects. |
(package private) void |
reportFailure(String resourceCode,
Persistable applicableObject)
Convenience method. |
(package private) void |
reportFailure(String resourceCode,
WTCollection applicableObjects)
Create warning InfoElement with applicable objects. |
void |
resetCurrentEpmWS()
|
void |
setCurrentEpmWS(EPMWorkspace epmWS)
|
(package private) void |
setDbObjAttrs(com.ptc.windchill.uwgm.soap.uwgmdb.DbObj entity,
Persistable wtObj,
com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra)
Set the simplest attributes from the Persistable. |
void |
setLocalIdMap(com.ptc.windchill.uwgm.soap.impl.uwgmsvc.WorkspaceUpdateMessage_i wsMessage,
Map idMap)
Append String pairs [OID]->[Local ID] to the Map being used to resolve LocalIDs for upload request results. |
void |
setPrefferedContentUrls(String[] urls)
|
void |
setWorkspaceOriginalState(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest request,
EPMWorkspace epmWS)
For a request which returns WorkspaceMessage, retrieve and remember the original state of the WS in order to optimize post-processing. |
(package private) void |
throwUwgmErrorException(String resourceCode,
Throwable t,
Persistable applicableObject)
Convenience method to construct and throw UwgmErrorException. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final String RESOURCE
private static final Log log
final ObjectIdentifierHelper oidHelper
private final RequestContext context
private EPMWorkspace currentEpmWS
String[] prefferedContentUrls
private final List requests
private final Map requestIdMap
private final Map epmIterAttrs
private final Map partIterAttrs
private final RequestResultCache.RequestedAttributes epmIterRA
private final RequestResultCache.RequestedAttributes partIterRA
com.ptc.windchill.uwgm.soap.uwgmdb.Workspace[] workspaces
final WsOriginalStateHelper origStateHelper
final Map wsClinetStateMap
DbObjCache folderCache
final RRCFakeFolderHelper fakeFolderHelper
final Map localIdMap
final Map localIdInfoMap
final DbObjCache globalCache
final UwgmObjectFactory objFactory
private final List messages
private static final com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType[] EMPTY_LAZY_ATTRS
private static final RequestResultCache.RequestedAttributes NO_REQUESTED_ATTRS
Constructor Detail |
public RequestResultCache(RequestContext context)
Method Detail |
public RequestResultCache.Populator addRequest(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest request)
public RequestResultCache.Populator getRequestCache(String requestId)
public boolean isRequestFailed(String requestId)
public RequestContext getContext()
public Locale getLocale()
public WTPrincipal getPrincipal()
public EPMWorkspace getCurrentEpmWS()
public void setCurrentEpmWS(EPMWorkspace epmWS)
public void resetCurrentEpmWS()
public void setWorkspaceOriginalState(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest request, EPMWorkspace epmWS)
request
- UwgmRequestepmWS
- EPMWorkspacepublic void ignoreWorkspaceOriginalState(EPMWorkspace epmWS)
epmWS
- EPMWorkspacepublic void ignoreOriginalState(Workable iter)
public void setPrefferedContentUrls(String[] urls)
public void setLocalIdMap(com.ptc.windchill.uwgm.soap.impl.uwgmsvc.WorkspaceUpdateMessage_i wsMessage, Map idMap)
wsMessage
- WorkspaceUpdateMessage_i to add new objectsidMap
- Map [OID String]->[Local ID String]public InfoElement[] getInfoElements()
public String getOidString(Persistable obj)
public String getOidString(ObjectIdentifier oid)
public String getOidString(WTReference ref)
public void postProcess() throws UwgmErrorException
UwgmErrorException
private void buildEpmIterationAttrsMaps() throws UwgmErrorException
UwgmErrorException
private void buildPartIterationAttrsMaps() throws UwgmErrorException
UwgmErrorException
void addInfoElement(InfoElement message)
void reportException(String resourceCode, Throwable t, WTCollection applicableObjects)
resourceCode
- constant from rrcResources.rbInfot
- ThrowableapplicableObjects
- WTCollectionvoid reportFailure(String resourceCode, WTCollection applicableObjects)
resourceCode
- constant from rrcResources.rbInfoapplicableObjects
- WTCollectionvoid reportException(String resourceCode, Throwable t, Persistable applicableObject)
resourceCode
- constant from rrcResources.rbInfot
- ThrowableapplicableObject
- Persistablevoid reportFailure(String resourceCode, Persistable applicableObject)
resourceCode
- constant from rrcResources.rbInfoapplicableObject
- Persistablevoid throwUwgmErrorException(String resourceCode, Throwable t, Persistable applicableObject) throws UwgmErrorException
resourceCode
- constant from rrcResources.rbInfot
- ThrowableapplicableObject
- Persistable
UwgmErrorException
- - always!!!boolean attributeRequested(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration obj, com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType attrType)
obj
- EpmIterationattrType
- UwgmLazyAttrType
com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes getRequestedAttributes(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration obj)
obj
- EpmIteration
boolean attributeRequested(com.ptc.windchill.uwgm.soap.uwgmdb.PartIteration obj, com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType attrType)
obj
- PartIterationattrType
- UwgmLazyAttrType
com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes getRequestedAttributes(com.ptc.windchill.uwgm.soap.uwgmdb.PartIteration obj)
obj
- PartIteration
private boolean attributeRequested(Map attrMap, com.ptc.windchill.uwgm.soap.uwgmdb.DbObj obj, com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType attrType)
String getNDVersion(EPMDocument epmDoc)
private Collection getWorkspaceEpmIterations(com.ptc.windchill.uwgm.soap.uwgmdb.Workspace ws)
private Collection getWorkspaceIterations(com.ptc.windchill.uwgm.soap.uwgmdb.Workspace ws, Class iterClass)
private Collection getFolderEpmIterations(com.ptc.windchill.uwgm.soap.uwgmdb.Folder folder)
private Collection getFolderIterations(com.ptc.windchill.uwgm.soap.uwgmdb.Folder folder, Class iterClass)
private void processPdmState()
private void processUpdateCounters()
private void processAssociated()
private void processFamilyTables() throws UwgmErrorException
UwgmErrorException
private void processContentInfo() throws UwgmErrorException
UwgmErrorException
private void processFoldered() throws UwgmErrorException
UwgmErrorException
private void processWorkspaces() throws UwgmErrorException
UwgmErrorException
private void processWorkspaceFamilyTables()
UwgmErrorException
private void processFolders() throws UwgmErrorException
UwgmErrorException
private void processContainers() throws UwgmErrorException
UwgmErrorException
private void processEpmIterations() throws UwgmErrorException
UwgmErrorException
private void processEpmMasters() throws UwgmErrorException
UwgmErrorException
private void processPartIterations() throws UwgmErrorException
UwgmErrorException
private void processPartMasters() throws UwgmErrorException
UwgmErrorException
private void processIbaHolders() throws UwgmErrorException
UwgmErrorException
private void processProductViewInfo()
private boolean isNullOrHasAttribute(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra, com.ptc.windchill.uwgm.soap.uwgm.UwgmLazyAttrType attrType)
void setDbObjAttrs(com.ptc.windchill.uwgm.soap.uwgmdb.DbObj entity, Persistable wtObj, com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra)
entity
- DbEntitywtObj
- Persistablera
- RequestedAttributes, may be null to set allcom.ptc.windchill.uwgm.soap.impl.uwgmdb.Content_i createContent(ContentItem item)
String getWorkspacePageURL(EPMWorkspace epmWS)
void addNewlyCreatedObject(com.ptc.windchill.uwgm.soap.uwgmdb.DbObj dbObj)
private void processNewlyCreatedObjects()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |