PACK WOC  $VERSION$
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
WocTransaction Class Reference

internal representation of a transaction More...

#include <proctrans.h>

Public Types

enum  AuthMode { Checked, Auth, Open }
 authentication mode More...
 
enum  NoLogMode { LogAll =0, NoLogRequest =1, NoLogResponse =2, NoLogAny =3 }
 Log Mode: signals what kind of logging is forbidden. More...
 

Public Member Functions

 WocTransaction (const QDomElement &)
 initializes a transaction from XML More...
 
bool isValid () const
 returns whether parsing it was successful More...
 
QString name () const
 returns the name of the transaction More...
 
bool hasInput (QString v) const
 returns whether an input variable exists More...
 
QStringList inputNames () const
 returns the names of all inputs in the order of definition More...
 
QString inputType (QString) const
 returns the type of an input variable More...
 
bool hasOutput (QString v) const
 returns whether an output variable exists More...
 
QStringList outputNames () const
 returns the names of all outputs in the order of definition More...
 
QString outputType (QString) const
 returns the type of an output variable More...
 
bool hasCall (QString c) const
 returns whether a specific language binding exists for a call More...
 
QString callFunction (QString c) const
 returns the called function More...
 
QString callInclude (QString c) const
 returns the include file of the called function More...
 
AuthMode authMode () const
 
NoLogMode logMode () const
 
QString typeSerializer (QString t) const
 returns the XML serializer for Object types More...
 
QStringList docStrings () const
 return the documentation of the transaction More...
 
QString inputDoc (QString v) const
 return docu of input element More...
 
QString outputDoc (QString v) const
 return docu of output element More...
 
QString privilegeDoc (QString p) const
 return docu of a privilege More...
 
QStringList privileges () const
 return privileges that exist inside this transaction More...
 
bool isDbUpdating () const
 returns whether this transaction is considered to update the database More...
 

Static Public Member Functions

static bool isListType (QString t)
 returns true if the type given is a list More...
 
static QString plainType (QString t)
 returns the type without list or xml qualifiers More...
 
static bool isIntType (QString t)
 returns true if the type is integer More...
 
static bool isBoolType (QString t)
 returns true if the type is boolean More...
 
static bool isStringType (QString t)
 returns true if the type is a string More...
 
static bool isBlobType (QString t)
 returns true if the type is a blob More...
 
static bool isAttributeType (QString t)
 returns true if the type is to be encoded as attribute More...
 
static bool isElementType (QString t)
 returns true if the type is to be encoded as element More...
 
static bool isObjectType (QString t)
 return true if the type is an object type More...
 

Private Attributes

QString m_name
 
bool m_valid
 
bool m_update
 
AuthMode m_mode
 
NoLogMode m_logmode
 
QMap< QString, QPair< QString,
QString > > 
m_call
 
QList< QPair< QString, QString > > m_input
 
QList< QPair< QString, QString > > m_output
 
QStringList m_privileges
 
QStringList m_docstrings
 
QMap< QString, QString > m_indoc
 
QMap< QString, QString > m_outdoc
 
QMap< QString, QString > m_privdoc
 

Detailed Description

internal representation of a transaction

Member Enumeration Documentation

authentication mode

Enumerator
Checked 

default: need a valid session and the privilege

Auth 

only need to be authenticated, every valid user can do it

Open 

available even to anonymous/unauthenticated users

Log Mode: signals what kind of logging is forbidden.

Enumerator
LogAll 

default: all logging is allowed

NoLogRequest 

logging the request is forbidden

NoLogResponse 

logging the response is forbidden

NoLogAny 

logging any data is forbidden

Constructor & Destructor Documentation

WocTransaction::WocTransaction ( const QDomElement &  root)

initializes a transaction from XML

Member Function Documentation

AuthMode WocTransaction::authMode ( ) const
inline
QString WocTransaction::callFunction ( QString  c) const
inline

returns the called function

QString WocTransaction::callInclude ( QString  c) const
inline

returns the include file of the called function

QStringList WocTransaction::docStrings ( ) const
inline

return the documentation of the transaction

bool WocTransaction::hasCall ( QString  c) const
inline

returns whether a specific language binding exists for a call

bool WocTransaction::hasInput ( QString  v) const

returns whether an input variable exists

bool WocTransaction::hasOutput ( QString  v) const

returns whether an output variable exists

QString WocTransaction::inputDoc ( QString  v) const
inline

return docu of input element

QStringList WocTransaction::inputNames ( ) const

returns the names of all inputs in the order of definition

QString WocTransaction::inputType ( QString  v) const

returns the type of an input variable

static bool WocTransaction::isAttributeType ( QString  t)
inlinestatic

returns true if the type is to be encoded as attribute

static bool WocTransaction::isBlobType ( QString  t)
inlinestatic

returns true if the type is a blob

static bool WocTransaction::isBoolType ( QString  t)
inlinestatic

returns true if the type is boolean

bool WocTransaction::isDbUpdating ( ) const
inline

returns whether this transaction is considered to update the database

static bool WocTransaction::isElementType ( QString  t)
inlinestatic

returns true if the type is to be encoded as element

static bool WocTransaction::isIntType ( QString  t)
inlinestatic

returns true if the type is integer

static bool WocTransaction::isListType ( QString  t)
inlinestatic

returns true if the type given is a list

static bool WocTransaction::isObjectType ( QString  t)
inlinestatic

return true if the type is an object type

static bool WocTransaction::isStringType ( QString  t)
inlinestatic

returns true if the type is a string

bool WocTransaction::isValid ( ) const
inline

returns whether parsing it was successful

NoLogMode WocTransaction::logMode ( ) const
inline
QString WocTransaction::name ( ) const
inline

returns the name of the transaction

QString WocTransaction::outputDoc ( QString  v) const
inline

return docu of output element

QStringList WocTransaction::outputNames ( ) const

returns the names of all outputs in the order of definition

QString WocTransaction::outputType ( QString  v) const

returns the type of an output variable

static QString WocTransaction::plainType ( QString  t)
inlinestatic

returns the type without list or xml qualifiers

QString WocTransaction::privilegeDoc ( QString  p) const
inline

return docu of a privilege

QStringList WocTransaction::privileges ( ) const
inline

return privileges that exist inside this transaction

QString WocTransaction::typeSerializer ( QString  t) const
inline

returns the XML serializer for Object types

Member Data Documentation

QMap<QString,QPair<QString,QString> > WocTransaction::m_call
private
QStringList WocTransaction::m_docstrings
private
QMap<QString,QString> WocTransaction::m_indoc
private
QList<QPair<QString,QString> > WocTransaction::m_input
private
NoLogMode WocTransaction::m_logmode
private
AuthMode WocTransaction::m_mode
private
QString WocTransaction::m_name
private
QMap<QString,QString> WocTransaction::m_outdoc
private
QList<QPair<QString,QString> > WocTransaction::m_output
private
QMap<QString,QString> WocTransaction::m_privdoc
private
QStringList WocTransaction::m_privileges
private
bool WocTransaction::m_update
private
bool WocTransaction::m_valid
private

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