Skip to content
Snippets Groups Projects
Commit 6b13e814 authored by Steven Murray's avatar Steven Murray
Browse files

Updated the ArchivalRequest, RetrievalRequest and UserRequest classes

parent 1fd1ff39
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,9 @@ cta::ArchivalRequest::~ArchivalRequest() throw() {
// constructor
//------------------------------------------------------------------------------
cta::ArchivalRequest::ArchivalRequest(const std::string &storageClassName,
const uint64_t priority):
const uint64_t priority, const std::string &id, const SecurityIdentity &user,
const time_t creationTime):
UserRequest(id, user, creationTime),
m_storageClassName(storageClassName),
m_priority(priority) {
}
......
......@@ -28,8 +28,14 @@ public:
*
* @param storageClassName The name of the storage class.
* @param priority The priority of the request.
* @param id The identifier of the request.
* @param user The identity of the user who made the request.
* @param creationTime Optionally the absolute time at which the user request
* was created. If no value is given then the current time is used.
*/
ArchivalRequest(const std::string &storageClassName, const uint64_t priority);
ArchivalRequest(const std::string &storageClassName, const uint64_t priority,
const std::string &id, const SecurityIdentity &user,
const time_t creationTime = time(NULL));
/**
* Returns the name of the storage class.
......
......@@ -16,7 +16,10 @@ cta::RetrievalRequest::~RetrievalRequest() throw() {
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
cta::RetrievalRequest::RetrievalRequest(const uint64_t priority):
cta::RetrievalRequest::RetrievalRequest(const uint64_t priority,
const std::string &id, const SecurityIdentity &user,
const time_t creationTime):
UserRequest(id, user, creationTime),
m_priority(priority) {
}
......
......@@ -26,8 +26,13 @@ public:
* Constructor.
*
* @param priority The priority of the request.
* @param id The identifier of the request.
* @param user The identity of the user who made the request.
* @param creationTime Optionally the absolute time at which the user request
* was created. If no value is given then the current time is used.
*/
RetrievalRequest(const uint64_t priority);
RetrievalRequest(const uint64_t priority, const std::string &id,
const SecurityIdentity &user, const time_t creationTime = time(NULL));
/**
* Returns the priority of the request.
......
......@@ -12,10 +12,10 @@ cta::UserRequest::UserRequest():
// constructor
//------------------------------------------------------------------------------
cta::UserRequest::UserRequest(const std::string &id,
const SecurityIdentity &user):
const SecurityIdentity &user, const time_t creationTime):
m_id(id),
m_user(user),
m_creationTime(time(NULL)) {
m_creationTime(creationTime) {
}
//------------------------------------------------------------------------------
......
......@@ -21,15 +21,18 @@ public:
/**
* Destructor.
*/
virtual ~UserRequest() throw();
virtual ~UserRequest() throw() = 0;
/**
* Constructor.
*
* @param id The identifier of the request.
* @param user The identity of the user who made the request.
* @param creationTime Optionally the absolute time at which the user request
* was created. If no value is given then the current time is used.
*/
UserRequest(const std::string &id, const SecurityIdentity &user);
UserRequest(const std::string &id, const SecurityIdentity &user,
const time_t creationTime = time(NULL));
/**
* Returns the identifier of the request.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment