Migrate Archetype from Plone2 to Plone4.3

Hello,

I need to migrate a Archetype from Plone2 to Plone4.3. The old type is actually situated in /opt/Zope/instance1/Products/Archetypes/examples/Subscriber.py. What I have to do to migrate it? It's enough to move it to the new directory /opt/Plone/buildout-cache/eggs/Products.Archetypes-1.9.4-py2.7.egg/Products/Archetypes/examples/Subscriber.py and the restart Plone? What can do ATContentType for me? Do I have to use now ATContentType or can I still using the old Archetype?

Here the file. It's very simple.

from Products.Archetypes.public import *
from DateTime import DateTime
from Products.Archetypes.config import PKG_NAME

schema = BaseSchema + Schema((
    StringField('firstname',
                index='FieldIndex:schema',
                required=1,
                widget=StringWidget(description="Your first name",
                                    label="First name"),
               ),

    StringField('surname',
                required=1,
                index='FieldIndex:schema',
                widget=StringWidget(description="Your surname",
                                    label="Surname"),
               ),

    StringField('email',
                required=1,
                index='FieldIndex:schema',
                widget=StringWidget(description="Your personal Email address",
                                    label="Email"),
                validators=('isEmail',),
                ),
    ))

class Subscriber(BaseContent):
    """A Subscriber Object"""
    schema = schema


registerType(Subscriber, PKG_NAME)

Thanks for help and recommendations.
Bieli

So you have your own code located in the Archetypes source code tree? Sorry but this is broken, completely broken and worst programming practice. First move your code out into a dedicated policy package (which is the way to go since many, many years). Then your existing AT code is likely running under Plone 4 as well, perhaps apart from some import statements to be changed. Refer to the Plone upgrade guide but first give your broken approach where and how you maintain code. This is unsupported and completely broken-by-design.

-aj