#ifndef __ARC_SEC_EVALUATIONCTX_H__ #define __ARC_SEC_EVALUATIONCTX_H__ #include #include #include #include #include "attr/AttributeValue.h" #include "Request.h" namespace ArcSec { class RequestTuple { public: virtual RequestTuple* duplicate(const RequestTuple*) { return NULL; }; virtual Arc::XMLNode& getNode() { return tuple; }; RequestTuple() { }; virtual ~RequestTuple(){ }; virtual void erase() { }; public: Subject sub; Resource res; Action act; Context ctx; protected: Arc::XMLNode tuple; }; ///EvaluationCtx, in charge of storing some context information for //evaluation, including Request, current time, etc. class EvaluationCtx { public: /**Construct a new EvaluationCtx based on the given request */ EvaluationCtx (Request* request) { req = request; }; virtual ~EvaluationCtx() { }; virtual Request* getRequest() const { return req; }; //virtual void setRequestItem(RequestItem* reqit) { }; //virtual RequestItem* getRequestItem() const { return NULL; }; virtual std::list getSubjectAttributes(std::string& /* id */, std::string& /* type */, std::string& /* issuer */, std::string& /* category */, AttributeFactory* /* attrfactory */) { std::list attrlist; return attrlist; }; virtual std::list getResourceAttributes(std::string& /* id */, std::string& /* type */, std::string& /* issuer */, AttributeFactory* /* attrfactory */) { std::list attrlist; return attrlist; }; virtual std::list getActionAttributes(std::string& /* id */, std::string& /* type */, std::string& /* issuer */, AttributeFactory* /* attrfactory */) { std::list attrlist; return attrlist; }; virtual std::list getContextAttributes(std::string& /* id */, std::string& /* type */, std::string& /* issuer */, AttributeFactory* /* attrfactory */) { std::list attrlist; return attrlist; }; virtual std::list getAttributes(std::string& /* reqctxpath */, Arc::XMLNode& /* policy */, std::string& /* data_type */, AttributeFactory* /* attrfactory */) { std::list attrlist; return attrlist; }; private: Request* req; }; } // namespace ArcSec #endif /* __ARC_SEC_EVALUATIONCTX_H__ */