Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
ExecutionState Class Referenceabstract

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

#include <src/api/mip/upe/execution_state.h>

Public Member Functions

virtual std::string GetApplicationScenarioId () const
 Return an identifier which correlates application events with the corresponding audit or protection service REST requests.
 
virtual std::map< std::string, std::string > GetAuditMetadata () const
 Return a map of application specific audit key-value pairs.
 
virtual std::shared_ptr< ClassificationResultsGetClassificationResults (const std::vector< std::shared_ptr< ClassificationRequest > > &) const
 Return a map of classification results.
 
virtual std::string GetContentFormat () const =0
 Gets the content format.
 
virtual std::string GetContentIdentifier () const =0
 Gets the content description that describes the document.
 
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 MetadataVersion GetContentMetadataVersion () const
 Gets the highest metadata version supported by the application for the tenant.
 
virtual DataState GetDataState () const
 Gets the state of the content while the application is interacting with it.
 
virtual std::shared_ptr< LabelGetNewLabel () const =0
 Gets the sensitivity label ID that should be applied on the document.
 
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::shared_ptr< ProtectionDescriptorGetProtectionDescriptor () const =0
 Get the Protection Descriptor.
 
virtual ActionType GetSupportedActions () const =0
 Gets a masked enum describing all the supported action types.
 
virtual std::pair< bool, std::string > IsDowngradeJustified () const =0
 Implementation should pass if justification to downgrade an existing label was given.
 

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.

Definition at line 70 of file execution_state.h.

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)

Definition at line 95 of file execution_state.h.

95 {
96 return std::string();
97 };

◆ 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

Definition at line 201 of file execution_state.h.

201 {
202 return std::map<std::string, std::string>();
203 }

◆ 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.

Definition at line 185 of file execution_state.h.

186 {
187 return nullptr;
188 }

◆ 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.

Definition at line 164 of file execution_state.h.

164 {
166 };
Interface for a MetadataVersion.

References DEFAULT.

◆ 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

Definition at line 104 of file execution_state.h.

104 {
105 return DataState::USE;
106 };
@ USE
Active data under constant change stored physically in databases/file/warehouses etc.

References USE.

◆ 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.

Definition at line 129 of file execution_state.h.

129 {
130 return std::vector<std::pair<std::string, std::string>>();
131 }

◆ 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: