C# Class Dev2.Workspaces.WorkspaceRepository

A workspace repository.
Inheritance: IWorkspaceRepository
Show file Open project: Warewolf-ESB/Warewolf Class Usage Examples

Public Properties

Property Type Description
ServerWorkspaceID System.Guid
ServerWorkspacePath string

Public Methods

Method Description
Delete ( IWorkspace workspace ) : void

Deletes the specified workspace from storage.

Get ( System.Guid workspaceID, bool force = false, bool loadResources = true ) : IWorkspace

Gets the IWorkspace with the specified ID from storage if it does not exist in the repository.

GetLatest ( IWorkspace workspace, IList servicesToIgnore ) : void

Overwrites this workspace with the server versions except for those provided.

GetWorkspaceGuids ( ) : ICollection
GetWorkspaceID ( System.Security.Principal.WindowsIdentity identity ) : System.Guid
RefreshWorkspaces ( ) : void

Refreshes all workspaces from storage.

Save ( IWorkspace workspace ) : void

Saves the specified workspace to storage.

WorkspaceRepository ( ) : System
WorkspaceRepository ( IResourceCatalog resourceCatalog ) : System

Private Methods

Method Description
Delete ( System.Guid workspaceID ) : void
GetFileName ( System.Guid workspaceID ) : string
GetUserMapFileName ( ) : string
Read ( System.Guid workdspaceID ) : IWorkspace
ReadUserMap ( ) : Guid>.ConcurrentDictionary
Write ( IWorkspace workspace ) : void
WriteUserMap ( Guid>.ConcurrentDictionary userMap ) : void

Method Details

Delete() public method

Deletes the specified workspace from storage.
public Delete ( IWorkspace workspace ) : void
workspace IWorkspace The workspace to be deleted.
return void

Get() public method

Gets the IWorkspace with the specified ID from storage if it does not exist in the repository.
public Get ( System.Guid workspaceID, bool force = false, bool loadResources = true ) : IWorkspace
workspaceID System.Guid The workdspace ID to be queried.
force bool true if the workspace should be re-read even it is found; false otherwise.
loadResources bool true if resources should be loaded; false otherwise.
return IWorkspace

GetLatest() public method

Overwrites this workspace with the server versions except for those provided.
public GetLatest ( IWorkspace workspace, IList servicesToIgnore ) : void
workspace IWorkspace The workspace to be queried.
servicesToIgnore IList The services being to be ignored.
return void

GetWorkspaceGuids() public method

public GetWorkspaceGuids ( ) : ICollection
return ICollection

GetWorkspaceID() public method

public GetWorkspaceID ( System.Security.Principal.WindowsIdentity identity ) : System.Guid
identity System.Security.Principal.WindowsIdentity
return System.Guid

RefreshWorkspaces() public method

Refreshes all workspaces from storage.
public RefreshWorkspaces ( ) : void
return void

Save() public method

Saves the specified workspace to storage.
public Save ( IWorkspace workspace ) : void
workspace IWorkspace The workspace to be saved.
return void

WorkspaceRepository() public method

public WorkspaceRepository ( ) : System
return System

WorkspaceRepository() public method

public WorkspaceRepository ( IResourceCatalog resourceCatalog ) : System
resourceCatalog IResourceCatalog
return System

Property Details

ServerWorkspaceID public static property

The server workspace ID.
public static Guid,System ServerWorkspaceID
return System.Guid

ServerWorkspacePath public static property

public static string ServerWorkspacePath
return string