Class
zope.app.component.vocabulary.UtilityNameTerm

Simple term that provides a utility name as a value.

>>> t1 = UtilityNameTerm('abc')
>>> t2 = UtilityNameTerm(u'\xC0\xDF\xC7')
>>> t1.value
u'abc'
>>> t2.value
u'\xc0\xdf\xc7'
>>> t1.title
u'abc'
>>> repr(t2.title)
"u'\\xc0\\xdf\\xc7'"
>>> ITitledTokenizedTerm.providedBy(t1)
True

The tokens used for form values are Base-64 encodings of the names, with the letter 't' prepended to ensure the unnamed utility is supported:

>>> t1.token
'tYWJj'
>>> t2.token
'tw4DDn8OH'

The unnamed utility is given an artificial title for use in user interfaces:

>>> t3 = UtilityNameTerm(u'')
>>> t3.title
u'(unnamed utility)'

Base classes

There are no base classes.

Implemented Interfaces

Attributes/Properties

Methods

There are no methods in this class.

Known Subclasses

There are no known subclasses.