global utility classes for NLPI.
Used classes:
Class diagrams:
Class diagram : Znlpi_utilitiesStaticClassDiagram
Operations:
public getParentNLPI (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.
PARENTS in object )
return object
The getParentNLPI(object) function returns the nearest parent NLPIProduct instance above this object.
Constraints: {Child of a parent}
Parameters:
public nlpi_normpath (Changes any path format into the NLPI internal (unix style) format by replacing slashes.
path in string )
return string
Parameters:
public os_normpath (Changes any path format into the os specific format by replacing slashes. Works even on M$.
path in string )
return string
Parameters:
public append_unique (Appends an element to a list only if the element is not already in the list.
element in object ,
list in object )
Parameters:
public ensure_timestamp (Introduces the Znlpi_timeStamp dictionary for that _parent (an NLPIProduct instance).
_parent in object ,
attribute in string )
return boolean
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:
public set_timestamp (Relies on the presence of a timestamp for that attribute and updates it with the current time.
_parent in object ,
attribute in string )
Parameters: