com.arsdigita.populate.cms
Interface CreateContentItem

All Known Implementing Classes:
AbstractCreateContentItem

public interface CreateContentItem

Interface for populating a content type. To populate a database with a CMS content type, add a class that implements this interface. The class should use the setup(), makeContent(), and publish() methods to create and publish one content item of the desired content type. Then, add the class you wrote to the initializer for this package.

Author:
Bryan Che

Method Summary
 com.arsdigita.cms.ContentItem getContentItem()
          Method getContentItem.
 String getContentType()
          Method getContentType.
 String getContentTypeName()
          Method getContentTypeName.
 void makeContent()
          Method makeContent.
 void publish()
          Method publish.
 void setup(String sIdentifier, com.arsdigita.cms.ContentItem parent, com.arsdigita.cms.ContentSection section)
          Method setup.
 

Method Detail

setup

public void setup(String sIdentifier,
                  com.arsdigita.cms.ContentItem parent,
                  com.arsdigita.cms.ContentSection section)
Method setup. Call first to do setup work

Parameters:
sIdentifier - the title of the content item. This should be unique across content items
parent - the parent of the created content tems. Should usually be a Folder.
section - the content section in which to place the content item

makeContent

public void makeContent()
Method makeContent. Creates the content for the content item


publish

public void publish()
Method publish. Publishes the content item


getContentType

public String getContentType()
Method getContentType.

Returns:
The fully qualified name of the content type we are creating. For example, com.arsdigita.cms.contenttype.article

getContentTypeName

public String getContentTypeName()
Method getContentTypeName.

Returns:
A pretty name for the content type we are creating. For example, article. This name should be unique among content types.

getContentItem

public com.arsdigita.cms.ContentItem getContentItem()
Method getContentItem. Returns the created content item, or null if it has not been created yet



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:0020 UTC