ICIWorkspace

The ICIWorkspace properties and methods are used to retrieve and to create a Workspace.

  • Function AddParticipant(bstrName As String) As Object

  • HRESULT AddParticipant([in] BSTR bstrName, [out, retval];

    EFT v7.1 and later

  • Property ExpireTime As Date (read only)

  • HRESULT ExpireTime([out, retval] DATE* pVal);

    EFT v7.2.1

  • Function GetParticipantPermissions(bstrName As String) As Object

  • HRESULT GetParticipantPermissions([in] BSTR bstrName, [out, retval] IDispatch** ppdisplPermissions);

    EFT v7.1 and later

  • Property Name As String

  • HRESULT Name([out, retval] BSTR *pVal);

    EFT v7.1 and later

  • Property Owner As String

  • HRESULT Owner([out, retval] BSTR *pVal);

    EFT v7.1 and later

  • Property ParticipantList As Variant

  • HRESULT ParticipantList([out, retval] VARIANT* pVal);

    EFT v7.1 and later

    • Property Path As String

    HRESULT Path([out, retval] BSTR *pVal);

    EFT v7.1 and later

  • Function RemoveParticipant(bstrName As String) As Object

  • HRESULT RemoveParticipant([in] BSTR bstrName, [out, retval]  

    EFT v7.1 and later

  • Sub SetParticipantPermissions(bstrName As String, ppdisplPermissions As Object)

  • HRESULT SetParticipantPermissions([in] BSTR bstrName, [in] IDispatch* ppdisplPermissions);

    EFT v7.1 and later

  • Property TimeCreated As String

  • HRESULT TimeCreated([out, retval] BSTR *pVal);

    EFT v7.1 and later

Workspace Examples, VBScript script fragments:

  1. Getting a Workspace object and printing its information:

  2. guid = site.GetWorkspaceGUID("/Usr/testuser/share")
    Set ws = site.GetWorkspace(guid)
    WScript.Echo vbCrLf
    WScript.Echo "Workspace name: " & ws.Name & vbCrLf
    WScript.Echo "Workspace path: " & ws.Path & vbCrLf
    WScript.Echo "Workspace Owner: " & ws.Owner & vbCrLf
    WScript.Echo "Workspace TimeCreated: " & ws.TimeCreated & vbCrLf
    WScript.Echo "Workspace ParticipantList: "
    Dim arList : arList = ws.ParticipantList
    for i = LBound(arList) to UBound(arList)
    WScript.Echo CStr(i) & " - " & arList(i)
    next
  3. A function that removes all participants from a workspace (make sure to call SetWorkspace after calling this function):

  4. Function RemoveParticipants (ws)
         Dim arList : arList = ws.ParticipantList
    for i = LBound(arList) to UBound(arList)
               WScript.Echo CStr(i) & " - Deleting " & arList(i)
               ws.RemoveParticipant(arList(i))
         next
    End Function
  5. Changing a user’s permissions:

  6. Set perm = ws.GetParticipantPermissions("user")
    
    WScript.Echo "Permissions for user" & vbCrLf
    WScript.Echo "DownloadFile: " & perm.DownloadFile & vbCrLf
    WScript.Echo "UploadFile: " & perm.UploadFile & vbCrLf
    WScript.Echo "DeleteFile: " & perm.DeleteFile & vbCrLf
    WScript.Echo "RenameFileFolder: " & perm.RenameFileFolder & vbCrLf
    WScript.Echo "CreateFolder: " & perm.CreateFolder & vbCrLf
    WScript.Echo "DeleteFolder: " & perm.DeleteFolder & vbCrLf
    
    ' Change permissions
    perm.DownloadFile = true
    perm.UploadFile = true
    perm.DeleteFile = true
    perm.RenameFileFolder = true
    perm.CreateFolder = true
    perm.DeleteFolder = true
    
    ' Set permissions
    ws.SetParticipantPermissions "user", perm
    
    ' Set workspace
    site.SetWorkspace guid, ws