wt.sandbox
Class SandboxServiceCheckinEvent

java.lang.Object
  extended bywt.events.KeyedEvent
      extended bywt.sandbox.SandboxServiceMultiEvent
          extended bywt.sandbox.SandboxServiceCheckinEvent
All Implemented Interfaces:
Cloneable, Serializable

public class SandboxServiceCheckinEvent
extends SandboxServiceMultiEvent
implements Serializable

Encapusulates SandboxService event/occurence data which occur upon sanbox checkins.

The target object of this event is a WTSet of the working copies to be checked in in the case of PRE_SB_CHECKIN_EVENT, whereas it is a WTCollection of the resulting check ins in the case of POST_SB_CHECKIN_EVENT. Except where attempting to treat many service events generically, it is recommended that the more specific methods provided on this class be used in preference to getEventTarget(), however.

Note that a SandboxServiceInitialCheckinEvent is also fired during the initial check-in process for those listeners that require intimate access to initial check-ins as they are being formed.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  WTKeyedMap initialCheckinWorkingCopyToDataMap
           
private  WTValuedMap originalCopyToCheckedInCopyMap
           
static String POST_SB_CHECKIN_EVENT
          Event type indicating state immediately prior to end of sandbox checkin transaction block

Supported API: false
static String PRE_SB_CHECKIN_EVENT
          Event type indicating state immediately prior to sandbox checkin but within transaction block thereof

Supported API: false
private static String RESOURCE
           
private  WTSet workingCopies
           
private  WTValuedMap workingCopyToCheckedInCopyMap
           
private  WTValuedMap workingCopyToOriginalCopyMap
           
 
Fields inherited from class wt.sandbox.SandboxServiceMultiEvent
 
Fields inherited from class wt.events.KeyedEvent
 
Constructor Summary
private SandboxServiceCheckinEvent(String eventType, WTSet workingCopies, WTKeyedMap initialCheckinWorkingCopyToDataMap, WTValuedMap workingCopyToOriginalCopyMap, WTValuedMap workingCopyToCheckedInCopyMap, WTValuedMap originalCopyToCheckedInCopyMap)
           
 
Method Summary
private static void fireCheckinEvent(ManagerService managerService, String eventType, WTSet workingCopies, WTKeyedMap initialCheckinWorkingCopyToDataMap, WTValuedMap workingCopyToOriginalCopyMap, WTValuedMap workingCopyToCheckedInCopyMap)
           
(package private) static void firePostCheckinEvent(ManagerService managerService, WTSet workingCopies, WTKeyedMap initialCheckinWorkingCopyToDataMap, WTValuedMap workingCopyToOriginalCopyMap, WTValuedMap workingCopyToCheckedInCopyMap)
           
(package private) static void firePreCheckinEvent(ManagerService managerService, WTSet workingCopies, WTKeyedMap initialCheckinWorkingCopyToDataMap, WTValuedMap workingCopyToOriginalCopyMap)
           
static String generateEventKey(String eventType)
          Generate an appropriate event key for this class given an event type.
 WTKeyedMap getInitialCheckinWorkingCopyToDataMap()
          Get map from all working copies newly created in the sandbox which are being checked in to the corresponding InitialCheckinData objects.
 WTValuedMap getOriginalCopyToCheckedInCopyMap()
          When the event type is POST_SB_CHECKIN_EVENT, returns a map from original copies to newly created check ins.
 WTSet getWorkingCopies()
          Get the set of all working copies being checked in.
 WTValuedMap getWorkingCopyToCheckedInCopyMap()
          When the event type is POST_SB_CHECKIN_EVENT, returns a map from sandbox working copies to newly created check ins.
 WTValuedMap getWorkingCopyToOriginalCopyMap()
          Get map from sandbox working copies (which were not newly created in the sandbox) to the original (pre-check-out) copies.
 
Methods inherited from class wt.sandbox.SandboxServiceMultiEvent
getEventTarget, toMultiObjectEvent, toSingleObjectEvents
 
Methods inherited from class wt.events.KeyedEvent
generateEventKey, generateEventKey, getConceptualClassname, getEventKey, getEventType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

PRE_SB_CHECKIN_EVENT

public static final String PRE_SB_CHECKIN_EVENT
Event type indicating state immediately prior to sandbox checkin but within transaction block thereof

Supported API: false

See Also:
Constant Field Values

POST_SB_CHECKIN_EVENT

public static final String POST_SB_CHECKIN_EVENT
Event type indicating state immediately prior to end of sandbox checkin transaction block

Supported API: false

See Also:
Constant Field Values

workingCopies

private WTSet workingCopies

initialCheckinWorkingCopyToDataMap

private WTKeyedMap initialCheckinWorkingCopyToDataMap

workingCopyToOriginalCopyMap

private WTValuedMap workingCopyToOriginalCopyMap

workingCopyToCheckedInCopyMap

private WTValuedMap workingCopyToCheckedInCopyMap

originalCopyToCheckedInCopyMap

private WTValuedMap originalCopyToCheckedInCopyMap
Constructor Detail

SandboxServiceCheckinEvent

private SandboxServiceCheckinEvent(String eventType,
                                   WTSet workingCopies,
                                   WTKeyedMap initialCheckinWorkingCopyToDataMap,
                                   WTValuedMap workingCopyToOriginalCopyMap,
                                   WTValuedMap workingCopyToCheckedInCopyMap,
                                   WTValuedMap originalCopyToCheckedInCopyMap)
Method Detail

getWorkingCopies

public WTSet getWorkingCopies()
Get the set of all working copies being checked in.

Supported API: false

Returns:
WTSet

getInitialCheckinWorkingCopyToDataMap

public WTKeyedMap getInitialCheckinWorkingCopyToDataMap()
Get map from all working copies newly created in the sandbox which are being checked in to the corresponding InitialCheckinData objects.

Supported API: false

Returns:
WTKeyedMap

getWorkingCopyToOriginalCopyMap

public WTValuedMap getWorkingCopyToOriginalCopyMap()
Get map from sandbox working copies (which were not newly created in the sandbox) to the original (pre-check-out) copies.

Supported API: false

Returns:
WTValuedMap

getWorkingCopyToCheckedInCopyMap

public WTValuedMap getWorkingCopyToCheckedInCopyMap()
When the event type is POST_SB_CHECKIN_EVENT, returns a map from sandbox working copies to newly created check ins.

When the event type is PRE_SB_CHECK_IN_EVENT, this method simply returns null.

Supported API: false

Returns:
WTValuedMap

getOriginalCopyToCheckedInCopyMap

public WTValuedMap getOriginalCopyToCheckedInCopyMap()
When the event type is POST_SB_CHECKIN_EVENT, returns a map from original copies to newly created check ins.

When the event type is PRE_SB_CHECK_IN_EVENT, this method simply returns null.

Supported API: false

Returns:
WTValuedMap

generateEventKey

public static String generateEventKey(String eventType)
Generate an appropriate event key for this class given an event type.

Supported API: false

Parameters:
eventType - the type of the event
Returns:
String

firePreCheckinEvent

static void firePreCheckinEvent(ManagerService managerService,
                                WTSet workingCopies,
                                WTKeyedMap initialCheckinWorkingCopyToDataMap,
                                WTValuedMap workingCopyToOriginalCopyMap)
                         throws WTException
Throws:
WTException

firePostCheckinEvent

static void firePostCheckinEvent(ManagerService managerService,
                                 WTSet workingCopies,
                                 WTKeyedMap initialCheckinWorkingCopyToDataMap,
                                 WTValuedMap workingCopyToOriginalCopyMap,
                                 WTValuedMap workingCopyToCheckedInCopyMap)
                          throws WTException
Throws:
WTException

fireCheckinEvent

private static void fireCheckinEvent(ManagerService managerService,
                                     String eventType,
                                     WTSet workingCopies,
                                     WTKeyedMap initialCheckinWorkingCopyToDataMap,
                                     WTValuedMap workingCopyToOriginalCopyMap,
                                     WTValuedMap workingCopyToCheckedInCopyMap)
                              throws WTException
Throws:
WTException