org.xcmis.spi.model
Class ChangeEvent

java.lang.Object
  extended by org.xcmis.spi.model.ChangeEvent

public final class ChangeEvent
extends Object

Representation of a single action that occurred to an object. Each ChangeEvent must contains following information:

And may provide optional information about: NOTE The ChangeEvent is just holder for information about changes. It does not validate supplied information about changes in any kind.

Version:
$Id: ChangeEvent.java 316 2010-03-09 15:20:28Z andrew00x $
Author:
Andrey Parfonov
See Also:
RepositoryCapabilities.getCapabilityChanges()

Constructor Summary
ChangeEvent(String logToken, String objectId, ChangeType changeType, Calendar date)
           
ChangeEvent(String logToken, String objectId, ChangeType changeType, Calendar date, List<Property<?>> properties)
          Deprecated.  
ChangeEvent(String logToken, String objectId, ChangeType changeType, Calendar date, List<Property<?>> properties, Set<String> policiesId, List<AccessControlEntry> acl)
          Create change event.
 
Method Summary
 List<AccessControlEntry> getAcl()
          For event of changeType "security" may return ACLs applied to the object referenced in the change event.
 Calendar getDate()
          Time of change to the object.
 String getLogToken()
          Get change log token.
 String getObjectId()
           
 Set<String> getPolicyIds()
          For event of changeType "security" may return ids of policies applied to the object referenced in the change event.
 List<Property<?>> getProperties()
          For events of changeType "updated", list may optionally include the new values of properties on the object.
 ChangeType getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeEvent

public ChangeEvent(String logToken,
                   String objectId,
                   ChangeType changeType,
                   Calendar date)

ChangeEvent

public ChangeEvent(String logToken,
                   String objectId,
                   ChangeType changeType,
                   Calendar date,
                   List<Property<?>> properties)
Deprecated. 

Create change event.

Parameters:
logToken - unique token for this event. Each event can be retrieved by this token
objectId - id of object to which the change occurred
changeType - type of changes
date - date when changes occurs
properties - properties which were updated for object. Typically, this parameter should be provided ONLY when changes type is "updated". NOTE This implementation does not validate it
See Also:
ChangeType

ChangeEvent

public ChangeEvent(String logToken,
                   String objectId,
                   ChangeType changeType,
                   Calendar date,
                   List<Property<?>> properties,
                   Set<String> policiesId,
                   List<AccessControlEntry> acl)
Create change event.

Parameters:
logToken - unique token for this event. Each event can be retrieved by this token
objectId - id of object to which the change occurred
changeType - type of changes
date - date when changes occurs
properties - properties which were updated for object. Typically, this parameter should be provided ONLY when changes type is "updated". NOTE This implementation does not validate it
policiesId - set of ids of policies applied to the object referenced in the change event. Typically, this parameter should NOT be provided if changes type is other then "security" or parameter acl is provided. In other worlds typically expect policiesId or acl but not both. NOTE This implementation does not validate it
acl - ACLs applied to the object referenced in the change event. Typically, this parameter should NOT be provided if changes type is other then "security" or parameter policiesId is provided. In other worlds typically expect acl or policiesId but not both. NOTE This implementation does not validate it
See Also:
ChangeType
Method Detail

getLogToken

public String getLogToken()
Get change log token. It is unique identifier of change.

Returns:
change log token

getObjectId

public String getObjectId()
Returns:
id of changed object

getType

public ChangeType getType()
Returns:
type of changes
See Also:
ChangeType

getDate

public Calendar getDate()
Time of change to the object.

Returns:
time of change or null if this info is unavailable

getProperties

public List<Property<?>> getProperties()
For events of changeType "updated", list may optionally include the new values of properties on the object.

Returns:
updated properties or null

getPolicyIds

public Set<String> getPolicyIds()
For event of changeType "security" may return ids of policies applied to the object referenced in the change event.

Returns:
set of policies' ids or null

getAcl

public List<AccessControlEntry> getAcl()
For event of changeType "security" may return ACLs applied to the object referenced in the change event.

Returns:
ACLs or null


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.