Tronverte
API documentation for Tronverte products.
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes
tronverte.core.status.Status Class Reference

Inherited from tronverte.core.enum.Enum, tronverte.core.status.Stat, tronverte.core.status.Level, tronverte.core.status.Code. More...

Inherits tronverte.core.status.Stat, tronverte.core.status.Level, and tronverte.core.status.Code.

List of all members.

Public Member Functions

def __init__
def __nonzero__
def __lt__
def set
def setMessage
def setStat
def setLevel
def setCode
def setName
def getName
def clear
def clearMessages
def display

Public Attributes

 stat
 Success member of the class, whether it has failed or succeeded.
 level
 Exception level.
 code
 Exception code, why the process has failed.
 showInfoMessages
 Whether info messages will be printed when display method is called.
 showWarningMessages
 Whether warning messages will be printed when display method is called.
 showErrorMessages
 Whether error messages will be printed when display method is called.
 name
 Name of the instance.

Detailed Description

Inherited from tronverte.core.enum.Enum, tronverte.core.status.Stat, tronverte.core.status.Level, tronverte.core.status.Code.

import tronverte.core.status as tronverte_core_status
reload(tronverte_core_status)
stat = tronverte_core_status.Status()

Status class provides functionalities to handle exceptions in our API classes. Although we provide Status class, API users do not have to use it. It's optional but highly suggested.

When a command fails you can get detailed information about it via Status class. When you see "stat" in a method, you can pass an instance of Status class to obtain detailed information.

Constructor & Destructor Documentation

def tronverte.core.status.Status.__init__ (   self,
  showInfoMessages = True,
  showWarningMessages = True,
  showErrorMessages = True,
  name = '' 
)
# DESCRIPTION
Default constructor.

# ARGUMENTS
showInfoMessages    | bool | True | in | * | arg | Whether to show info messages when "display" method is called.
showWarningMessages | bool | True | in | * | arg | Whether to show warning messages when "display" method is called.
showErrorMessages   | bool | True | in | * | arg | Whether to show error messages when "display" method is called.
name                | str  | ''   | in | * | arg | Name of the instance.

# RETURN
None

Member Function Documentation

def tronverte.core.status.Status.__lt__ (   self,
  status 
)
# DESCRIPTION:
Rich comparison operator (<) overload for copying one instance to another.

# ARGUMENTS
status | tronverte.core.status.Status | None | in | + | arg | Class instance.

# RETURN
None
# DESCRIPTION:
Boolean operator overload for status checking.

# ARGUMENTS
None.

# RETURN
bool | Result of the query.
def tronverte.core.status.Status.clear (   self,
  clearPreviousMessages = False 
)
# DESCRIPTION
Clear the instance. This method set the instance for a successfull operation as well.

# ARGUMENTS
clearPreviousMessages | bool | False | in | * | arg | Whether clear previously added messages.

# RETURN
None
# DESCRIPTION
Clear previously added messages.

# ARGUMENTS
None.

# RETURN
None
def tronverte.core.status.Status.display (   self,
  displayName = False 
)
# DESCRIPTION
Display messages.

# ARGUMENTS
displayName | bool | False | in | * | arg | Whether to display name of the instance.

# RETURN
None
# DESCRIPTION
Get name of the instance.

# ARGUMENTS
None.

# RETURN
str | Name og the instance.
def tronverte.core.status.Status.set (   self,
  message,
  stat = Stat.sFailure,
  level = Level.lError,
  code = None,
  clearPreviousMessages = False 
)
# DESCRIPTION
Set message along with other parameters. This method can be used to set messages for failed operations. However stat, level and code arguments make it customizable.

# ARGUMENTS
message               | str                  | None     | in | + | arg | Message.
stat                  | tronverte.core.Stat  | sFailure | in | * | arg | Stat from tronverte.core.Stat class.
level                 | tronverte.core.Level | lError   | in | * | arg | Level from tronverte.core.Level class.
code                  | tronverte.core.Code  | None     | in | * | arg | Code from tronverte.core.Code class.
clearPreviousMessages | bool                 | False    | in | * | arg | Whether clear previously added messages.

# RETURN
None
def tronverte.core.status.Status.setCode (   self,
  code 
)
# DESCRIPTION
Set code.

# ARGUMENTS
code | tronverte.core.status.Code | None | in | + | arg | Any member from the relevant class.

# RETURN
None
def tronverte.core.status.Status.setLevel (   self,
  level 
)
# DESCRIPTION
Set level.

# ARGUMENTS
level | tronverte.core.status.Level | None | in | + | arg | lNormal, lWarning or lError.

# RETURN
None
def tronverte.core.status.Status.setMessage (   self,
  message,
  clearPreviousMessages = True 
)
# DESCRIPTION
Set message. This method can be used to set messages for successful operations. Stat, level and code members of the instance will automatically be set for a successfull operation.

# ARGUMENTS
message               | str  | None  | in | + | arg | Message.
clearPreviousMessages | bool | False | in | * | arg | Whether clear previously added messages.

# RETURN
None
def tronverte.core.status.Status.setName (   self,
  name 
)
# DESCRIPTION
Set name of the istance.

# ARGUMENTS
name | str | None | in | + | arg | Name of the istance.

# RETURN
None
def tronverte.core.status.Status.setStat (   self,
  stat 
)
# DESCRIPTION
Set stat.

# ARGUMENTS
stat | tronverte.core.status.Status | None | in | + | arg | sSuccess or sFailure.

# RETURN
None

Member Data Documentation

Exception code, why the process has failed.

Exception level.

Name of the instance.

Whether error messages will be printed when display method is called.

Whether info messages will be printed when display method is called.

Whether warning messages will be printed when display method is called.

Success member of the class, whether it has failed or succeeded.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables