Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
Loading...
Searching...
No Matches
ExecutionState Class Referenceabstract

Interface for all the state needed to execute the engine. More...

#include <execution_state.h>

Public Member Functions

virtual std::shared_ptr< LabelGetNewLabel () const =0
 Gets the sensitivity label ID that should be applied on the document.
 
virtual std::string GetContentIdentifier () const =0
 Gets the content description that describes the document. example for a file: [path\filename] example for an email: [Subject:Sender].
 
virtual std::string GetApplicationScenarioId () const
 Return an identifier which correlates application events with the corresponding audit or protection service REST requests.
 
virtual DataState GetDataState () const
 Gets the state of the content while the application is interacting with it.
 
virtual std::pair< bool, std::string > IsDowngradeJustified () const =0
 Implementation should pass if justification to downgrade an existing label was given.
 
virtual AssignmentMethod GetNewLabelAssignmentMethod () const =0
 Get the new label's assignment method.
 
virtual std::vector< std::pair< std::string, std::string > > GetNewLabelExtendedProperties () const
 Return new label's extended properties.
 
virtual std::vector< MetadataEntryGetContentMetadata (const std::vector< std::string > &names, const std::vector< std::string > &namePrefixes) const =0
 Get the meta-data items from the content.
 
virtual std::shared_ptr< ProtectionDescriptorGetProtectionDescriptor () const =0
 Get the Protection Descriptor.
 
virtual std::string GetContentFormat () const =0
 Gets the content format.
 
virtual MetadataVersion GetContentMetadataVersion () const
 Gets the highest metadata version supported by the application for the tenant.
 
virtual ActionType GetSupportedActions () const =0
 Gets a masked enum describing all the supported action types.
 
virtual std::shared_ptr< ClassificationResultsGetClassificationResults (const std::vector< std::shared_ptr< ClassificationRequest > > &) const
 Return a map of classification results.
 
virtual std::map< std::string, std::string > GetAuditMetadata () const
 Return a map of application specific audit key-value pairs.
 

Detailed Description

Interface for all the state needed to execute the engine.

Note
Clients should only call the methods to obtain the state that is needed. Hence, for efficiency, clients may want to implement this interface such that the corresponding state is computed dynamically instead of computing in advance.

Member Function Documentation

◆ GetApplicationScenarioId()

virtual std::string ExecutionState::GetApplicationScenarioId ( ) const
inlinevirtual

Return an identifier which correlates application events with the corresponding audit or protection service REST requests.

Returns
An identifier (usually specified as a GUID)

◆ GetAuditMetadata()

virtual std::map< std::string, std::string > ExecutionState::GetAuditMetadata ( ) const
inlinevirtual

Return a map of application specific audit key-value pairs.

Returns
a list of application specific audit metadata
Note
Registered Key:Value pairs Sender: Email Id for the sender Recipients: Represents a JSON array of recipients for an email LastModifiedBy: Email Id for the user who last modified the content LastModifiedDate: Date the content was last modified

◆ GetClassificationResults()

virtual std::shared_ptr< ClassificationResults > ExecutionState::GetClassificationResults ( const std::vector< std::shared_ptr< ClassificationRequest > > & ) const
inlinevirtual

Return a map of classification results.

Parameters
classificationIdsa list of classification IDs.
Returns
a list of classification results.
Note
return nullptr if no classification cycle executed.

◆ GetContentFormat()

virtual std::string ExecutionState::GetContentFormat ( ) const
pure virtual

Gets the content format.

Returns
content format

◆ GetContentIdentifier()

virtual std::string ExecutionState::GetContentIdentifier ( ) const
pure virtual

Gets the content description that describes the document. example for a file: [path\filename] example for an email: [Subject:Sender].

Returns
content description to be applied to the content.
Note
This value is used by auditing as a human-readable description of the content

◆ GetContentMetadata()

virtual std::vector< MetadataEntry > ExecutionState::GetContentMetadata ( const std::vector< std::string > & names,
const std::vector< std::string > & namePrefixes ) const
pure virtual

Get the meta-data items from the content.

Returns
the metadata applied to the content.
Note
Each metadata item is a pair of name and value.

◆ GetContentMetadataVersion()

virtual MetadataVersion ExecutionState::GetContentMetadataVersion ( ) const
inlinevirtual

Gets the highest metadata version supported by the application for the tenant.

Returns
Content metadata version. If 0, metadata is un-versioned.
Note
If a file format supports multiple versions of metadata, this allows MIP to understand all metadata and report granular metadata changes on a per-version basis.

◆ GetDataState()

virtual DataState ExecutionState::GetDataState ( ) const
inlinevirtual

Gets the state of the content while the application is interacting with it.

Returns
State of the content data

◆ GetNewLabel()

virtual std::shared_ptr< Label > ExecutionState::GetNewLabel ( ) const
pure virtual

Gets the sensitivity label ID that should be applied on the document.

Returns
sensitivity label ID to be applied to the content if exists else empty to remove label.

◆ GetNewLabelAssignmentMethod()

virtual AssignmentMethod ExecutionState::GetNewLabelAssignmentMethod ( ) const
pure virtual

Get the new label's assignment method.

Returns
the assignment method STANDARD, PRIVILEGED, AUTO.
See also
mip::AssignmentMethod

◆ GetNewLabelExtendedProperties()

virtual std::vector< std::pair< std::string, std::string > > ExecutionState::GetNewLabelExtendedProperties ( ) const
inlinevirtual

Return new label's extended properties.

Returns
the extended properties applied to the content.

◆ GetProtectionDescriptor()

virtual std::shared_ptr< ProtectionDescriptor > ExecutionState::GetProtectionDescriptor ( ) const
pure virtual

Get the Protection Descriptor.

Returns
the Protection Descriptor

◆ GetSupportedActions()

virtual ActionType ExecutionState::GetSupportedActions ( ) const
pure virtual

Gets a masked enum describing all the supported action types.

Returns
a masked enum describing all the supported action types.
Note
ActionType::Justify must be supported. When a policy and label change requires justification, a justification action will always be returned.

◆ IsDowngradeJustified()

virtual std::pair< bool, std::string > ExecutionState::IsDowngradeJustified ( ) const
pure virtual

Implementation should pass if justification to downgrade an existing label was given.

Returns
true if downgrade is justified–along with the justification message–else false
See also
mip::JustifyAction

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