C# Класс Org.IdentityConnectors.ActiveDirectory.ActiveDirectoryUtils

Collection of Active directory utilities. Some are static methods, other require configuration, so they are instance methods.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ActiveDirectoryUtils ( ActiveDirectoryConfiguration configuration ) : System

Constructor

ComToIcfException ( System.DirectoryServices.DirectoryServicesCOMException originalException, String message ) : Exception

Converts a DirectoryServicesCOMException into more meaningful ICF exception (e.g. AlreadyExistsException).

ConvertADGUIDtoObjectGUID ( string uid ) : string
ConvertUIDBytesToSearchString ( Byte guidBytes ) : String

Converts a guid in byte array form to a string suitable for ldap search.

ConvertUIDToSearchString ( Uid uid ) : String
GetCnValueUnescaped ( String nameValue ) : String
GetDomainControllerName ( ActiveDirectoryConfiguration configuration ) : string
GetNameAsCN ( String nameValue ) : String

Returns the leaf value of a distinguished name

GetRelativeName ( Name name ) : String
GetSecureString ( String stringToSecure ) : SecureString
NormalizeLdapString ( String ldapString ) : String

Puts an ldap string into a normalilzed format

OtherComToIcfException ( System originalException, String message ) : Exception

Converts a System.Runtime.InteropServices.COMException into more meaningful ICF exception (e.g. AlreadyExistsException).

RandomStr ( ) : string

Приватные методы

Метод Описание
AddConnectorAttributeToADProperties ( ObjectClass oclass, System.DirectoryServices.DirectoryEntry directoryEntry, ConnectorAttribute attribute, UpdateType type ) : void
ConvertBytesToADSpecialString ( string attribute, Byte bytes ) : String
ConvertSIDBytesToGUIDString ( Byte sidBytes ) : String
ConvertUIDBytesToGUIDString ( Byte guidBytes ) : String

Converts a guid in byte array form to a string with the format >GUID = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx< where the x's represent uppercase hexadecimal digits

GetADObjectClass ( ObjectClass oclass ) : String

Returns the AD ObjectClass associated with a particular Connector ObjectClass

GetADSchema ( ) : System.DirectoryServices.ActiveDirectory.ActiveDirectorySchema
GetConnectorAttributeFromADEntry ( ObjectClass oclass, String attributeName, System.DirectoryServices searchResult, System.DirectoryServices.DirectoryEntry entry ) : ConnectorAttribute
GetDirectoryEntryFromUid ( String serverName, Uid uid, string adminUserName, string adminPassword ) : System.DirectoryServices.DirectoryEntry

Finds a DirectoryEntry by it's uid

GetDnFromPath ( string fullPath ) : string
GetDomainController ( ActiveDirectoryConfiguration configuration ) : System.DirectoryServices.ActiveDirectory.DomainController
GetFullPath ( string provider, string serverName, string path ) : String

Returns a path string in the format: provider://servernameIfSpecified/path

GetGCPath ( string serverName, string path ) : String

Returns a path string in the format: GC://servernameIfSpecified/path

GetLDAPPath ( string serverName, string path ) : String

Returns an ldap path in the form of: LDAP://servernameIfSpecified/path

GetLargeIntegerFromLong ( System.Int64 int64Value ) : LargeInteger
GetLongFromLargeInteger ( LargeInteger largeInteger ) : ulong
GetParentDn ( string childDn ) : string

Gets the dn of the parent object of the object specified by childDn

GetSingleValue ( System.DirectoryServices.PropertyValueCollection pvc ) : Object

Gets a single value from a propertyvaluecollection for a particular property name. Its an error if the property contains multiple values.

HandleNameAndContainerChange ( UpdateType type, System.DirectoryServices.DirectoryEntry directoryEntry, ICollection attributes, ActiveDirectoryConfiguration config ) : void

IsValidDn ( string dn ) : bool

Determines whether dn is a valid distinguished name.

A DN is valid if it can be processed by the AD API. This method does not test RFC 2253 compliance, but only basic syntactical check.

UpdateADObject ( ObjectClass oclass, System.DirectoryServices.DirectoryEntry directoryEntry, ICollection attributes, UpdateType type, ActiveDirectoryConfiguration config ) : void

Updates an AD object (also called by create after object is created)

getADSPathname ( string provider, string serverName, string path ) : IADsPathname

uses iadspathname to create paths in a standard way

Описание методов

ActiveDirectoryUtils() публичный Метод

Constructor
public ActiveDirectoryUtils ( ActiveDirectoryConfiguration configuration ) : System
configuration ActiveDirectoryConfiguration /// Configuration object for the connector. ///
Результат System

ComToIcfException() публичный статический Метод

Converts a DirectoryServicesCOMException into more meaningful ICF exception (e.g. AlreadyExistsException).
public static ComToIcfException ( System.DirectoryServices.DirectoryServicesCOMException originalException, String message ) : Exception
originalException System.DirectoryServices.DirectoryServicesCOMException
message String
Результат System.Exception

ConvertADGUIDtoObjectGUID() публичный статический Метод

public static ConvertADGUIDtoObjectGUID ( string uid ) : string
uid string
Результат string

ConvertUIDBytesToSearchString() публичный статический Метод

Converts a guid in byte array form to a string suitable for ldap search.
public static ConvertUIDBytesToSearchString ( Byte guidBytes ) : String
guidBytes Byte
Результат String

ConvertUIDToSearchString() публичный статический Метод

public static ConvertUIDToSearchString ( Uid uid ) : String
uid Org.IdentityConnectors.Framework.Common.Objects.Uid
Результат String

GetCnValueUnescaped() публичный статический Метод

public static GetCnValueUnescaped ( String nameValue ) : String
nameValue String
Результат String

GetDomainControllerName() публичный статический Метод

public static GetDomainControllerName ( ActiveDirectoryConfiguration configuration ) : string
configuration ActiveDirectoryConfiguration
Результат string

GetNameAsCN() публичный статический Метод

Returns the leaf value of a distinguished name
public static GetNameAsCN ( String nameValue ) : String
nameValue String
Результат String

GetRelativeName() публичный статический Метод

public static GetRelativeName ( Name name ) : String
name Org.IdentityConnectors.Framework.Common.Objects.Name
Результат String

GetSecureString() публичный статический Метод

public static GetSecureString ( String stringToSecure ) : SecureString
stringToSecure String
Результат System.Security.SecureString

NormalizeLdapString() публичный статический Метод

Puts an ldap string into a normalilzed format
public static NormalizeLdapString ( String ldapString ) : String
ldapString String
Результат String

OtherComToIcfException() публичный статический Метод

Converts a System.Runtime.InteropServices.COMException into more meaningful ICF exception (e.g. AlreadyExistsException).
public static OtherComToIcfException ( System originalException, String message ) : Exception
originalException System
message String
Результат System.Exception

RandomStr() публичный статический Метод

public static RandomStr ( ) : string
Результат string