Class WebRepositoryClient

Top Previous Topic Next Topic  Print this topic

The WebRepositoryClient class represents an instance of an Ecrion Omni System Web Repository. Contains methods to manipulate different objects from the  Ecrion Omni Systemrepository.

 

Constructors

 

 

       public WebRepositoryClient ()

       public WebRepositoryClient (string endpointConfigurationName)

       public WebRepositoryClient (string endpointConfigurationName, string remoteAddress)

       public WebRepositoryClient (string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress)

       public WebRepositoryClient (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress)

 

 

Methods

 

Name

Description

GetAccessLevel

Returns the access level of the current user.

GetAccessTokenKey

Returns the access token key of the current user

CreateFolder

Method which creates a new folder in the repository.

DeleteFolder

Method which removes a folder from the repository, from a specified location.

GetFolders

Returns an array of folders existent in the Ecrion Omni System repository for a given path.

FolderExists

Indicates if a folder with a specified path exists in the repository.

GetFolderTags

Returns the tags associated with a specified folder.

SetFolderTags

Method which associates a series of tags to a specified folder.

GetFiles

Returns an array of files existent in the Ecrion Omni System repository for a given folder.

FileExists

Indicates if a file with a specified path exists in the repository

GetFileTags

Returns the tags associated with a specified file.

SetFileTags

Method which associates a series of tags to a specified file

GetFileContent

Returns the content of a specified file, as a string of bytes.

Commit

The method commits changes to a specified file.

AddFile

The method adds a file in the Ecrion Omni System repository.

DeleteFile

The method removes a specified file from the Ecrion Omni System repository.

AquireEditingLock

The method acquires an editing lock for a specified file.

ReleaseEditingLock

The method releases an editing lock from a specified file.

GetSnapshots

Returns the snapshots existent for a given path

GetFileVersions

Returns an array with the versions of a specified file.

GetFileDownloadLink

The methods returns a URL link of the file.

CreateEnvironment

This method creates an environment with a specified name.

DeleteEnvironment

Method which removes an environment with a specified name.

GetEnvironments

Returns an array of strings containing the names of the existing environments.

AddUser

Method which creates a new user in the Ecrion Omni System.

UpdateUser

Method which updates the data associated with a user which already exists in the Ecrion Omni System.

DeleteUser

This method removes the data associated with a user from the Ecrion Omni System.

GetUsers

Returns an array with the users existent in the Ecrion Omni System.

GetSystemTimeZones

Returns an array with all the time zones available on the local system.

AddUserGroup

Method which creates a new user group in the Ecrion Omni System.

UpdateUserGroup

Updates the data associated with a user group which already exists in the Ecrion Omni System.

DeleteUserGroup

Method which removes the data associated with a user group from the Ecrion Omni System.

GetUserGroups

Returns an array with the user groups existent in the Ecrion Omni System.

 

 

GetAccessLevel

 

Returns the access level of the current user.

 

 

       public String GetAccessLevel(LogIn logIn)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

 

 

 

GetAccessTokenKey

 

Returns the access token key of the current user.

 

 

       public String GetAccessTokenKey(LogIn logIn)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

 

 

 

CreateFolder

 

Method which creates a new folder in the repository.

 

 

       public void CreateFolder(LogIn logIn, String path, bool isProject)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies the path in the repository where the folder should be created

isProject

       - a Boolean value which specifies if the folder is a project or not.

 

 

 

DeleteFolder

 

Method which removes a folder from the repository, from a specified location.

 

 

       public void DeleteFolder(LogIn logIn, String path)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies the path in the repository from where the folder should be removed.

 

 

 

GetFolders

 

The GetFolders method returns an array of folders existent in the Ecrion Omni System repository for a given path. The folders returned by the GetFolder method are direct children of a root folder specified in the path parameter.

More details about the Folder class can be found here.

 

 

       public Folder[] GetFolders(LogIn logIn, String path)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

 

 

 

FolderExists

 

The FolderExists method returns a Boolean value which indicates if a folder with a specified path exists in the repository.

 

 

       public bool FolderExists(LogIn logIn, String path)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

 

 

 

GetFolderTags

 

