C# Class SenseNet.DirectoryServices.Common

Show file Open project: maxpavlov/FlexNet

Public Methods

Method Description
ChangeToAdminAccount ( ) : void
CombineADPath ( string path1, string path2 ) : string
ConnectToAD ( string ldapPath, string customADAdminAccountName, string customADAdminAccountPwd, bool novellSupport, string guidProp ) : System.DirectoryServices.DirectoryEntry
ConnectToADSimple ( string ldapPath ) : System.DirectoryServices.DirectoryEntry
DisableADObjectCustomProperties ( System.DirectoryServices.DirectoryEntry entry, List propertyMappings, int ADNameMaxLength, int ADsAMAccountNameMaxLength ) : void
DisablePortalUserCustomProperties ( Node node, List propertyMappings ) : void
DisableUserAccount ( System.DirectoryServices.DirectoryEntry adUser ) : void
EnableUserAccount ( System.DirectoryServices.DirectoryEntry adUser ) : void
EnsurePath ( string path ) : void
GetADObjectGuid ( System.DirectoryServices.DirectoryEntry entry, string guidProp ) : Guid?
GetADObjectName ( string name ) : string
GetADObjectNameFromPath ( string portalPath ) : string
GetADObjectPrefix ( ADObjectType adObjectType ) : string
GetADObjectType ( System.DirectoryServices.DirectoryEntry entry, bool novellSupport ) : ADObjectType
GetADObjectType ( NodeType nodeType ) : ADObjectType
GetADResultGuid ( SearchResult result, string guidProp ) : Guid?
GetContainerUsers ( Node container ) : IEnumerable
GetEntryValue ( System.DirectoryServices.DirectoryEntry entry, SyncProperty adProp ) : string
GetGuid ( byte byteArray ) : Guid?
GetNodeType ( ADObjectType adObjectType ) : NodeType
GetNodeValue ( Node node, SyncProperty portalProp ) : string
GetPortalDomainName ( string ADDomainPath ) : string

Gets the portal representative for a given AD domain

GetPortalObjectByGuid ( System.Guid guid ) : Node
GetPortalObjectGuid ( Node node ) : Guid?
Guid2OctetString ( System.Guid guid ) : string
IsADAuthenticated ( string adPath, string domain, string username, string pwd, string userNameProp ) : bool
IsADCustomAuthenticated ( string adPath, string loginPropValue, string pwd, string loginProp, string customADAdminAccountName, string customADAdminAccountPwd ) : bool
IsADObjectContainer ( System.DirectoryServices.DirectoryEntry adObject ) : bool
IsADObjectDomain ( System.DirectoryServices.DirectoryEntry adObject ) : bool
IsADObjectGroup ( System.DirectoryServices.DirectoryEntry adObject ) : bool
IsADObjectOrgUnit ( System.DirectoryServices.DirectoryEntry adObject ) : bool
IsADObjectOrganization ( System.DirectoryServices.DirectoryEntry adObject ) : bool
IsADObjectUser ( System.DirectoryServices.DirectoryEntry adObject, bool novellSupport ) : bool
IsAccountDisabled ( System.DirectoryServices.DirectoryEntry adUser, bool novellSupport ) : bool
IsPortalObjectInvalid ( Node node, SearchResult result, bool novellSupport ) : bool
MaximizeLength ( this s, int max ) : string
PrefixDeleted ( this s ) : string
PropValueCollContains ( System.DirectoryServices.PropertyValueCollection propValueColl, string value ) : bool
RenameADObjectIfNecessary ( System.DirectoryServices.DirectoryEntry entry, Node node, int ADNameMaxLength, bool allowRename ) : void
RestoreOriginalUser ( IUser originalUser ) : void
Search ( System.DirectoryServices.DirectoryEntry searchRoot, string filter, bool novellSupport, string guidProp ) : System.DirectoryServices.SearchResultCollection
SearchADObject ( System.DirectoryServices.DirectoryEntry searchRoot, string filter, bool novellSupport, string guidProp ) : System.DirectoryServices.DirectoryEntry
SetEntryValue ( System.DirectoryServices.DirectoryEntry entry, SyncProperty adProp, string value ) : void
SetNodeValue ( Node node, SyncProperty portalProp, string value ) : void
SetPassword ( System.DirectoryServices.DirectoryEntry adUser, string password ) : void
SetPortalObjectGuid ( System.DirectoryServices.DirectoryEntry entry, Node node, string guidProp ) : void
StripADName ( string name ) : string
SyncInitialUserProperties ( User user ) : void
SyncVirtualUserFromAD ( string adPath, System.Guid guid, User virtualUser, List propertyMappings, string customADAdminAccountName, string customADAdminAccountPwd, bool novellSupport, string guidProp, bool syncUserName ) : bool
SyncVirtualUserFromAD ( string adPath, string username, User virtualUser, List propertyMappings, string customADAdminAccountName, string customADAdminAccountPwd, bool novellSupport, string guidProp, bool syncUserName ) : bool
UpdateADUserCustomProperties ( System.DirectoryServices.DirectoryEntry entry, Node user, List propertyMappings, bool enabled, int ADsAMAccountNameMaxLength, bool syncEnabledState, bool syncUserName ) : void
UpdateLastSync ( Node node, System.Guid guid ) : void
UpdatePortalUserCustomProperties ( System.DirectoryServices.DirectoryEntry entry, Node node, List propertyMappings, bool syncUserName ) : void

Method Details

ChangeToAdminAccount() public static method

public static ChangeToAdminAccount ( ) : void
return void

CombineADPath() public static method

public static CombineADPath ( string path1, string path2 ) : string
path1 string
path2 string
return string

ConnectToAD() public static method

public static ConnectToAD ( string ldapPath, string customADAdminAccountName, string customADAdminAccountPwd, bool novellSupport, string guidProp ) : System.DirectoryServices.DirectoryEntry
ldapPath string
customADAdminAccountName string
customADAdminAccountPwd string
novellSupport bool
guidProp string
return System.DirectoryServices.DirectoryEntry

ConnectToADSimple() public static method

public static ConnectToADSimple ( string ldapPath ) : System.DirectoryServices.DirectoryEntry
ldapPath string
return System.DirectoryServices.DirectoryEntry

DisableADObjectCustomProperties() public static method

public static DisableADObjectCustomProperties ( System.DirectoryServices.DirectoryEntry entry, List propertyMappings, int ADNameMaxLength, int ADsAMAccountNameMaxLength ) : void
entry System.DirectoryServices.DirectoryEntry
propertyMappings List
ADNameMaxLength int
ADsAMAccountNameMaxLength int
return void

DisablePortalUserCustomProperties() public static method

public static DisablePortalUserCustomProperties ( Node node, List propertyMappings ) : void
node Node
propertyMappings List
return void

DisableUserAccount() public static method

public static DisableUserAccount ( System.DirectoryServices.DirectoryEntry adUser ) : void
adUser System.DirectoryServices.DirectoryEntry
return void

EnableUserAccount() public static method

public static EnableUserAccount ( System.DirectoryServices.DirectoryEntry adUser ) : void
adUser System.DirectoryServices.DirectoryEntry
return void

EnsurePath() public static method

public static EnsurePath ( string path ) : void
path string
return void

GetADObjectGuid() public static method

public static GetADObjectGuid ( System.DirectoryServices.DirectoryEntry entry, string guidProp ) : Guid?
entry System.DirectoryServices.DirectoryEntry
guidProp string
return Guid?

GetADObjectName() public static method

public static GetADObjectName ( string name ) : string
name string
return string

GetADObjectNameFromPath() public static method

public static GetADObjectNameFromPath ( string portalPath ) : string
portalPath string
return string

GetADObjectPrefix() public static method

public static GetADObjectPrefix ( ADObjectType adObjectType ) : string
adObjectType ADObjectType
return string

GetADObjectType() public static method

public static GetADObjectType ( System.DirectoryServices.DirectoryEntry entry, bool novellSupport ) : ADObjectType
entry System.DirectoryServices.DirectoryEntry
novellSupport bool
return ADObjectType

GetADObjectType() public static method

public static GetADObjectType ( NodeType nodeType ) : ADObjectType
nodeType SenseNet.ContentRepository.Storage.Schema.NodeType
return ADObjectType

GetADResultGuid() public static method

