* @brief Mark a node as modified via REST API. * * Sets the internal properties "restapi.modified" to the current timestamp and * "restapi.lastmodification" to the specified operation description. * * @param node The node to mark as modified. Must not be nullptr. * @param operation Description of the modification operation (e.g., "created", "property_set:name"). */
| 172 | * @param operation Description of the modification operation (e.g., "created", "property_set:name"). |
| 173 | */ |
| 174 | void MarkNodeAsModified(mitk::DataNode* node, const std::string& operation) |
| 175 | { |
| 176 | if (node == nullptr) |
| 177 | { |
| 178 | return; |
| 179 | } |
| 180 | |
| 181 | node->SetStringProperty(mitk::DataStorageBridge::MODIFIED_PROPERTY_KEY, GenerateTimestampString().c_str()); |
| 182 | node->SetStringProperty(mitk::DataStorageBridge::LAST_MODIFICATION_PROPERTY_KEY, operation.c_str()); |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * @brief Convert a filter pattern with wildcards into a regex string. |
no test coverage detected