Arc::SecAttr Class Reference

This is an abstract interface to a security attribute. More...

#include <SecAttr.h>

Inheritance diagram for Arc::SecAttr:
Arc::MultiSecAttr

Public Member Functions

 SecAttr ()
bool operator== (const SecAttr &b) const
bool operator!= (const SecAttr &b) const
virtual operator bool () const
virtual bool Export (SecAttrFormat format, std::string &val) const
virtual bool Export (SecAttrFormat format, XMLNode &val) const
virtual bool Import (SecAttrFormat format, const std::string &val)
virtual std::string get (const std::string &id) const
virtual std::list< std::string > getAll (const std::string &id) const

Static Public Attributes

static SecAttrFormat ARCAuth
static SecAttrFormat XACML
static SecAttrFormat SAML
static SecAttrFormat GACL

Detailed Description

This is an abstract interface to a security attribute.

This class is meant to be inherited to implement security attributes. Depending on what data it needs to store inheriting classes may need to implement constructor and destructor. They must however override the equality and the boolean operators. The equality is meant to compare security attributes. The prototype implies that all attributes are comparable to all others. This behaviour should be modified as needed by using dynamic_cast operations. The boolean cast operation is meant to embody "nullness" if that is applicable to the particular type.


Member Function Documentation

virtual bool Arc::SecAttr::Export ( SecAttrFormat  format,
XMLNode val 
) const [virtual]

Convert internal structure into specified format. Returns false if format is not supported/suitable for this attribute. XML node referenced by is turned into top level element of specified format.

Reimplemented in Arc::MultiSecAttr.

virtual bool Arc::SecAttr::Export ( SecAttrFormat  format,
std::string &  val 
) const [virtual]

Convert internal structure into specified format. Returns false if format is not supported/suitable for this attribute.

virtual std::string Arc::SecAttr::get ( const std::string &  id  )  const [virtual]

Access to specific item of the security attribute. If there are few items of same id the first one is presented. It is meant to be used for tightly coupled SecHandlers and provides more effective interface than Export.

virtual std::list<std::string> Arc::SecAttr::getAll ( const std::string &  id  )  const [virtual]

Access to specific items of the security attribute. This method returns all items which have id assigned. It is meant to be used for tightly coupled SecHandlers and provides more effective interface than Export.

virtual bool Arc::SecAttr::Import ( SecAttrFormat  format,
const std::string &  val 
) [virtual]

Fills internal structure from external object of specified format. Returns false if failed to do. The usage pattern for this method is not defined and it is provided only to make class symmetric. Hence it's implementation is not required yet.

virtual Arc::SecAttr::operator bool (  )  const [virtual]

This function should return false if the value is to be considered null, e.g. if it hasn't been set or initialized. In other cases it should return true.

Reimplemented in Arc::MultiSecAttr.

bool Arc::SecAttr::operator!= ( const SecAttr b  )  const [inline]

This is a convenience function to allow the usage of "not equal" conditions and need not be overridden.

bool Arc::SecAttr::operator== ( const SecAttr b  )  const [inline]

This function should (in inheriting classes) return true if this and b are considered to represent same content. Identifying and restricting the type of b should be done using dynamic_cast operations. Currently it is not defined how comparison methods to be used. Hence their implementation is not required.


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:25 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3