public static GetADResultGuid ( SearchResult result, string guidProp ) : Guid?
result SearchResult
guidProp string
return Guid?

GetContainerUsers() public static method

public static GetContainerUsers ( Node container ) : IEnumerable
container Node
return IEnumerable

GetEntryValue() public static method

public static GetEntryValue ( System.DirectoryServices.DirectoryEntry entry, SyncProperty adProp ) : string
entry System.DirectoryServices.DirectoryEntry
adProp SyncProperty
return string

GetGuid() public static method

public static GetGuid ( byte byteArray ) : Guid?
byteArray byte
return Guid?

GetNodeType() public static method

public static GetNodeType ( ADObjectType adObjectType ) : NodeType
adObjectType ADObjectType
return SenseNet.ContentRepository.Storage.Schema.NodeType

GetNodeValue() public static method

public static GetNodeValue ( Node node, SyncProperty portalProp ) : string
node Node
portalProp SyncProperty
return string

GetPortalDomainName() public static method

Gets the portal representative for a given AD domain
public static GetPortalDomainName ( string ADDomainPath ) : string
ADDomainPath string
return string

GetPortalObjectByGuid() public static method

public static GetPortalObjectByGuid ( System.Guid guid ) : Node
guid System.Guid
return Node

GetPortalObjectGuid() public static method

public static GetPortalObjectGuid ( Node node ) : Guid?
node Node
return Guid?

Guid2OctetString() public static method

public static Guid2OctetString ( System.Guid guid ) : string
guid System.Guid
return string

IsADAuthenticated() public static method

public static IsADAuthenticated ( string adPath, string domain, string username, string pwd, string userNameProp ) : bool
adPath string
domain string
username string
pwd string
userNameProp string
return bool

IsADCustomAuthenticated() public static method

public static IsADCustomAuthenticated ( string adPath, string loginPropValue, string pwd, string loginProp, string customADAdminAccountName, string customADAdminAccountPwd ) : bool
adPath string
loginPropValue string
pwd string
loginProp string
customADAdminAccountName string
customADAdminAccountPwd string
return bool

IsADObjectContainer() public static method

public static IsADObjectContainer ( System.DirectoryServices.DirectoryEntry adObject ) : bool
adObject System.DirectoryServices.DirectoryEntry
return bool

IsADObjectDomain() public static method

public static IsADObjectDomain ( System.DirectoryServices.DirectoryEntry adObject ) : bool
adObject System.DirectoryServices.DirectoryEntry
return bool

IsADObjectGroup() public static method

public static IsADObjectGroup ( System.DirectoryServices.DirectoryEntry adObject ) : bool
adObject System.DirectoryServices.DirectoryEntry
return bool

IsADObjectOrgUnit() public static method

public static IsADObjectOrgUnit ( System.DirectoryServices.DirectoryEntry adObject ) : bool
adObject System.DirectoryServices.DirectoryEntry
return bool

IsADObjectOrganization() public static method

public static IsADObjectOrganization ( System.DirectoryServices.DirectoryEntry adObject ) : bool
adObject System.DirectoryServices.DirectoryEntry
return bool

IsADObjectUser() public static method

public static IsADObjectUser ( System.DirectoryServices.DirectoryEntry adObject, bool novellSupport ) : bool
adObject System.DirectoryServices.DirectoryEntry
novellSupport bool
return bool

IsAccountDisabled() public static method

public static IsAccountDisabled ( System.DirectoryServices.DirectoryEntry adUser, bool novellSupport ) : bool
adUser System.DirectoryServices.DirectoryEntry
novellSupport bool
return bool

IsPortalObjectInvalid() public static method

public static IsPortalObjectInvalid ( Node node, SearchResult result, bool novellSupport ) : bool
node Node
result SearchResult
novellSupport bool
return bool

MaximizeLength() public static method

public static MaximizeLength ( this s, int max ) : string
s this
max int
return string

PrefixDeleted() public static method

public static PrefixDeleted ( this s ) : string
s this
return string

PropValueCollContains() public static method

public static PropValueCollContains ( System.DirectoryServices.PropertyValueCollection propValueColl, string value ) : bool
propValueColl System.DirectoryServices.PropertyValueCollection
value string
return bool

