Back to index

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

#include <XACMLRequest.h>

Inheritance diagram for ArcSec::XACMLRequest:
Inheritance graph
[legend]
Collaboration diagram for ArcSec::XACMLRequest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual const char * getEvalName () const
 Get the name of corresponding evaulator.
virtual const char * getName () const
 Get the name of this request.
virtual Arc::XMLNodegetReqNode ()
virtual void setAttributeFactory (AttributeFactory *attributefactory)
 Set the attribute factory for the usage of Request.
 XACMLRequest ()
 XACMLRequest (const Source &source)
virtual ~XACMLRequest ()
virtual void make_request ()
 Create the objects included in Request according to the node attached to the Request object.
virtual ReqItemList getRequestItems () const
 Get all the RequestItem inside RequestItem container.
virtual void setRequestItems (ReqItemList sl)
 Set the content of the container.
virtual void addRequestItem (Attrs &sub, Attrs &res, Attrs &act, Attrs &ctx)
 Add request tuple from non-XMLNode.

Static Public Member Functions

static Arc::Pluginget_request (Arc::PluginArgument *arg)
 get_request (in charge of class-loading of XACMLRequest) can only accept two types of argument: NULL, XMLNode

Protected Attributes

ReqItemList rlist

Static Protected Attributes

static Arc::Logger logger

Private Attributes

AttributeFactoryattrfactory
Arc::XMLNode reqnode
Subject sub
Resource res
Action act
Context env

Detailed Description

Definition at line 16 of file XACMLRequest.h.


Constructor & Destructor Documentation

Definition at line 95 of file XACMLRequest.cpp.

                            {
  NS ns;
  ns["ra"]="urn:oasis:names:tc:xacml:2.0:context:schema:os";
  XMLNode request(ns,"ra:Request");
  request.New(reqnode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

XACMLRequest::XACMLRequest ( const Source source)

Definition at line 88 of file XACMLRequest.cpp.

                                             : Request(req) {
  req.Get().New(reqnode);
  NS ns;
  ns["ra"]="urn:oasis:names:tc:xacml:2.0:context:schema:os";
  reqnode.Namespaces(ns);
}

Here is the call graph for this function:

Definition at line 102 of file XACMLRequest.cpp.

                           {
}

Member Function Documentation

virtual void ArcSec::Request::addRequestItem ( Attrs sub,
Attrs res,
Attrs act,
Attrs ctx 
) [inline, virtual, inherited]

Add request tuple from non-XMLNode.

Reimplemented in ArcSec::ArcRequest, and ArcSec::GACLRequest.

Definition at line 66 of file Request.h.

{ };

Here is the caller graph for this function:

get_request (in charge of class-loading of XACMLRequest) can only accept two types of argument: NULL, XMLNode

Definition at line 15 of file XACMLRequest.cpp.

                                                                 {
  if(arg==NULL) return NULL;
  else {
    Arc::ClassLoaderPluginArgument* clarg =
            arg?dynamic_cast<Arc::ClassLoaderPluginArgument*>(arg):NULL;
    if(!clarg) return NULL;
    Arc::XMLNode* xarg = (Arc::XMLNode*)(*clarg);
    if(xarg==NULL) { return new ArcSec::XACMLRequest(); } // ???
    ArcSec::Source source(*xarg);
    return new ArcSec::XACMLRequest(source);
  }
}

Here is the call graph for this function:

virtual const char* ArcSec::XACMLRequest::getEvalName ( ) const [inline, virtual]

Get the name of corresponding evaulator.

Implements ArcSec::Request.

Definition at line 21 of file XACMLRequest.h.

{ };
virtual const char* ArcSec::XACMLRequest::getName ( void  ) const [inline, virtual]

Get the name of this request.

Implements ArcSec::Request.

Definition at line 24 of file XACMLRequest.h.

{ };
virtual Arc::XMLNode& ArcSec::XACMLRequest::getReqNode ( ) [inline, virtual]

Implements ArcSec::Request.

Definition at line 26 of file XACMLRequest.h.

{ return reqnode; };
virtual ReqItemList ArcSec::Request::getRequestItems ( ) const [inline, virtual, inherited]

Get all the RequestItem inside RequestItem container.

Reimplemented in ArcSec::ArcRequest, and ArcSec::GACLRequest.

Definition at line 60 of file Request.h.

{ ReqItemList list; return list; };

Here is the caller graph for this function:

void XACMLRequest::make_request ( ) [virtual]

Create the objects included in Request according to the node attached to the Request object.

Implements ArcSec::Request.

Definition at line 31 of file XACMLRequest.cpp.

                               {
  //Parse the XMLNode structure, and generate the RequestAttribute object
  if((!reqnode) || (reqnode.Size() == 0)) {
    logger.msg(ERROR,"Request is empty");
    return;
  }
  std::list<XMLNode> r = reqnode.XPathLookup("//request:Request", reqns);
  if(r.empty()) {
    logger.msg(ERROR,"Can not find <Request/> element with proper namespace");
    return;
  }
  XMLNode node = *(r.begin());

  XMLNode nd, cnd;

  //Parse the <Subject> part
  //"Catagory" need to be processed
  std::string type;
  int i;
  nd = node["Subject"];
  if(!nd) {std::cerr<<"There is no subject element in request"<<std::endl; exit(0); }
  Subject sub;
  for(i = 0;; i++) {
    cnd = nd["Attribute"][i];
    if(!cnd) break;
    sub.push_back(new RequestAttribute(cnd, attrfactory));
  }

  //Parse the <Resource> part
  nd = node["Resource"];
  Resource res;
  for(i = 0;; i++) {
    cnd = nd["Attribute"][i];
    if(!cnd) break;
    res.push_back(new RequestAttribute(cnd, attrfactory));
  }

  //Parse the <Action> part
  nd = node["Action"];
  Action act;
  for(i = 0;; i++) {
    cnd = nd["Attribute"][i];
    if(!cnd) break;
    act.push_back(new RequestAttribute(cnd, attrfactory));
  }

  //Parse the <Environment> part
  nd = node["Environment"];
  Context env;
  for(i = 0;; i++) {
    cnd = nd["Attribute"][i];
    if(!cnd) break;
    env.push_back(new RequestAttribute(cnd, attrfactory));
  }

}

Here is the call graph for this function:

virtual void ArcSec::XACMLRequest::setAttributeFactory ( AttributeFactory attributefactory) [inline, virtual]

Set the attribute factory for the usage of Request.

Implements ArcSec::Request.

Definition at line 31 of file XACMLRequest.h.

{ attrfactory = attributefactory; };
virtual void ArcSec::Request::setRequestItems ( ReqItemList  sl) [inline, virtual, inherited]

Set the content of the container.

Reimplemented in ArcSec::ArcRequest, and ArcSec::GACLRequest.

Definition at line 63 of file Request.h.

{ };

Member Data Documentation

Definition at line 53 of file XACMLRequest.h.

Definition at line 46 of file XACMLRequest.h.

Definition at line 54 of file XACMLRequest.h.

Definition at line 57 of file XACMLRequest.h.

Definition at line 49 of file XACMLRequest.h.

Definition at line 52 of file XACMLRequest.h.

ReqItemList ArcSec::Request::rlist [protected, inherited]

Definition at line 57 of file Request.h.

Definition at line 51 of file XACMLRequest.h.


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