Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.activities.VCSActivity Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.activities.VCSActivity:
de.fu_berlin.inf.dpp.activities.AbstractResourceActivity 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 Types

enum  Type { CONNECT, DISCONNECT, SWITCH, UPDATE }

Public Member Functions

 VCSActivity (User source, Type type, SPath path, String url, String directory, String param1)
void dispatch (IActivityReceiver receiver)
Type getType ()
String getParam1 ()
String getURL ()
String getDirectory ()
boolean includes (IResourceActivity otherActivity)
String toString ()
int hashCode ()
boolean equals (Object obj)

Static Public Member Functions

static VCSActivity connect (ISarosSession sarosSession, IProject project, String url, String directory, String providerID)
static VCSActivity disconnect (ISarosSession sarosSession, IProject project, boolean deleteContents)
static VCSActivity update (ISarosSession sarosSession, IResource resource, String revision)
static VCSActivity switch_ (ISarosSession sarosSession, IResource resource, String url, String revision)

Public Attributes

Vector< IResourceActivitycontainedActivity = new Vector<IResourceActivity>()

Protected Attributes

String param1
String url
String directory
Type type

Detailed Description

Activity for VCS operations like Switch, Update.


Member Enumeration Documentation

Enumerator:
CONNECT 

Supported arguments:
path: The path of the project to be connected.
url: The repository root URL.
directory: The path of the target dir relative to the repository root.
param1: The provider ID.

DISCONNECT 

path: The path of the project to be disconnected.
Supported arguments:
param1: If !=null, delete contents.

SWITCH 

Supported arguments:
path: The path of the resource in the working directory.
url: The URL of the target resource in the repo.
param1: The revision of the target resource.

UPDATE 

Supported arguments:
path: The path of the resource in the working directory.
param1: The revision of the target resource.


Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.activities.VCSActivity.VCSActivity ( User  source,
Type  type,
SPath  path,
String  url,
String  directory,
String  param1 
)
Parameters:
source
typeRepresents the VCS action that takes place
pathThe path of the resource in the working directory
urlThe repository root url (for Type#CONNECT);
the url of the target resource (for Type#SWITCH);
null otherwise.
directoryThe path of the target directory relative to the root (for Type#CONNECT);
null otherwise.
param1The provider id (for Type#CONNECT);
the revision of the target resource (for Type#SWITCH and Type#UPDATE);
the marker whether to delete the contents (delete if (param1 != null), for Type#DISCONNECT ).

Member Function Documentation

static VCSActivity de.fu_berlin.inf.dpp.activities.VCSActivity.connect ( ISarosSession  sarosSession,
IProject  project,
String  url,
String  directory,
String  providerID 
) [static]
static VCSActivity de.fu_berlin.inf.dpp.activities.VCSActivity.disconnect ( ISarosSession  sarosSession,
IProject  project,
boolean  deleteContents 
) [static]
void de.fu_berlin.inf.dpp.activities.VCSActivity.dispatch ( IActivityReceiver  receiver)
boolean de.fu_berlin.inf.dpp.activities.VCSActivity.equals ( Object  obj)
String de.fu_berlin.inf.dpp.activities.VCSActivity.getDirectory ( )

The path of the target directory relative to the repository root

Returns:
for Type#CONNECT: part of the URL, path relative to getURL();
null otherwise.
String de.fu_berlin.inf.dpp.activities.VCSActivity.getParam1 ( )

Various purposes depending on getType()

Returns:
The provider id (for Type#CONNECT);
the revision of the target resource (for Type#SWITCH and Type#UPDATE);
the marker whether to delete the contents (delete if (param1 != null), for Type#DISCONNECT ).
Type de.fu_berlin.inf.dpp.activities.VCSActivity.getType ( )

Represents the VCS action that takes place

String de.fu_berlin.inf.dpp.activities.VCSActivity.getURL ( )

The repository url (or part of it), depends on getType()

Returns:
The repository root url (for Type#CONNECT), see getDirectory() for the rest of the full path;
the url of the target resource (for Type#SWITCH);
null otherwise.
int de.fu_berlin.inf.dpp.activities.VCSActivity.hashCode ( )
boolean de.fu_berlin.inf.dpp.activities.VCSActivity.includes ( IResourceActivity  otherActivity)

Returns true if executing this activity would implicitly execute the otherActivity. In other words, if executing otherActivity after this one would be a null operation.
Currently this method only checks type and path, not URL and revision.

static VCSActivity de.fu_berlin.inf.dpp.activities.VCSActivity.switch_ ( ISarosSession  sarosSession,
IResource  resource,
String  url,
String  revision 
) [static]
String de.fu_berlin.inf.dpp.activities.VCSActivity.toString ( )
static VCSActivity de.fu_berlin.inf.dpp.activities.VCSActivity.update ( ISarosSession  sarosSession,
IResource  resource,
String  revision 
) [static]

Member Data Documentation

 All Classes Namespaces Files Functions Variables Enumerations