MarkLogic Connect
MarkLogic Connect Client API Collection
Public Member Functions | List of all members
mlclient::Permission Class Reference

Represents a single MarkLogic Permission. More...

#include <Permission.hpp>

Public Member Functions

MLCLIENT_API Permission (const std::string &role, const Capability &capability)
 Creates a permission with the specified role and capability. More...
 
MLCLIENT_API Permission (Permission &&other)
 Move Constructor.
 
MLCLIENT_API Permission (const Permission &other)=default
 Defalt copy constructor.
 
virtual MLCLIENT_API ~Permission ()=default
 
MLCLIENT_API Permissionoperator= (const Permission &other)=default
 Default copy assignment operator.
 
MLCLIENT_API const std::string & getRole () const
 Returns the role string. More...
 
MLCLIENT_API void setRole (const std::string &role)
 Sets the role string. More...
 
MLCLIENT_API const CapabilitygetCapability () const
 Returns the capability. More...
 
MLCLIENT_API void setCapability (const Capability &capability)
 Sets the capability. More...
 

Detailed Description

Represents a single MarkLogic Permission.

A MarkLogic Permission consists of a Role name string (NOT a user), and a capability (Read, Update, Insert, Execute)

Note
Supports std::move and C++11 move semantics.
Since
8.0.2
Date
2016-08-09

Constructor & Destructor Documentation

MLCLIENT_API mlclient::Permission::Permission ( const std::string &  role,
const Capability capability 
)

Creates a permission with the specified role and capability.

Parameters
roleThe MarkLogic role name (NOT numeric ID)
capabilityThe capability
virtual MLCLIENT_API mlclient::Permission::~Permission ( )
virtualdefault

Default Destructor

Member Function Documentation

MLCLIENT_API const Capability& mlclient::Permission::getCapability ( ) const

Returns the capability.

Returns
The capability
MLCLIENT_API const std::string& mlclient::Permission::getRole ( ) const

Returns the role string.

Returns
The role string (NOT the numeric role ID)
MLCLIENT_API void mlclient::Permission::setCapability ( const Capability capability)

Sets the capability.

Parameters
capabilityThe role capability
MLCLIENT_API void mlclient::Permission::setRole ( const std::string &  role)

Sets the role string.

Parameters
roleThe role ID string (NOT the numeric ID)

The documentation for this class was generated from the following file: