Class UserEnum
- Namespace
- SWConfigDataClientLib.Proxies.Users
- Assembly
- IpPbxCDSClientLib.dll
<CDSClientLib.EnumSummary>
public class UserEnum : UserEnumBase, SEnum
- Inheritance
-
SWCFProxy<UserEnumClient, IUserEnum>SWCFEnum<UserEnumClient, IUserEnum>UserEnum
- Implements
- Inherited Members
Constructors
UserEnum()
Constructor only for unmanaged wrapper
public UserEnum()
Fields
UserEnumTrace
protected static readonly STraceInfo UserEnumTrace
Field Value
- STraceInfo
Properties
PoolMaxSize
depcreated
public static int PoolMaxSize { get; set; }
Property Value
PoolMinSize
depcreated
public static int PoolMinSize { get; set; }
Property Value
m_BaseUrl
protected override string m_BaseUrl { get; }
Property Value
Methods
AddNtAccount(int, string)
public bool AddNtAccount(int userId, string ntAccount)
Parameters
Returns
AddUserToEnumByAutoLoginPhone(string)
Reads an user configration item from the database and adds it to the local enumeration. If the user configration item already exists in the local enumeration the old entry will be removed before the new one will be added. Any sortings of the local enumeration will be ignored.
public UserEntry AddUserToEnumByAutoLoginPhone(string AutoLoginPhone)
Parameters
AutoLoginPhone
stringThe sip username the user to be added.
Returns
AddUserToEnumByH323Alias(string, bool)
Reads an user configration item from the database and adds it to the local enumeration. If the user configration item already exists in the local enumeration the old entry will be removed before the new one will be added. Any sortings of the local enumeration will be ignored.
public UserEntry AddUserToEnumByH323Alias(string H323Alias, bool checkPermission)
Parameters
Returns
AddUserToEnumByLanPhonePin(string)
Reads an user configration item from the database and adds it to the local enumeration. If the user configration item already exists in the local enumeration the old entry will be removed before the new one will be added. Any sortings of the local enumeration will be ignored.
public UserEntry AddUserToEnumByLanPhonePin(string LanPhonePin)
Parameters
LanPhonePin
stringThe sip username the user to be added.
Returns
AddUserToEnumByNTAccount(string)
Reads one ore more user configration items from the database and adds it to the local enumeration. If a user configration item already exists in the local enumeration the old entry will be removed before the new one will be added. Any sortings of the local enumeration will be ignored.
public int[] AddUserToEnumByNTAccount(string ntAccount)
Parameters
ntAccount
stringThe sid of the user to be added.
Returns
- int[]
Returns array of UserIDs
AddUserToEnumByName(string)
Reads an user configration item from the database and adds it to the local enumeration. If the user configration item already exists in the local enumeration the old entry will be removed before the new one will be added. Any sortings of the local enumeration will be ignored.
public UserEntry AddUserToEnumByName(string userName)
Parameters
userName
stringThe name of the user to be added.
Returns
AddUserToEnumByUserID(int)
Reads an user configration item from the database and adds it to the local enumeration. If the user configration item already exists in the local enumeration, the old entry will be removed before the new one will be added. Any sortings of the local enumeration will be ignored.
public UserEntry AddUserToEnumByUserID(int UserID)
Parameters
UserID
intThe id of the user to be added.
Returns
AssignAddOnFeatureToUsers(Guid, List<int>)
public bool AssignAddOnFeatureToUsers(Guid featureId, List<int> userIds)
Parameters
Returns
AssignAddOnFeaturesForUser(int, Guid)
public bool AssignAddOnFeaturesForUser(int userId, Guid featureId)
Parameters
Returns
AutoAssignADOwners(SStringList)
Checks the existing user and NTAccount table for unique mappings between SwyxWare users and AD users. The AD user become owner of an IpPbx user if a unique mapping exists.
public void AutoAssignADOwners(SStringList Sids)
Parameters
Sids
SStringListList of AD users to be checked. If the list is empty, all found unique mappings be taken.
CheckAllUserFolders()
Checks the folder of all users. If necessary the of an user directoy will be created and the permissions will bet set.
public void CheckAllUserFolders()
CheckVersion()
public void CheckVersion()
Clear()
Removes all itmes and filters, DataSet on server will be removed also
public override void Clear()
Remarks
The items will not be deleted in database.
CreateClient(Binding, EndpointAddress)
protected override UserEnumClient CreateClient(Binding binding, EndpointAddress endpointAdrress)
Parameters
binding
BindingendpointAdrress
EndpointAddress
Returns
- UserEnumClient
CreateOrUpdateServiceUser(string, string, string, string)
public int CreateOrUpdateServiceUser(string loginName, string password, string serviceName, string host)
Parameters
Returns
CreateUserPasswordResetRequest(int)
public UserPasswordResetRequestResult CreateUserPasswordResetRequest(int userId)
Parameters
userId
int
Returns
- UserPasswordResetRequestResult
DeleteADOwner(int)
Deleted the ADOwner of the given User
public void DeleteADOwner(int UserID)
Parameters
UserID
intID of the user
DeleteSipCredentials(int)
public bool DeleteSipCredentials(int userId)
Parameters
userId
int
Returns
DeleteStaticPresharedKey(int)
Deletes the static PSK of the given IpPbxUser
public bool DeleteStaticPresharedKey(int UserID)
Parameters
UserID
intID of the user
Returns
- bool
True is successfull
Remarks
This method will change data in database.
DeleteTwoFactorAuthKey(int)
public bool DeleteTwoFactorAuthKey(int userId)
Parameters
userId
int
Returns
DeleteUserCredentials(int)
public bool DeleteUserCredentials(int userId)
Parameters
userId
int
Returns
DeleteUserEntry(int)
Deletes user
public void DeleteUserEntry(int UserID)
Parameters
UserID
intid of user
Remarks
This is a remote method.
Dispose()
<CDSClient.Enum.Dispose></CDSClient.Enum.Dispose>
public override void Dispose()
DoesThirdPartySipCredentialsExist()
DoesThirdPartySipCredentialsExist
public bool DoesThirdPartySipCredentialsExist()
Returns
ExecuteAutoLoginPhoneFilter(string)
Sets filter on user AutoLoginPhone creates and executes SQL query on user table in configuration database
public void ExecuteAutoLoginPhoneFilter(string AutoLoginPhone)
Parameters
AutoLoginPhone
string
Remarks
This is a remote method.
ExecuteFaxNumberOwnerFilter(OrderByList)
Executes filter on users for all users with one or more fax numbers creates and executes SQL query on user table in configuration database
public void ExecuteFaxNumberOwnerFilter(OrderByList orderByList)
Parameters
orderByList
OrderByList"order by" list for select on user table
Remarks
This is a remote method.
ExecuteGroupIDFilter(int, OrderByList)
Sets filter on user GroupID creates and executes SQL query on user table in configuration database
public void ExecuteGroupIDFilter(int GroupID, OrderByList orderByList)
Parameters
GroupID
intThe Group ID.
orderByList
OrderByListorder by list
Remarks
This is a remote method.
ExecuteH323Filter(string, bool)
Sets filter on user H323Alias creates and executes SQL query on user table in configuration database
public void ExecuteH323Filter(string h323AliasFilter, bool checkLoginPermissions)
Parameters
h323AliasFilter
stringfilter string with optional SQL LIKE wildcards.
checkLoginPermissions
boolif true returns only users with permission to login via H.323
Remarks
This is a remote method.
ExecuteIDFilter(int)
Executes filter on user name creates and executes SQL query on user table in configuration database
public void ExecuteIDFilter(int UserID)
Parameters
UserID
intId of the user
Remarks
This is a remote method.
ExecuteInternalNameFilter(string, OrderByList)
Sets filter on user internal name creates and executes SQL query on user table in configuration database
public void ExecuteInternalNameFilter(string internalNameFilter, OrderByList orderByList)
Parameters
internalNameFilter
stringfilter string with optional SQL LIKE wildcards.
orderByList
OrderByList"order by" list for select on user table
Remarks
This is a remote method.
ExecuteLanPhonePinFilter(string)
Sets filter on user LanPhonePin creates and executes SQL query on user table in configuration database
public void ExecuteLanPhonePinFilter(string lanPhonePin)
Parameters
lanPhonePin
string
Remarks
This is a remote method.
ExecuteLocationFilter(int, OrderByList)
Executes filter on users location. creates and executes SQL query on user table in configuration database
public void ExecuteLocationFilter(int LocationID, OrderByList orderByList)
Parameters
LocationID
intId of the users location
orderByList
OrderByList
Remarks
This is a remote method.
ExecuteLongestNumberFilter(string)
Sets filter on user by number including group memberships creates and executes SQL query on user table in configuration database
public void ExecuteLongestNumberFilter(string number)
Parameters
number
string
Remarks
This is a remote method.
ExecuteNTAccountFilter(string)
Sets filter on user NTAccontName creates and executes SQL query on user table in configuration database
public void ExecuteNTAccountFilter(string ntAccountName)
Parameters
ntAccountName
string
Remarks
This is a remote method.
ExecuteNameFilter(string, OrderByList)
Sets filter on user name creates and executes SQL query on user table in configuration database
public void ExecuteNameFilter(string nameFilter, OrderByList orderByList)
Parameters
nameFilter
stringfilter string with optional SQL LIKE wildcards.
orderByList
OrderByList"order by" list for select on user table
Remarks
This is a remote method.
ExecuteNameOrH323Filter(string)
Sets filter on user H323Alias or name creates and executes SQL query on user table in configuration database
public void ExecuteNameOrH323Filter(string szFilter)
Parameters
szFilter
stringfilter string with optional SQL LIKE wildcards.
Remarks
This is a remote method.
ExecuteProfileFilter(int, OrderByList)
Executes filter on users profile. creates and executes SQL query on user table in configuration database
public void ExecuteProfileFilter(int ProfileID, OrderByList orderByList)
Parameters
ProfileID
intId of the users profile
orderByList
OrderByList
Remarks
This is a remote method.
ExecuteVanityNumberNameFilter(string, OrderByList)
Sets filter on user name by using a vanity number creates and executes SQL query on user table in configuration database
public void ExecuteVanityNumberNameFilter(string vanityNameFilter, OrderByList orderByList)
Parameters
vanityNameFilter
stringfilter string with vanity numbers.
orderByList
OrderByList"order by" list for select on user table
Remarks
This is a remote method.
FreeForReuse()
public override void FreeForReuse()
GetADOwner(int)
Retrieves the current AD Owner of the given IpPbxUser
public string GetADOwner(int UserID)
Parameters
UserID
intID of the user
Returns
- string
SID / empty string if user is not owned by AD user
GetADUserAccountName(string)
public string GetADUserAccountName(string sid)
Parameters
sid
string
Returns
GetADUserSid(string)
public string GetADUserSid(string samAccountName)
Parameters
samAccountName
string
Returns
GetADUserSids(string)
public IList<string> GetADUserSids(string suggestion)
Parameters
suggestion
string
Returns
GetAssignedUserCounts(SIntList)
This method returns the count of assigned users for each specified profile
public SIntList GetAssignedUserCounts(SIntList FeatureIDs)
Parameters
FeatureIDs
SIntListList of FeatureProfileIDs
Returns
- SIntList
List of usage counts
GetCurrentAddOnFeaturesForUser(int)
public List<Feature> GetCurrentAddOnFeaturesForUser(int userId)
Parameters
userId
int
Returns
- List<Feature>
GetCurrentUserID()
public int GetCurrentUserID()
Returns
GetCurrentUserName()
public string GetCurrentUserName()
Returns
GetCustomExistingEntry(TUserEntry)
protected override UserEntry GetCustomExistingEntry(TUserEnum.TUserEntry tEntry)
Parameters
tEntry
TUserEnum.TUserEntry
Returns
Remarks
Thread Safety: safe
GetInternalNumbersWithOwnersView()
Retrieves a view including all internal numbers with additional owner information (Can be user or group) and a list (string) with all public numbers. This method is intended to be used in substitution number configuration.
public InternalNumbersWithOwnersViewPrimaryCollection GetInternalNumbersWithOwnersView()
Returns
- InternalNumbersWithOwnersViewPrimaryCollection
Collection of internal numbers with mapped public numbers and owners (user or group)
GetIntrusionInfo(int)
public ICollection<CallIntrusionInfo> GetIntrusionInfo(int userId)
Parameters
userId
int
Returns
- ICollection<CallIntrusionInfo>
GetIntrusionNumbers(int)
public ICollection<string> GetIntrusionNumbers(int userId)
Parameters
userId
int
Returns
GetLocalSiteID()
Returns the local site id of this site
public int GetLocalSiteID()
Returns
GetNtAccounts(int)
public string[] GetNtAccounts(int userId)
Parameters
userId
int
Returns
- string[]
GetPossibleAddOnFeaturesForUser(int)
public List<Feature> GetPossibleAddOnFeaturesForUser(int userId)
Parameters
userId
int
Returns
- List<Feature>
GetPossibleIpPbxUserNames()
Returns all possible IpPbx User Names of the current user. Can be more than one if the current user is a windows user and multiple IppPbxUser are assigned to his windows account.
public SStringList GetPossibleIpPbxUserNames()
Returns
- SStringList
StringList
GetPublicNumbersWithOwnersView()
Retrieves a view including all public numbers with additional owner information (Can be user or group). This method is intended to be used in substitution number configuration.
public PublicNumbersWithOwnersViewPrimaryCollection GetPublicNumbersWithOwnersView()
Returns
- PublicNumbersWithOwnersViewPrimaryCollection
Collection of public numbers with mapped internal numbers and owners (user or group)
GetServerRequestTimeout(UserEnumClient)
protected override TimeSpan GetServerRequestTimeout(UserEnumClient client)
Parameters
client
UserEnumClient
Returns
GetSipCredentials()
Gets all stored sip credentials
public ICollection<UserSipCredentials> GetSipCredentials()
Returns
- ICollection<UserSipCredentials>
Collection of all sip credentials
GetSipCredentials(int)
Gets all sip credentials of a specific user
public UserSipCredentials GetSipCredentials(int userId)
Parameters
userId
int
Returns
GetSipCredentialsBySipUserId(string)
Gets all sip credentials of a specific user
public UserSipCredentials GetSipCredentialsBySipUserId(string sipUserId)
Parameters
sipUserId
string
Returns
GetSituations(UserEntry)
retrieve user defined situations into database
public UserSituationEntryCollection GetSituations(UserEntry userEntry)
Parameters
userEntry
UserEntry
Returns
- UserSituationEntryCollection
Collection of UserSituatuions
Remarks
This is a remote method.
Exceptions
- UserDbException
On database failure
GetStaticPresharedKey(int)
Retrieves the current static PSK of the given IpPbxUser
public string GetStaticPresharedKey(int UserID)
Parameters
UserID
intID of the user
Returns
- string
PSK string will be empty id no static PSK is avaiable
GetSupportedClientVersions()
public SStringList GetSupportedClientVersions()
Returns
GetUser(int, bool)
public UserEntry GetUser(int UserId, bool forUpdate)
Parameters
Returns
GetUserCredentials(int)
public UserCredentialsInfo GetUserCredentials(int userId)
Parameters
userId
int
Returns
- UserCredentialsInfo
GetUserIDByADOwner(string, SStringList)
Retrieves an owned IppbxUser by a given AD user.
public int GetUserIDByADOwner(string Sid, SStringList OldSids)
Parameters
Sid
stringThe SID of the AD user
OldSids
SStringListList of old SIDs ot the user.
Returns
- int
UserID of the found users, 0 if no user found.
Remarks
If the user is found by oldSID the owner sid will be updated to paramter Sid implicitly.
GetUserInfoFromAdministrators()
Get list of all visible administrative accounts
public ICollection<UserInfo> GetUserInfoFromAdministrators()
Returns
- ICollection<UserInfo>
list of user information
GetUserLocationId(int)
public int GetUserLocationId(int userId)
Parameters
userId
int
Returns
GetUserMINs(int)
Retrieves the list of MobileIdentificationNumbers (MINs) for the current user.
public SStringList GetUserMINs(int UserID)
Parameters
UserID
intUser sepecified by ID
Returns
- SStringList
StringList
GetUsersWithAddOnFeature(Guid)
public List<int> GetUsersWithAddOnFeature(Guid featureId)
Parameters
featureId
Guid
Returns
HasRole(BuildInRoles)
public bool HasRole(BuildInRoles eRole)
Parameters
eRole
BuildInRoles
Returns
IsUserId(int)
public bool IsUserId(int userId)
Parameters
userId
int
Returns
LockUser(int, bool)
public void LockUser(int userID, bool value)
Parameters
PingService(UserEnumClient)
protected override void PingService(UserEnumClient client)
Parameters
client
UserEnumClient
ReadNextBlock(int)
Creates and executes SQL query on user table in configuration database if first invokation for filter. Adds the item rows to enumeration.
public int ReadNextBlock(int MaxRowsToRead)
Parameters
MaxRowsToRead
intMax Rows To read
Returns
- int
Item rows read.
Remarks
This is a remote method.
RemoveAllThirdPartySipCredentials()
Removes all third party sip credentials.
public void RemoveAllThirdPartySipCredentials()
RemoveNtAccounts(int)
public bool RemoveNtAccounts(int userId)
Parameters
userId
int
Returns
ResetUserCredentials(int)
public string ResetUserCredentials(int userId)
Parameters
userId
int
Returns
RetainAddOnFeaturesForUser(int, List<Guid>)
public int RetainAddOnFeaturesForUser(int userId, List<Guid> featureIds)
Parameters
Returns
RevokeAllRefreshToken()
public void RevokeAllRefreshToken()
RevokeRefreshToken(int)
public void RevokeRefreshToken(int userId)
Parameters
userId
int
SetADOwner(int, string)
Sets the ADOwner of an IpPbxUser.
public void SetADOwner(int UserID, string Sid)
Parameters
SetFaxNumberOwnerFilter(OrderByList)
Sets the filter on users for all users with one or more fax numbers Does not execute the Query. To Exceute the Query use ReadNextBlock method.
public void SetFaxNumberOwnerFilter(OrderByList orderByList)
Parameters
orderByList
OrderByList"order by" list for select on user table
SetInternalNameFilter(string, OrderByList)
Sets filter on user internal name Does not execute the Query. To Exceute the Query use ReadNextBlock method.
public void SetInternalNameFilter(string internalNameFilter, OrderByList orderByList)
Parameters
internalNameFilter
stringfilter string with optional SQL LIKE wildcards.
orderByList
OrderByList"order by" list for select on user table
SetNameFilter(string, OrderByList)
Sets filter on user name Does not execute the Query. To Exceute the Query use ReadNextBlock method.
public void SetNameFilter(string nameFilter, OrderByList orderByList)
Parameters
nameFilter
stringfilter string with optional SQL LIKE wildcards.
orderByList
OrderByList"order by" list for select on user table
SetSipCredentials(int, string, string, string)
Set or add sip credentials to the database
public void SetSipCredentials(int userId, string sipUserId, string sipUserName, string sipPassword)
Parameters
SetSituations(UserEntry, UserSituationEntryCollection)
save user defined situations into database
public void SetSituations(UserEntry userEntry, UserSituationEntryCollection userSituations)
Parameters
userEntry
UserEntryuserSituations
UserSituationEntryCollectionCollection of UserSituatuions
Remarks
This writes the situations into the database. No Update(true) required.
Exceptions
- UserDbException
On database failure
SetStaticPresharedKey(int, string)
Sets the static PSK of the given IpPbxUser
public void SetStaticPresharedKey(int UserID, string PSK)
Parameters
Remarks
This method will change data in database.
SetUserCredentials(int, string, string, bool)
public UserPasswordSetResult SetUserCredentials(int userId, string login, string password, bool userHasToChangePassword)
Parameters
Returns
- UserPasswordSetResult
SetUserCredentialsExpired(int, bool)
public bool SetUserCredentialsExpired(int userId, bool value)
Parameters
Returns
SetUserCredentialsLogin(int, string)
public bool SetUserCredentialsLogin(int userId, string login)
Parameters
Returns
SetUserMINs(int, SStringList)
Sets the list of mobile idtenification numbers (MINs) for the given user.
public void SetUserMINs(int UserID, SStringList MINs)
Parameters
UserID
intUser sepecified by ID
MINs
SStringListList of MINs
SetVanityNumberNameFilter(string, OrderByList)
Sets filter on user name Does not execute the Query. To Exceute the Query use ReadNextBlock method.
public void SetVanityNumberNameFilter(string vanityNameFilter, OrderByList orderByList)
Parameters
vanityNameFilter
stringfilter string with vanity numbers.
orderByList
OrderByList"order by" list for select on user table
Update()
Make all changes peristent. This Methods inserts, deletes and updates items in the database
public override void Update()
Remarks
Thread Safety: safe