Back to index

nordugrid-arc-nox  1.1.0~rc6
EvaluationCtx.h
Go to the documentation of this file.
00001 #ifndef __ARC_SEC_EVALUATIONCTX_H__
00002 #define __ARC_SEC_EVALUATIONCTX_H__
00003 
00004 #include <list>
00005 #include <fstream>
00006 #include <arc/XMLNode.h>
00007 #include <arc/Logger.h>
00008 
00009 #include "attr/AttributeValue.h"
00010 #include "Request.h"
00011 
00012 namespace ArcSec {
00013 
00014 class RequestTuple {
00015 public:
00016   virtual RequestTuple* duplicate(const RequestTuple*) { return NULL; };
00017   virtual Arc::XMLNode& getNode() { return tuple; };
00018   RequestTuple() { };
00019   virtual ~RequestTuple(){ };
00020   virtual void erase() { };
00021 public:
00022   Subject sub;
00023   Resource res;
00024   Action act;
00025   Context ctx;
00026 protected:
00027   Arc::XMLNode tuple;
00028 };
00029 
00031 //evaluation, including Request, current time, etc.
00032 class EvaluationCtx {
00033 public:
00035   EvaluationCtx (Request* request) { req = request; };
00036 
00037   virtual ~EvaluationCtx() { };
00038   
00039   virtual Request* getRequest() const { return req; };
00040  
00041   //virtual void setRequestItem(RequestItem* reqit) { };
00042 
00043   //virtual RequestItem* getRequestItem() const { return NULL; };
00044 
00045   virtual std::list<AttributeValue*> getSubjectAttributes(std::string& id, std::string& type, std::string& issuer, std::string& category, AttributeFactory* attrfactory) { std::list<AttributeValue*> attrlist; return attrlist; };
00046 
00047   virtual std::list<AttributeValue*> getResourceAttributes(std::string& id, std::string& type, std::string& issuer, AttributeFactory* attrfactory)  { std::list<AttributeValue*> attrlist; return attrlist; };
00048 
00049   virtual std::list<AttributeValue*> getActionAttributes(std::string& id, std::string& type, std::string& issuer, AttributeFactory* attrfactory)  { std::list<AttributeValue*> attrlist; return attrlist; };
00050 
00051   virtual std::list<AttributeValue*> getContextAttributes(std::string& id, std::string& type, std::string& issuer, AttributeFactory* attrfactory)  { std::list<AttributeValue*> attrlist; return attrlist; };
00052 
00053   virtual std::list<AttributeValue*> getAttributes(std::string& reqctxpath, Arc::XMLNode& policy, std::string& data_type, AttributeFactory* attrfactory)  { std::list<AttributeValue*> attrlist; return attrlist; };
00054 
00055 private:
00056   Request* req;
00057 };
00058 
00059 } // namespace ArcSec
00060 
00061 #endif /* __ARC_SEC_EVALUATIONCTX_H__ */