wt.content
Class ContentServiceEvent

java.lang.Object
  extended bywt.events.KeyedEvent
      extended bywt.content.ContentServiceEvent
All Implemented Interfaces:
Serializable

public class ContentServiceEvent
extends KeyedEvent
implements Serializable

Events dispatched by the ContentService. All events have a ContentHolder and an ApplicationData attached. Note that the target object of the

PRE_UPLOAD is dispatched right before an upload is started.
POST_UPLOAD is dispatched right after an upload is complete.
PRE_DOWNLOAD is dispatched right before an download is started.
POST_DOWNLOAD is dispatched right after an download is complete.

WARNING- if the sytem running has content replication enabled, the download events MAY NOT be dispatched to the correct server for processing. Do not depend on the dispatch of these events if you are using content replication.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static String CONTENT_COPY_FORWARD
          

Supported API: true
static String POST_DOWNLOAD
          

Supported API: true
static String POST_UPLOAD
          

Supported API: true
static String PRE_DOWNLOAD
          

Supported API: true
static String PRE_UPLOAD
          

Supported API: true
private static String RESOURCE
           
private  ApplicationData theApplicationData
           
private  ContentHolder theContentHolder
           
private  ContentServiceSvr theContentServiceSvr
           
 
Fields inherited from class wt.events.KeyedEvent
 
Constructor Summary
ContentServiceEvent(ContentServiceSvr service, String eventType, ContentHolder holder, ApplicationData appData)
          

Supported API: false
ContentServiceEvent(ContentServiceSvr service, String eventType, WTKeyedMap holderAppDataMap)
          Create a ContentServiceEvent using the input WTKeyedHashMap as a event target.
 
Method Summary
static String generateEventKey(String eventType)
          Generates an event key from an event type.
 ApplicationData getApplicationData()
          Gets the object for the association that plays role: theApplicationData.
 ContentHolder getContentHolder()
          Gets the object for the association that plays role: theContentHolder.
 ContentServiceSvr getContentServiceSvr()
          Gets the object for the association that plays role: theContentServiceSvr.
 void setApplicationData(ApplicationData a_ApplicationData)
          Sets the object for the association that plays role: theApplicationData.
 void setContentHolder(ContentHolder a_ContentHolder)
          Sets the object for the association that plays role: theContentHolder.
 void setContentServiceSvr(ContentServiceSvr a_ContentServiceSvr)
          Sets the object for the association that plays role: theContentServiceSvr.
private  void theApplicationDataValidate(ApplicationData a_ApplicationData)
           
private  void theContentHolderValidate(ContentHolder a_ContentHolder)
           
private  void theContentServiceSvrValidate(ContentServiceSvr a_ContentServiceSvr)
           
 KeyedEvent toMultiObjectEvent()
          

Supported API: false
 KeyedEvent[] toSingleObjectEvents()
          

Supported API: false
 
Methods inherited from class wt.events.KeyedEvent
generateEventKey, generateEventKey, getConceptualClassname, getEventKey, getEventTarget, 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_UPLOAD

public static final String PRE_UPLOAD


Supported API: true

See Also:
Constant Field Values

POST_UPLOAD

public static final String POST_UPLOAD


Supported API: true

See Also:
Constant Field Values

PRE_DOWNLOAD

public static final String PRE_DOWNLOAD


Supported API: true

See Also:
Constant Field Values

POST_DOWNLOAD

public static final String POST_DOWNLOAD


Supported API: true

See Also:
Constant Field Values

CONTENT_COPY_FORWARD

public static final String CONTENT_COPY_FORWARD


Supported API: true

See Also:
Constant Field Values

theContentHolder

private ContentHolder theContentHolder

theApplicationData

private ApplicationData theApplicationData

theContentServiceSvr

private ContentServiceSvr theContentServiceSvr
Constructor Detail

ContentServiceEvent

public ContentServiceEvent(ContentServiceSvr service,
                           String eventType,
                           ContentHolder holder,
                           ApplicationData appData)
                    throws VersionControlException,
                           WTPropertyVetoException


Supported API: false

Parameters:
service -
eventType -
holder -
appData -
Throws:
VersionControlException
WTPropertyVetoException

ContentServiceEvent

public ContentServiceEvent(ContentServiceSvr service,
                           String eventType,
                           WTKeyedMap holderAppDataMap)
                    throws VersionControlException,
                           WTPropertyVetoException
Create a ContentServiceEvent using the input WTKeyedHashMap as a event target. The holderAppDataMap is used to maintain the relationship between content holder and its corresponding appDatas. In holderAppDataMap, the keys are content holder, the value is a WTSet of appData. You should not call getContentHolder() and getApplicationData() for this multiple object cases. Both of them will return null.

Supported API: false

Parameters:
service -
eventType -
holderAppDataMap -
Throws:
VersionControlException
WTPropertyVetoException
Method Detail

getContentHolder

public ContentHolder getContentHolder()
Gets the object for the association that plays role: theContentHolder.

Supported API: false

Returns:
ContentHolder

setContentHolder

public void setContentHolder(ContentHolder a_ContentHolder)
                      throws WTPropertyVetoException
Sets the object for the association that plays role: theContentHolder.

Supported API: false

Parameters:
a_ContentHolder -
Throws:
WTPropertyVetoException

theContentHolderValidate

private void theContentHolderValidate(ContentHolder a_ContentHolder)
                               throws WTPropertyVetoException
Parameters:
a_ContentHolder -
Throws:
WTPropertyVetoException

getApplicationData

public ApplicationData getApplicationData()
Gets the object for the association that plays role: theApplicationData.

Supported API: false

Returns:
ApplicationData

setApplicationData

public void setApplicationData(ApplicationData a_ApplicationData)
                        throws WTPropertyVetoException
Sets the object for the association that plays role: theApplicationData.

Supported API: false

Parameters:
a_ApplicationData -
Throws:
WTPropertyVetoException

theApplicationDataValidate

private void theApplicationDataValidate(ApplicationData a_ApplicationData)
                                 throws WTPropertyVetoException
Parameters:
a_ApplicationData -
Throws:
WTPropertyVetoException

getContentServiceSvr

public ContentServiceSvr getContentServiceSvr()
Gets the object for the association that plays role: theContentServiceSvr.

Supported API: false

Returns:
ContentServiceSvr

setContentServiceSvr

public void setContentServiceSvr(ContentServiceSvr a_ContentServiceSvr)
                          throws WTPropertyVetoException
Sets the object for the association that plays role: theContentServiceSvr.

Supported API: false

Parameters:
a_ContentServiceSvr -
Throws:
WTPropertyVetoException

theContentServiceSvrValidate

private void theContentServiceSvrValidate(ContentServiceSvr a_ContentServiceSvr)
                                   throws WTPropertyVetoException
Parameters:
a_ContentServiceSvr -
Throws:
WTPropertyVetoException

generateEventKey

public static String generateEventKey(String eventType)
Generates an event key from an event type.

Supported API: false

Parameters:
eventType -
Returns:
String

toSingleObjectEvents

public KeyedEvent[] toSingleObjectEvents()
                                  throws WTException


Supported API: false

Overrides:
toSingleObjectEvents in class KeyedEvent
Returns:
KeyedEvent[]
Throws:
WTException

toMultiObjectEvent

public KeyedEvent toMultiObjectEvent()


Supported API: false

Overrides:
toMultiObjectEvent in class KeyedEvent
Returns:
KeyedEvent