Logo Search packages:      
Sourcecode: zope-atseng version File versions  Download package


# -*- coding: iso-8859-1 -*-


(C) 2003,2004, Andreas Jung, ZOPYX Software Development and Consulting
and Contributors
D-72070 Tübingen, Germany

Contact: andreas@andreas-jung.com

License: see LICENSE.txt

$Id: interfaces.py 976 2004-12-10 07:17:04Z ajung $

from Interface import Interface

00019 class IParentManagedSchema(Interface):
    """ mix-in class for AT content-types whose schema is managed by
        the parent container and retrieved through acquisition.

00024     def _wrap_schema(schema):
        """ return aquisition wrapped schema """

00027     def _lookupChanges(atse_schema_id):
        """ Checks if schema has changed """

00030     def Schema(schema_id=None):
        """ Retrieve schema from parent object. The client class should
            override the method as Schema(self) and then call his method
            of the baseclass with the corresponding schema_id.

00036 class ISchemaEditor(Interface):
    """ a simple TTW editor for Archetypes schemas """
00039     def atse_init():
        """ only for compat reasons """

00042     def _clear(safe=False):
        """ emply btree schema store and object parent type """

00045     def atse_registerSchema( schema_id, schema, filtered_schemas=(), 
                             undeleteable_schematas=('default', 'metadata'), 
        """ registers a working copy of a schema """

00051     def atse_registerObject( obj,
                             undeleteable_schematas=('default', 'metadata'), 
        Using that method you can register an object.
        Information needed are extracted from it. The Schema id
        is set to the portal type of the object.

00062     def atse_unregisterSchema(schema_id):
        """ unregister schema """

00065     def atse_reRegisterSchema(schema_id, schema):
        """ re-registering schema """

00068     def atse_reRegisterObject(object):
        """ re-registering object """

00071     def atse_getSchemaById(schema_id):
        """ return a schema by its schema_id """

00074     def atse_getRegisteredSchemata():
        Returns all registered schemata
00079     def atse_selectRegisteredSchema(schema_template, REQUEST=None):
00084     def atse_isSchemaRegistered(schema_id):
        """ returns True if schema exists """

00087     def atse_getDefaultSchema():
        """ returns the first schema in list """

00090     def atse_getDefaultSchemaId():
        """ returns default schema id """

00093     def atse_getSchemataNames( schema_id, filter=True):
        """ return names of all schematas """

00096     def atse_getSchemata( schema_id, name):
        """ return a schemata given by its name """

00099     def atse_addSchemata( schema_id, schema_template, name, RESPONSE=None):
        """ add a new schemata """

00102     def atse_delSchemata( schema_id, schema_template, name, RESPONSE=None):
        """ delete a schemata """

00105     def atse_delField( schema_id, schema_template, name, RESPONSE=None):
        """ remove a field from the  schema"""

00108     def atse_update( schema_id, schema_template, fielddata,  REQUEST, RESPONSE=None):
        """ update a single field"""

00111     def atse_schemataMoveLeft( schema_id, schema_template, name, RESPONSE=None):
        """ move a schemata to the left"""

00114     def atse_schemataMoveRight( schema_id, schema_template, name, RESPONSE=None):
        """ move a schemata to the right"""

00117     def atse_fieldMoveLeft( schema_id, schema_template, name, RESPONSE=None):
        """ move a field of a schemata to the left"""

00120     def atse_fieldMoveRight( schema_id, schema_template, name, RESPONSE=None):
        """ move a field of a schemata to the right"""

00123     def atse_changeSchemataForField( schema_id, schema_template, name, schemata_name, RESPONSE=None):
        """ move a field from the current fieldset to another one """

00126     def atse_getField( schema_id, name):
        """ return a field by its name """

00129     def atse_getFieldType( field):
        """ return the type of a field """

00132     def atse_formatVocabulary( field):
        """ format the DisplayList of a field to be displayed
            within a textarea.
00137     def atse_schema_baseclass( schema_id):
        """ return name of baseclass """

00140     def atse_isFieldVisible( fieldname, mode='view', schema_id=None):
        Returns True if the given field is visible
        in the given mode. Default is view.

00146     def atse_editorCanUpdate( portal_type):
        Returns True if an object was registered and
        its portal_type could be saved.

00152     def atse_updateManagedSchema( portal_type,
                                  REQUEST=None, RESPONSE=None):
        Update stored issue schema for all managed schemas.
        That can only done, if an complete object was registered.

Generated by  Doxygen 1.6.0   Back to index