10#include <boost/date_time/posix_time/posix_time.hpp>
11#include <boost/multi_index/composite_key.hpp>
12#include <boost/multi_index_container.hpp>
13#include <boost/multi_index/hashed_index.hpp>
14#include <boost/multi_index/mem_fun.hpp>
15#include <boost/multi_index/ordered_index.hpp>
16#include <boost/shared_ptr.hpp>
89 const uint64_t object_id,
91 const boost::posix_time::ptime& modification_time,
92 const uint64_t revision_id,
93 const std::string& log_message);
104 const uint64_t object_id,
106 const uint64_t revision_id,
107 const std::string& log_message);
126 const uint64_t object_id,
128 const boost::posix_time::ptime& modification_time,
129 const uint64_t revision_id,
130 const std::string& log_message);
148 const uint64_t object_id,
150 const uint64_t revision_id,
151 const std::string& log_message);
157 return (object_type_);
171 return (modification_type_);
178 return (modification_time_);
188 return (revision_id_);
195 return (log_message_);
204 void validate()
const;
207 std::string object_type_;
216 boost::posix_time::ptime modification_time_;
222 uint64_t revision_id_;
225 std::string log_message_;
241typedef boost::multi_index_container<
245 boost::multi_index::indexed_by<
246 boost::multi_index::ordered_non_unique<
247 boost::multi_index::tag<AuditEntryObjectTypeTag>,
248 boost::multi_index::composite_key<
250 boost::multi_index::const_mem_fun<
255 boost::multi_index::const_mem_fun<
264 boost::multi_index::ordered_non_unique<
265 boost::multi_index::tag<AuditEntryModificationTimeIdTag>,
266 boost::multi_index::composite_key<
268 boost::multi_index::const_mem_fun<
270 boost::posix_time::ptime,
273 boost::multi_index::const_mem_fun<
282 boost::multi_index::hashed_non_unique<
283 boost::multi_index::tag<AuditEntryObjectIdTag>,
284 boost::multi_index::const_mem_fun<
Represents a single entry in the audit table.
uint64_t getRevisionId() const
Returns revision id.
ModificationType
Types of the modifications.
ModificationType getModificationType() const
Returns modification type.
boost::posix_time::ptime getModificationTime() const
Returns modification time.
static AuditEntryPtr create(const std::string &object_type, const uint64_t object_id, const ModificationType &modification_type, const boost::posix_time::ptime &modification_time, const uint64_t revision_id, const std::string &log_message)
Factory function creating an instance of AuditEntry.
std::string getObjectType() const
Returns object type.
std::string getLogMessage() const
Returns log message.
uint64_t getObjectId() const
Returns object id.
AuditEntry(const std::string &object_type, const uint64_t object_id, const ModificationType &modification_type, const boost::posix_time::ptime &modification_time, const uint64_t revision_id, const std::string &log_message)
Constructor using explicit modification time and id.
boost::shared_ptr< AuditEntry > AuditEntryPtr
Pointer to the AuditEntry object.
boost::multi_index_container< AuditEntryPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag< AuditEntryObjectTypeTag >, boost::multi_index::composite_key< AuditEntry, boost::multi_index::const_mem_fun< AuditEntry, std::string, &AuditEntry::getObjectType >, boost::multi_index::const_mem_fun< AuditEntry, AuditEntry::ModificationType, &AuditEntry::getModificationType > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< AuditEntryModificationTimeIdTag >, boost::multi_index::composite_key< AuditEntry, boost::multi_index::const_mem_fun< AuditEntry, boost::posix_time::ptime, &AuditEntry::getModificationTime >, boost::multi_index::const_mem_fun< AuditEntry, uint64_t, &AuditEntry::getRevisionId > > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< AuditEntryObjectIdTag >, boost::multi_index::const_mem_fun< AuditEntry, uint64_t, &AuditEntry::getObjectId > > > > AuditEntryCollection
Multi index container holding AuditEntry instances.
boost::shared_ptr< AuditEntryCollection > AuditEntryCollectionPtr
Defines the logger used by the top-level component of kea-lfc.
Tag used to access index by modification time.
Tag used to access index by object id.
Tag used to access index by object type.