RenameADObjectIfNecessary() public static method

public static RenameADObjectIfNecessary ( System.DirectoryServices.DirectoryEntry entry, Node node, int ADNameMaxLength, bool allowRename ) : void
entry System.DirectoryServices.DirectoryEntry
node Node
ADNameMaxLength int
allowRename bool
return void

RestoreOriginalUser() public static method

public static RestoreOriginalUser ( IUser originalUser ) : void
originalUser IUser
return void

Search() public static method

public static Search ( System.DirectoryServices.DirectoryEntry searchRoot, string filter, bool novellSupport, string guidProp ) : System.DirectoryServices.SearchResultCollection
searchRoot System.DirectoryServices.DirectoryEntry
filter string
novellSupport bool
guidProp string
return System.DirectoryServices.SearchResultCollection

SearchADObject() public static method

public static SearchADObject ( System.DirectoryServices.DirectoryEntry searchRoot, string filter, bool novellSupport, string guidProp ) : System.DirectoryServices.DirectoryEntry
searchRoot System.DirectoryServices.DirectoryEntry
filter string
novellSupport bool
guidProp string
return System.DirectoryServices.DirectoryEntry

SetEntryValue() public static method

public static SetEntryValue ( System.DirectoryServices.DirectoryEntry entry, SyncProperty adProp, string value ) : void
entry System.DirectoryServices.DirectoryEntry
adProp SyncProperty
value string
return void

SetNodeValue() public static method

public static SetNodeValue ( Node node, SyncProperty portalProp, string value ) : void
node Node
portalProp SyncProperty
value string
return void

SetPassword() public static method

public static SetPassword ( System.DirectoryServices.DirectoryEntry adUser, string password ) : void
adUser System.DirectoryServices.DirectoryEntry
password string
return void

SetPortalObjectGuid() public static method

public static SetPortalObjectGuid ( System.DirectoryServices.DirectoryEntry entry, Node node, string guidProp ) : void
entry System.DirectoryServices.DirectoryEntry
node Node
guidProp string
return void

StripADName() public static method

public static StripADName ( string name ) : string
name string
return string

SyncInitialUserProperties() public static method

public static SyncInitialUserProperties ( User user ) : void
user SenseNet.ContentRepository.User
return void

SyncVirtualUserFromAD() public static method

public static SyncVirtualUserFromAD ( string adPath, System.Guid guid, User virtualUser, List propertyMappings, string customADAdminAccountName, string customADAdminAccountPwd, bool novellSupport, string guidProp, bool syncUserName ) : bool
adPath string
guid System.Guid
virtualUser SenseNet.ContentRepository.User
propertyMappings List
customADAdminAccountName string
customADAdminAccountPwd string
novellSupport bool
guidProp string
syncUserName bool
return bool

SyncVirtualUserFromAD() public static method

public static SyncVirtualUserFromAD ( string adPath, string username, User virtualUser, List propertyMappings, string customADAdminAccountName, string customADAdminAccountPwd, bool novellSupport, string guidProp, bool syncUserName ) : bool
adPath string
username string
virtualUser SenseNet.ContentRepository.User
propertyMappings List
customADAdminAccountName string
customADAdminAccountPwd string
novellSupport bool
guidProp string
syncUserName bool
return bool

UpdateADUserCustomProperties() public static method

public static UpdateADUserCustomProperties ( System.DirectoryServices.DirectoryEntry entry, Node user, List propertyMappings, bool enabled, int ADsAMAccountNameMaxLength, bool syncEnabledState, bool syncUserName ) : void
entry System.DirectoryServices.DirectoryEntry
user Node
propertyMappings List
enabled bool
ADsAMAccountNameMaxLength int
syncEnabledState bool
syncUserName bool
return void

UpdateLastSync() public static method

public static UpdateLastSync ( Node node, System.Guid guid ) : void
node Node
guid System.Guid
return void

UpdatePortalUserCustomProperties() public static method

public static UpdatePortalUserCustomProperties ( System.DirectoryServices.DirectoryEntry entry, Node node, List propertyMappings, bool syncUserName ) : void
entry System.DirectoryServices.DirectoryEntry
node Node
propertyMappings List
syncUserName bool
return void