Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.activities.RecoveryFileActivity Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.activities.RecoveryFileActivity:
de.fu_berlin.inf.dpp.activities.FileActivity de.fu_berlin.inf.dpp.activities.ITargetedActivity de.fu_berlin.inf.dpp.activities.AbstractResourceActivity de.fu_berlin.inf.dpp.activities.IActivity de.fu_berlin.inf.dpp.activities.AbstractActivity de.fu_berlin.inf.dpp.activities.IResourceActivity de.fu_berlin.inf.dpp.activities.IActivity de.fu_berlin.inf.dpp.activities.IActivity

List of all members.

Public Member Functions

 RecoveryFileActivity (User source, User target, Type type, SPath newPath, SPath oldPath, byte[] data, String encoding)
boolean isValid ()
User getTarget ()
String toString ()

Static Public Member Functions

static RecoveryFileActivity created (User source, SPath path, byte[] content, User target, String encoding)
static RecoveryFileActivity removed (User source, SPath path, User target, String encoding)

Detailed Description

Subclass of FileActivity that is used during the Recovery-Process and allows the specification of targets. This Activity will be sent from the host to the client that requested the recovery.

TODO This class should be removed once the ITargetedActivities are gone since it is only intended as a separation between FileActivities that are sent to a singleUser and those are sent to every User


Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.activities.RecoveryFileActivity.RecoveryFileActivity ( User  source,
User  target,
Type  type,
SPath  newPath,
SPath  oldPath,
byte[]  data,
String  encoding 
)

Member Function Documentation

static RecoveryFileActivity de.fu_berlin.inf.dpp.activities.RecoveryFileActivity.created ( User  source,
SPath  path,
byte[]  content,
User  target,
String  encoding 
) [static]

Utility method for creating a RecoveryFileActivity of type FileActivity.Type#CREATED for a given path.

This method will call the created()-method of the FileActivity. This Method is used if the host has the file to be recovered.

Parameters:
sourceThe User that has created this Activity.
pathThe SPath of the affected resource.
contentcontent of the file denoted by the path
targetThe User this Activity will be send to.
User de.fu_berlin.inf.dpp.activities.RecoveryFileActivity.getTarget ( )
Returns:
the users that should receive this activity

Implements de.fu_berlin.inf.dpp.activities.ITargetedActivity.

boolean de.fu_berlin.inf.dpp.activities.RecoveryFileActivity.isValid ( )
static RecoveryFileActivity de.fu_berlin.inf.dpp.activities.RecoveryFileActivity.removed ( User  source,
SPath  path,
User  target,
String  encoding 
) [static]

Utility method for creating a RecoveryFileActivity of type FileActivity.Type#REMOVED for a given path.

This method will call the removed()-method of the FileActivity. This Method is used if the file to be recovered doesn't exist on the host.

Parameters:
sourceThe User that has created this Activity.
pathThe SPath of the affected resource.
targetThe User this Activity will be send to.
encodingthe encoding the content is encoded with or null
String de.fu_berlin.inf.dpp.activities.RecoveryFileActivity.toString ( )
 All Classes Namespaces Files Functions Variables Enumerations