Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Attributes
ArcSec::AttributeSelector Class Reference

#include <AttributeSelector.h>

Collaboration diagram for ArcSec::AttributeSelector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AttributeSelector (Arc::XMLNode &node, AttributeFactory *attr_factory)
virtual ~AttributeSelector ()
virtual std::list
< AttributeValue * > 
evaluate (EvaluationCtx *ctx)

Private Attributes

std::string type
std::string reqctxpath
Arc::XMLNode policyroot
std::string xpathver
bool present
AttributeFactoryattrfactory

Detailed Description

Definition at line 16 of file AttributeSelector.h.


Constructor & Destructor Documentation

Definition at line 11 of file AttributeSelector.cpp.

                                                                                     : present(false), 
    attrfactory(attr_factory) {
  std::string tp = (std::string)(node.Attribute("DataType"));
  if(tp.empty()) {std::cerr<<"Required DataType does not exist in AttributeSelector"<<std::endl; exit(0);}

  type = tp;

#if 0
  size_t found = tp.find_last_of("#");
  if(found!=std::string::npos) {
    type = tp.substr(found+1);
  }
  else {
    found=tp.find_last_of(":"); //urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name
    type = tp.substr(found+1);
  }
#endif

  reqctxpath = (std::string)(node.Attribute("RequestContextPath"));
  if(reqctxpath.empty()) {std::cerr<<"Required RequestContextPath does not exist in AttributeSelector"<<std::endl; exit(0);} 

std::cout<<"=====!!!!!  "<<reqctxpath<<std::endl;

  
  std::string must = node.Attribute("MustBePresent");
  if(!must.empty()) present = true;

  //get the <Policy> node
  //TODO: need to duplicate node maybe
  policyroot = node.GetRoot(); 

}

Here is the call graph for this function:

Definition at line 44 of file AttributeSelector.cpp.

                                      {
}

Member Function Documentation

std::list< AttributeValue * > AttributeSelector::evaluate ( EvaluationCtx ctx) [virtual]

Definition at line 47 of file AttributeSelector.cpp.

                                                                       {
  std::list<AttributeValue*> res;
  res = ctx->getAttributes(reqctxpath, policyroot, type, attrfactory);
  
  if(present && (res.size() ==0)) {
    //std::cerr<<"AttributeSelector requires at least one attributes from request's"<<target<<std::endl;
  }

  return res;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 31 of file AttributeSelector.h.

Definition at line 27 of file AttributeSelector.h.

Definition at line 29 of file AttributeSelector.h.

Definition at line 25 of file AttributeSelector.h.

std::string ArcSec::AttributeSelector::type [private]

Definition at line 24 of file AttributeSelector.h.

std::string ArcSec::AttributeSelector::xpathver [private]

Definition at line 28 of file AttributeSelector.h.


The documentation for this class was generated from the following files: