Package osaf :: Package servlets :: Module repo
[hide private]
[frames] | no frames]

Module repo

source code

Classes [hide private]
  RepoResource
  ValueRenderer
At the moment, this is just a class-level container for rendering methods, where each method just returns a string
  HTMLCollectionRenderer
Functions [hide private]
 
RenderSearchForm(repoView) source code
 
RenderSearchResults(repoView, text) source code
 
RenderRoots(repoView) source code
 
ensureDebugView(repoView) source code
 
RenderViews(repoView) source code
 
RenderInheritance(repoView) source code
 
RenderKinds(repoView) source code
 
_insertItem(node, path, item) source code
 
_RenderNode(repoView, node, depth=1) source code
 
_getAllClouds(kind)
A generator which returns every cloud for a given kind.
source code
 
RenderAllClouds(repoView) source code
 
RenderClouds(repoView, kind)
Given a kind, return a representation of the default cloud
source code
 
RenderCloudItems(repoView, rootItem)
Given an item, for each related cloud, show all items that belong to the cloud.
source code
 
RenderKindQuery(repoView, item) source code
 
RenderBlock(repoView, block) source code
 
RenderItem(repoView, item) source code
 
RenderHistory(repoView, item) source code
 
_getSourceTree(coll, depth=0) source code
 
_getObjectValue(theObject, name)
Given an object and a name, get the value.
source code
 
RenderObject(repoView, theObject, objectPath, label='Object') source code
 
getItemName(item) source code
 
oddEvenRow(count) source code
 
toLink(path) source code
 
clean(s) source code
Variables [hide private]
  logger = logging.getLogger(__name__)
  indexRE = re.compile(r'(.*)\[(\d+)\]')
Function Details [hide private]

_getObjectValue(theObject, name)

source code 
Given an object and a name, get the value. If the name ends with "[\d+]", strip that off and save the index, then: If it's a regular attribute (not callable), get its value. If it's callable, call it and get the resulting value (we call twice if necessary: once with no parameters, once with the object as a parameter). Once we've got a value: if we'd gotten an index, treat the value as a list and return the index-th thing