Skip to main content

A few litle but useful adapters

Project description

Short description of ng.adapter
===============================

This package has developed as the library of small adapters for the
different dark purposes.

Adapter mtime
-------------

Adapter mtime intdends for getting object modification time. Object
modification time determine on the IPersistent level and this is an exactly
in the most cases, but sometimes we need some of hooks to know object
modification time and adapter mtime helps us in this.

Adapter mtime adapts IPersistent interface to IMTime interface. IMTime interface
has the following fields:

mtime
time of the last modification of object


Adapter path
------------

Adapter path intdents for getting path from root object to current, Adapter can adopt
any objects to IPath interface. Interface IPath provide followed fields:

path
Path from root to current object maked from attribute __name__ of object in between;

titledpath
Path from root to current object maked from titles object in between. Titles getting from
adapter title (ITitle interface);


Adapter title
-------------

Adapter title ntdends for getting object title (for any object). Adapter can adopt
any objects to ITitle interface. Interface IPath provide followed fields:

title
Object title

If current object has not title property, property title of object, adopted
ti IZopeDublinCore return instead, If adopt to IZopeDublinCore is not possible,
property __name__ or class name return instead.

Adapter has been wrote in goot component style and it's posible to write adapter
to ITitle for any specific cases.


Adapter nsinterface
-------------------

Adapter nsinterface defince nsinterface namespace to get possibility adopt current
object to any interfacr. Some syntax sample followed::

<tal:block define="path context/++nsinterface++ng.adapter.IPath/path">

</tal:block>

It usefaul, basicaly, in debugging purpose.

Adapter namechooser
-------------------

If this adapter will be actvated to some container, object, created in this
container will be accept __name__ from ITitle adapter.

To activate adappter, set interface ng.adapter.interfaces.INameChooserAble
on container.


* Sat Jan 5 2008 Andrey Orlov <dbdt@dreambot.ru> 0.1.1
- Some dependencies fixed

* Sun Dec 2 2007 Andrey Orlov <dbdt@dreambot.ru> 0.1.0
- Followed adapters added: namechooser, nsinterface, pager, path,
requestext, title

* Fr Nov 16 2007 Yegor Shershnev <y.shershnev@gmail.com> 0.0.1
- first official release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ng.adapter-0.1.1.tar.gz (18.2 kB view details)

Uploaded Source

File details

Details for the file ng.adapter-0.1.1.tar.gz.

File metadata

  • Download URL: ng.adapter-0.1.1.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ng.adapter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5e258ba21e3c213426eb5cffb9e260c4c6959bee2cc1d1f60a5866e0630fa543
MD5 d36d64cab8314f783067070eeb21d2cb
BLAKE2b-256 67a4c362bf4d60fbcb97076cae4d1d5ee374c052d37534d4f04b5259fb8be717

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page