The GetFolderTags method returns a Property array which contains the tags associated with the specified folder.

 

 

       public Property[] GetFolderTags(LogIn logIn, String path)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

 

 

 

SetFolderTags

 

The SetFolderTags method associates a series of tags to a specified folder. The tags are set through an array of type Property.

 

 

       public void SetFolderTags(LogIn logIn, String path, Property[] tags)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

tags

       - array of Property objects, used to define folder tags.

 

 

 

GetSnapshots

 

The GetSnapshots method retrieves the existing snapshots for a given path. The method returns an String array which contains the names of the snapshots.

 

 

       public String[] GetSnapshots(LogIn logIn, String path)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

 

 

 

GetFiles

 

The GetFiles method returns an array of files existent in the Ecrion Omni System repository for a given folder, specified in the path parameter. The method will not return files existent in sub folders of the current folder.

More details about the File class can be found here.

 

 

       public File[] GetFiles(LogIn logIn, String path)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

 

 

 

FileExists

 

The FileExists method returns a Boolean value which indicates if a file with a specified path exists in the repository.

 

 

       public bool FileExists(LogIn logIn, String path)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

 

 

 

GetFileTags

 

The GetFileTags method returns a Property array which contains the tags associated with the specified file.

 

 

       public Property[] GetFileTags(LogIn logIn, String path, String fileName, int version)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

version

       - integer value which specifies the version of document. The version value can be specified as -1, to retrieve the content of the last version of the document.

 

 

 

 

SetFileTags

 

The SetFileTags method associates a series of tags to a specified file. The tags are set through an array of type Property.

 

 

       public void SetFileTags(LogIn logIn, String path, String fileName, int version, Property[] tags)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the file.

version

       - integer value which specifies the version of the file.

tags

       - array of Property objects, used to define file tags.

 

 

 

GetFileContent

 

The GetFileContent method returns the content of a specified file, as a string of bytes.

 

 

       public byte[] GetFileContent(LogIn logIn, String path, String fileName, int version)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

version

       - integer value which specifies the version of document. The version value can be specified as -1, to retrieve the content of the last version of the document.

 

 

 

Commit

 

This method commits changes to a specified file. The user needs to acquire an editing lock on the file, before committing changes. The Commit method returns a File object, representing the status of the file after the changes have been committed.

 

 

       public File Commit(LogIn logIn, String path, String fileName, byte[] content, String comments)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

content

       - an array of bytes which contains the actual content of the file to be committed in the Ecrion Omni System repository.

comments

       - string which specifies comments to be associated with the file in the Ecrion Omni System repository.

 

 

 

AddFile

 

This method adds a file in the Ecrion Omni System repository. The AddFile method returns a File object, representing the status of the file after it has been added in the repository.

 

 

       public File AddFile(LogIn logIn, String path, String fileName, byte[] content, String comments)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

content

       - an array of bytes which contains the actual content of the file to be added in the Ecrion Omni System repository.

comments

       - string which specifies comments to be associated with the file in the Ecrion Omni System repository.

 

 

 

DeleteFile

 

This method removes a specified file from the Ecrion Omni System repository.

 

 

       public void DeleteFile(LogIn logIn, String path, String fileName)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

 

 

 

AquireEditingLock

 

The AquireEditingLock method locks a file, to be edited by the current user.

 

 

       public void AquireEditingLock(LogIn logIn, String path, String fileName)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

 

 

 

ReleaseEditingLock

 

This method releases the editing lock of a specified file.

 

 

       public void ReleaseEditingLock(LogIn logIn, String path, String fileName)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

 

 

GetFileVersions

 

The GetFileVersions method returns an array of integers, which contains the versions of the specified document.

 

 

       public int[] GetFileVersions(LogIn logIn, String path, String fileName)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

 

 

 

GetFileDownloadLink

 

The GetFileDownloadLink method returns URL link of the file.

 

 

       public String GetFileDownloadLink(LogIn logIn, String path, String fileName, int version)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System repository. The structure is described in detail here

path

       - string which specifies a path in the Ecrion Omni System repository.

fileName

       - string which specifies the name of the document in the Ecrion Omni System repository.

version

       - integer value which specifies the version of document. The version value can be specified as -1, to retrieve the content of the last version of the document.

 

 

 

CreateEnvironment

 

The CreateEnvironment method creates an environment with a specified name. The User returned by this method initially has name = admin and password = admin and can be used to access the newly created environment.

 

 

       public User CreateEnvironment(SysAdminLogIn logIn, String name)

 

 

Parameters

 

logIn

       - the login details of the system administrator which is trying to access the Ecrion Omni System repository. The structure is described in detail here

name

       - string which specifies the name of the environment to be created in the Ecrion Omni System.

 

 

 

DeleteEnvironment

 

The DeleteEnvironment method removes an environment with a specified name.

 

 

       public void DeleteEnvironment(SysAdminLogIn logIn, String name)

 

 

Parameters

 

logIn

       - the login details of the system administrator which is trying to access the Ecrion Omni System repository. The structure is described in detail here

name

       - string which specifies the name of the environment to be removed from the Ecrion Omni System.

 

 

 

 

GetEnvironments

 

The GetEnvironments method returns an array of strings containing the names of the existing environments.

 

 

       public String[] GetEnvironments(SysAdminLogIn logIn)

 

 

Parameters

 

logIn

       - the login details of the system administrator which is trying to access the Ecrion Omni System repository. The structure is described in detail here

 

 

 

 

AddUser

 

The AddUser method creates a new user in the Ecrion Omni System.

 

 

       public void AddUser(LogIn logIn, User user)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to add a new user. The structure is described in detail here

user

       - the details of the user which is to be added in the Ecrion Omni System. The structure is described in detail here

 

 

 

UpdateUser

 

The UpdateUser method updates the data associated with a user which already exists in the Ecrion Omni System.

 

 

       public void UpdateUser(LogIn logIn, User user)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to update a user's data. The structure is described in detail here

user

       - the details of the user which is to be updated in the Ecrion Omni System. The structure is described in detail here

 

 

 

DeleteUser

 

The DeleteUser method removes the data associated with a user from the Ecrion Omni System.

 

 

       public void DeleteUser(LogIn logIn, String username)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to remove a user. The structure is described in detail here

username

       - string representing the name of the user which will be removed from the Ecrion Omni System.

 

 

 

 

GetUsers

 

The GetUsers method returns an array with the users existent in the Ecrion Omni System. The User class is described in detail here.

 

 

       public User[] GetUsers(LogIn logIn)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to retrieve the users list. The structure is described in detail here

 

 

GetSystemTimeZones

 

The GetSystemTimeZones method returns an array with all the time zones available on the local system.

 

 

       public String[] GetSystemTimeZones(LogIn logIn)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to retrieve the users list. The structure is described in detail here

 

 

AddUserGroup

 

The AddUserGroup method creates a new user group in the Ecrion Omni System.

 

 

       public void AddUserGroup(LogIn logIn, UserGroup group)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to add a new user group. The structure is described in detail here

group

       - the details associated with the new user group which will be added to the Ecrion Omni System. The structure is described in detail here

 

 

 

 

UpdateUserGroup

 

The UpdateUserGroup method updates the data associated with a user group which already exists in the Ecrion Omni System.

 

 

       public void UpdateUserGroup(LogIn logIn, UserGroup group)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to update a user group's data. The structure is described in detail here

group

       - the details associated with the user group which will be updated in the Ecrion Omni System. The structure is described in detail here

 

 

 

 

DeleteUserGroup

 

The DeleteUserGroup method removes the data associated with a user group from the Ecrion Omni System.

 

 

       public void DeleteUserGroup(LogIn logIn, String groupName)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to remove a user. The structure is described in detail here

groupname

       - string representing the name of the user group which will be removed from the Ecrion Omni System.

 

 

 

 

GetUserGroups

 

The GetUserGroups method returns an array with the user groups existent in the Ecrion Omni System. The UserGroup class is described in detail here.

 

 

       public UserGroup[] GetUserGroups(LogIn logIn)

 

 

Parameters

 

logIn

       - the login details of the user which is trying to access the Ecrion Omni System to retrieve the users list. The structure is described in detail here