Class UserNumberMappingList
- Namespace
- SWConfigDataClientLib.Proxies.IppbxServer
- Assembly
- IpPbxCDSClientLib.dll
List that contains all user public number mappings. The list of mappings will be loaded from CDS and sorted locally. The class will use change interests to update the list. All public methods are thread safe.
public class UserNumberMappingList
- Inheritance
-
UserNumberMappingList
Constructors
UserNumberMappingList()
Standard Constructor. Initializes an empty list.
public UserNumberMappingList()
Methods
GetUserID(string, out bool, out NumberOwnerListPrimaryCollection)
Retrieves the UserID of the first mapping (prefix compare) with a number matching the given search number.
public int GetUserID(string strSearchNumber, out bool bAmbiguous, out NumberOwnerListPrimaryCollection NumberOwnerList)
Parameters
strSearchNumber
stringThe given searchnumber
bAmbiguous
boolTrue is there are more than one matching mappings.
NumberOwnerList
NumberOwnerListPrimaryCollectionReturns a list of matching user number entries. The NumberAccessGranted will set to true for all entries.
Returns
- int
The UserID of the first matching mapping. If no mappings matches the method will return 0.
Remarks
This method approaches an O(log n) operation.
GetUserID(string, out string, out string, out bool, out bool)
Retrieves the UserID of a the first mapping (prefix compare) with a number matching the given search number.
public int GetUserID(string strSearchNumber, out string strFoundPublicNumber, out string strFoundInternalNumber, out bool bIsMatchingNumberInternal, out bool bAmbiguous)
Parameters
strSearchNumber
stringThe given searchnumber
strFoundPublicNumber
stringThe public number of the first matching mapping.
strFoundInternalNumber
stringThe internal number of the first matching public number mapping.
bIsMatchingNumberInternal
boolbAmbiguous
boolTrue is there are more than one matching mappings.
Returns
- int
The UserID of the first matching mapping. If no mappings matches the method will return 0.
Remarks
This method approaches an O(log n) operation.
GetUserID(string, out string, out string, out bool, out bool, out bool)
Retrieves the UserID of a the first mapping (prefix compare) with a number matching the given search number.
public int GetUserID(string strSearchNumber, out string strFoundPublicNumber, out string strFoundInternalNumber, out bool bIsMatchingNumberInternal, out bool bAmbiguous, out bool bIsFaxNumber)
Parameters
strSearchNumber
stringThe given searchnumber
strFoundPublicNumber
stringThe public number of the first matching mapping.
strFoundInternalNumber
stringThe internal number of the first matching public number mapping.
bIsMatchingNumberInternal
boolbAmbiguous
boolTrue is there are more than one matching mappings.
bIsFaxNumber
boolTrue if number is a fax number.
Returns
- int
The UserID of the first matching mapping. If no mappings matches the method will return 0.
Remarks
This method approaches an O(log n) operation.
GetUserID(string, out string, out string, out bool, out bool, out bool, out bool)
Retrieves the UserID of a the first mapping (prefix compare) with a number matching the given search number.
public int GetUserID(string strSearchNumber, out string strFoundPublicNumber, out string strFoundInternalNumber, out bool bIsMatchingNumberInternal, out bool bAmbiguous, out bool bIsFaxNumber, out bool bIsCallAllowed)
Parameters
strSearchNumber
stringThe given searchnumber
strFoundPublicNumber
stringThe public number of the first matching mapping.
strFoundInternalNumber
stringThe internal number of the first matching public number mapping.
bIsMatchingNumberInternal
boolbAmbiguous
boolTrue is there are more than one matching mappings.
bIsFaxNumber
boolTrue if number is a fax number.
bIsCallAllowed
boolReturns true if user is allowed to call the relosved number
Returns
- int
The UserID of the first matching mapping. If no mappings matches the method will return 0.
Remarks
This method approaches an O(log n) operation.
Initialize(LibManager)
Initializes the list. The change interests will be subscribed and the mappings will be loaded from the CDS.
public void Initialize(LibManager libManager)
Parameters
libManager
LibManagerThe current LibManager.
Remarks
Call this method during start/activation of the IpPbxSrv
Reset()
Unsubscribes the change interest from the CDS and clears the list.
public void Reset()
Remarks
Call this during shutdown of the IpPbxSrv.