6 #ifndef WOC_PROCESSOR_TRANS_H
7 #define WOC_PROCESSOR_TRANS_H
13 #include <QStringList>
73 static bool isListType(QString t){
return t.startsWith(
"List:");}
76 if(t.startsWith(
"List:"))t=t.mid(5);
77 QStringList l=t.split(
"/",QString::SkipEmptyParts);
78 if(l.size()>0)t=l[0];
else t=
"unknown";
83 QStringList l=t.split(
"/",QString::SkipEmptyParts);
84 if(l.size()>1)
return l[1];
88 static bool isIntType(QString t){QString pt=
plainType(t);
return pt==
"int" || pt==
"int32" || pt==
"int64";}
96 static bool isAttributeType(QString t){
return t==
"astring"||t==
"int"||t==
"int32"||t==
"int64"||t==
"bool";}
100 static bool isObjectType(QString t){QString p=
plainType(t);
return p!=
"astring"&&p!=
"string"&&p!=
"int"&&p!=
"int32"&&p!=
"int64"&&p!=
"bool"&&p!=
"blob";}
124 QMap<QString,QPair<QString,QString> >
m_call;
QString callFunction(QString c) const
returns the called function
Definition: proctrans.h:44
QMap< QString, QString > m_privdoc
Definition: proctrans.h:129
QMap< QString, QString > m_indoc
Definition: proctrans.h:129
QStringList outputNames() const
returns the names of all outputs in the order of definition
Definition: proctrans.cpp:181
QString inputDoc(QString v) const
return docu of input element
Definition: proctrans.h:105
bool m_update
Definition: proctrans.h:121
NoLogMode
Log Mode: signals what kind of logging is forbidden.
Definition: proctrans.h:60
static bool isStringType(QString t)
returns true if the type is a string
Definition: proctrans.h:92
QMap< QString, QString > m_outdoc
Definition: proctrans.h:129
bool isDbUpdating() const
returns whether this transaction is considered to update the database
Definition: proctrans.h:118
available even to anonymous/unauthenticated users
Definition: proctrans.h:55
static bool isObjectType(QString t)
return true if the type is an object type
Definition: proctrans.h:100
QStringList inputNames() const
returns the names of all inputs in the order of definition
Definition: proctrans.cpp:159
static QString plainType(QString t)
returns the type without list or xml qualifiers
Definition: proctrans.h:75
default: need a valid session and the privilege
Definition: proctrans.h:51
NoLogMode m_logmode
Definition: proctrans.h:123
static bool isAttributeType(QString t)
returns true if the type is to be encoded as attribute
Definition: proctrans.h:96
NoLogMode logMode() const
Definition: proctrans.h:70
QStringList privileges() const
return privileges that exist inside this transaction
Definition: proctrans.h:115
QString name() const
returns the name of the transaction
Definition: proctrans.h:25
QList< QPair< QString, QString > > m_output
Definition: proctrans.h:125
QStringList docStrings() const
return the documentation of the transaction
Definition: proctrans.h:103
QString outputType(QString) const
returns the type of an output variable
Definition: proctrans.cpp:189
static bool isIntType(QString t)
returns true if the type is integer
Definition: proctrans.h:88
AuthMode m_mode
Definition: proctrans.h:122
QString typeSerializer(QString t) const
returns the XML serializer for Object types
Definition: proctrans.h:82
AuthMode
authentication mode
Definition: proctrans.h:49
bool hasInput(QString v) const
returns whether an input variable exists
Definition: proctrans.cpp:152
static bool isBlobType(QString t)
returns true if the type is a blob
Definition: proctrans.h:94
QMap< QString, QPair< QString, QString > > m_call
Definition: proctrans.h:124
bool isValid() const
returns whether parsing it was successful
Definition: proctrans.h:22
logging the response is forbidden
Definition: proctrans.h:66
logging the request is forbidden
Definition: proctrans.h:64
logging any data is forbidden
Definition: proctrans.h:68
internal representation of a transaction
Definition: proctrans.h:16
QStringList m_privileges
Definition: proctrans.h:126
bool m_valid
Definition: proctrans.h:121
QStringList m_docstrings
Definition: proctrans.h:128
AuthMode authMode() const
Definition: proctrans.h:57
static bool isElementType(QString t)
returns true if the type is to be encoded as element
Definition: proctrans.h:98
bool hasOutput(QString v) const
returns whether an output variable exists
Definition: proctrans.cpp:174
QString m_name
Definition: proctrans.h:120
QString outputDoc(QString v) const
return docu of output element
Definition: proctrans.h:108
default: all logging is allowed
Definition: proctrans.h:62
static bool isListType(QString t)
returns true if the type given is a list
Definition: proctrans.h:73
QString privilegeDoc(QString p) const
return docu of a privilege
Definition: proctrans.h:111
QList< QPair< QString, QString > > m_input
Definition: proctrans.h:125
static bool isBoolType(QString t)
returns true if the type is boolean
Definition: proctrans.h:90
QString callInclude(QString c) const
returns the include file of the called function
Definition: proctrans.h:46
WocTransaction(const QDomElement &)
initializes a transaction from XML
Definition: proctrans.cpp:23
only need to be authenticated, every valid user can do it
Definition: proctrans.h:53
QString inputType(QString) const
returns the type of an input variable
Definition: proctrans.cpp:167
bool hasCall(QString c) const
returns whether a specific language binding exists for a call
Definition: proctrans.h:42