Back to index

nordugrid-arc-nox  1.1.0~rc6
ArcPolicy.h
Go to the documentation of this file.
00001 #ifndef __ARC_SEC_ARCPOLICY_H__
00002 #define __ARC_SEC_ARCPOLICY_H__
00003 
00004 #include <list>
00005 #include <arc/XMLNode.h>
00006 #include <arc/security/ArcPDP/policy/Policy.h>
00007 #include <arc/security/ArcPDP/alg/CombiningAlg.h>
00008 #include <arc/security/ArcPDP/alg/AlgFactory.h>
00009 #include <arc/security/ArcPDP/Evaluator.h>
00010 
00011 namespace ArcSec {
00012 
00014 class ArcPolicy : public Policy {
00015 public:
00017   ArcPolicy(void);
00018 
00020   ArcPolicy(const Arc::XMLNode node);
00021 
00023   ArcPolicy(const Arc::XMLNode node, EvaluatorContext* ctx);  
00024 
00025   virtual ~ArcPolicy();  
00026 
00027   virtual operator bool(void) const { return (bool)policynode; };
00028 
00029   virtual Result eval(EvaluationCtx* ctx);
00030 
00031   virtual void setEvaluatorContext(EvaluatorContext* evaluatorcontext) { evaluatorctx = evaluatorcontext; };
00032 
00034   virtual void make_policy();
00035 
00036   virtual MatchResult match(EvaluationCtx* ctx);
00037 
00038   virtual std::string getEffect() const { return "Not_applicable";};
00039 
00040   virtual EvalResult& getEvalResult();
00041 
00042   virtual void setEvalResult(EvalResult& res);
00043 
00044   const char* getEvalName() const;
00045 
00046   const char* getName() const;
00047 
00048   static Arc::Plugin* get_policy(Arc::PluginArgument* arg);
00049 
00050 private:
00051   //std::list<Arc::Policy*> rules;
00052   std::string id;
00053   std::string version;
00054   
00056   CombiningAlg *comalg;
00057   std::string description;
00058 
00060   EvaluatorContext* evaluatorctx;
00061 
00063   AlgFactory *algfactory;
00064 
00065   EvalResult evalres;
00066 
00068   Arc::XMLNode policynode;
00069 
00071   Arc::XMLNode policytop;
00072 
00073 protected:
00074   static Arc::Logger logger;
00075 };
00076 
00077 } // namespace ArcSec
00078 
00079 #endif /* __ARC_SEC_ARCPOLICY_H__ */
00080