"Znlpi_utilities" class

Description

Owner: python

global utility classes for NLPI.

Used classes:

Class diagrams:

Znlpi_utilitiesZnlpi_utilitiesZnlpi_timeStampDtml

Class diagram : Znlpi_utilitiesStaticClassDiagram

Operations:

Attributes: Sub-classes:

"getParentNLPI" operation

Description

public getParentNLPI (
PARENTS in object )
return object
NLPI methods can be invoked from deep down in the Zope NLPI project folder, normally from a Znlpi_infSrcClass instance. In this case self contains not the NLPIProduct instance which holds global attributes.

The getParentNLPI(object) function returns the nearest parent NLPIProduct instance above this object.

Constraints: {Child of a parent}

Parameters:

"nlpi_normpath" operation

Description

public nlpi_normpath (
path in string )
return string
Changes any path format into the NLPI internal (unix style) format by replacing slashes.

Parameters:

"os_normpath" operation

Description

public os_normpath (
path in string )
return string
Changes any path format into the os specific format by replacing slashes. Works even on M$.

Parameters:

"append_unique" operation

Description

public append_unique (
element in object ,
list in object )
Appends an element to a list only if the element is not already in the list.

Parameters:

"ensure_timestamp" operation

Description

public ensure_timestamp (
_parent in object ,
attribute in string )
return boolean
Introduces the Znlpi_timeStamp dictionary for that _parent (an NLPIProduct instance).

The calling method must identify itself with its unique identifying attribute value so that others can access the time stamp.

Return values:

1: if there wasn't any time stamp before

0: if it has done nothing

Parameters:

"set_timestamp" operation

Description

public set_timestamp (
_parent in object ,
attribute in string )
Relies on the presence of a timestamp for that attribute and updates it with the current time.

Parameters: