C# Class Kentico.ADImportService.RestSender

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

Méthodes publiques

Méthode 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

Méthode Description
LogError ( string message, Exception ex = null ) : void
LogMessage ( string message ) : void

Method Details

AddRole() public méthode

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

AddUser() public méthode

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

AddUserToRole() public méthode

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

GetRole() public méthode

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

GetUser() public méthode

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

ModifyRole() public méthode

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

ModifyUser() public méthode

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

RemoveRole() public méthode

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

RemoveUser() public méthode

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

RemoveUserFromRole() public méthode

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

RestSender() public méthode

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.
Résultat System

RoleExists() public méthode

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

RoleExists() public méthode

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

UserExists() public méthode

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

UserExists() public méthode

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
Résultat bool

UserExists() public méthode

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