C# Class Kentico.ADImportService.RestSender

Provides basic CMS operations with users and groups.
Inheritance: ISender
Mostra file Open project: Kentico/ADImportService Class Usage Examples

Public Methods

Method Description
AddRole ( Kentico.ADImportService.Role role ) : long?

Add role to CMS.

AddUser ( Kentico.ADImportService.User user ) : long?

Add user to CMS.

AddUserToRole ( long userId, long roleId ) : long?

Create user-role relationship.

GetRole ( long id ) : string

Get XML representation of given role.

GetUser ( System.Guid guid ) : string

Get user XML representation.

ModifyRole ( Kentico.ADImportService.Role role ) : long?

Modify existing role.

ModifyUser ( Kentico.ADImportService.User user ) : long?

Modify existing user in CMS.

RemoveRole ( Kentico.ADImportService.Role role ) : void

Remove role from CMS.

RemoveUser ( Kentico.ADImportService.User user ) : void

Remove user from CMS.

RemoveUserFromRole ( long id ) : void

Remove user-role relationship.

RestSender ( Kentico.ADImportService.RestConfiguration configuration, Logger logger ) : System

Default constructor.

RoleExists ( System.Guid guid ) : bool

Find out whether role with given GUID exist.

RoleExists ( long id ) : bool

Find out whether role with given ID exist.

UserExists ( System.Guid guid ) : bool

Find out whether user with given GUID exists.

UserExists ( System.Guid guid, string codeName ) : bool

Find out whether user with given GUID and name exists.

UserExists ( string codeName ) : bool

Find out whether user with given name exists.

Private Methods

Method Description
LogError ( string message, Exception ex = null ) : void
LogMessage ( string message ) : void

Method Details

AddRole() public method

Add role to CMS.
public AddRole ( Kentico.ADImportService.Role role ) : long?
role Kentico.ADImportService.Role Role to add
return long?

AddUser() public method

Add user to CMS.
public AddUser ( Kentico.ADImportService.User user ) : long?
user Kentico.ADImportService.User User to add
return long?

AddUserToRole() public method

Create user-role relationship.
public AddUserToRole ( long userId, long roleId ) : long?
userId long User to add to role
roleId long Role to assign
return long?

GetRole() public method

Get XML representation of given role.
public GetRole ( long id ) : string
id long Id of role to find
return string

GetUser() public method

Get user XML representation.
public GetUser ( System.Guid guid ) : string
guid System.Guid Guid of user to find.
return string

ModifyRole() public method

Modify existing role.
public ModifyRole ( Kentico.ADImportService.Role role ) : long?
role Kentico.ADImportService.Role Role to modify
return long?

ModifyUser() public method

Modify existing user in CMS.
public ModifyUser ( Kentico.ADImportService.User user ) : long?
user Kentico.ADImportService.User Modified user
return long?

RemoveRole() public method

Remove role from CMS.
public RemoveRole ( Kentico.ADImportService.Role role ) : void
role Kentico.ADImportService.Role Role to delete.
return void

RemoveUser() public method

Remove user from CMS.
public RemoveUser ( Kentico.ADImportService.User user ) : void
user Kentico.ADImportService.User User to delete.
return void

RemoveUserFromRole() public method

Remove user-role relationship.
public RemoveUserFromRole ( long id ) : void
id long User-role memberhip id.
return void

RestSender() public method

Default constructor.
public RestSender ( Kentico.ADImportService.RestConfiguration configuration, Logger logger ) : System
configuration Kentico.ADImportService.RestConfiguration Configuration used to construct REST provider.
logger Logger Logger for logging events and errors.
return System

RoleExists() public method

Find out whether role with given GUID exist.
public RoleExists ( System.Guid guid ) : bool
guid System.Guid Guid of role to check
return bool

RoleExists() public method

Find out whether role with given ID exist.
public RoleExists ( long id ) : bool
id long Id of role to check
return bool

UserExists() public method

Find out whether user with given GUID exists.
public UserExists ( System.Guid guid ) : bool
guid System.Guid Guid of user to check.
return bool

UserExists() public method

Find out whether user with given GUID and name exists.
public UserExists ( System.Guid guid, string codeName ) : bool
guid System.Guid Guid of user to check.
codeName string
return bool

UserExists() public method

Find out whether user with given name exists.
public UserExists ( string codeName ) : bool
codeName string
return bool