com.arsdigita.populate.cms
Class AbstractCreateContentItem

java.lang.Object
  extended bycom.arsdigita.populate.cms.AbstractCreateContentItem
All Implemented Interfaces:
CreateContentItem
Direct Known Subclasses:
CreateContentPage

public abstract class AbstractCreateContentItem
extends Object
implements CreateContentItem

Copyright (C) 2001, 2002, 2003 Red Hat Inc. All Rights Reserved. The contents of this file are subject to the CCM Public License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.redhat.com/licenses/ccmpl.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

Author:
bche@redhat.com

Constructor Summary
AbstractCreateContentItem()
           
 
Method Summary
protected  com.arsdigita.cms.ImageAsset createImageAsset(String sName, com.arsdigita.cms.ContentItem parent)
          Method createImageAsset.
protected  com.arsdigita.cms.ReusableImageAsset createReusableImageAsset(String sName, com.arsdigita.cms.ContentItem parent)
          Method createImageAsset.
protected  com.arsdigita.cms.TextAsset createTextAsset(String sName, com.arsdigita.cms.ContentItem parent)
          Method createTextAsset.
protected  com.arsdigita.cms.TextAsset createTextAsset(String sName, com.arsdigita.cms.ContentItem parent, int iIndex)
          Method createTextAsset.
protected  com.arsdigita.cms.TextAsset createTextAsset(String sName, com.arsdigita.cms.ContentItem parent, String sText)
          Method createTextAsset.
protected  void finishTasks(com.arsdigita.workflow.simple.Workflow w)
          Method finishTasks.
protected  com.arsdigita.kernel.User getAdminUser()
          Method getAdminUser.
abstract  com.arsdigita.cms.ContentItem getContentItem()
          Method getContentItem.
abstract  String getContentType()
          Method getContentType.
abstract  String getContentTypeName()
          Method getContentTypeName.
abstract  void makeContent()
          Method makeContent.
protected  String makeTextBody()
          Method makeTextBody.
protected  String makeTextBody(int iIndex)
          Method makeTextBody.
abstract  void publish()
          Method publish.
abstract  void setup(String sIdentifier, com.arsdigita.cms.ContentItem parent, com.arsdigita.cms.ContentSection section)
          Method setup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCreateContentItem

public AbstractCreateContentItem()
Method Detail

setup

public abstract void setup(String sIdentifier,
                           com.arsdigita.cms.ContentItem parent,
                           com.arsdigita.cms.ContentSection section)
Description copied from interface: CreateContentItem
Method setup. Call first to do setup work

Specified by:
setup in interface CreateContentItem
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
See Also:
CreateContentItem.setup(String, ContentItem, ContentSection)

makeContent

public abstract void makeContent()
Description copied from interface: CreateContentItem
Method makeContent. Creates the content for the content item

Specified by:
makeContent in interface CreateContentItem
See Also:
CreateContentItem.makeContent()

publish

public abstract void publish()
Description copied from interface: CreateContentItem
Method publish. Publishes the content item

Specified by:
publish in interface CreateContentItem
See Also:
CreateContentItem.publish()

getContentType

public abstract String getContentType()
Description copied from interface: CreateContentItem
Method getContentType.

Specified by:
getContentType in interface CreateContentItem
Returns:
The fully qualified name of the content type we are creating. For example, com.arsdigita.cms.contenttype.article
See Also:
CreateContentItem.getContentType()

getContentTypeName

public abstract String getContentTypeName()
Description copied from interface: CreateContentItem
Method getContentTypeName.

Specified by:
getContentTypeName in interface CreateContentItem
Returns:
A pretty name for the content type we are creating. For example, article. This name should be unique among content types.
See Also:
CreateContentItem.getContentTypeName()

getContentItem

public abstract com.arsdigita.cms.ContentItem getContentItem()
Description copied from interface: CreateContentItem
Method getContentItem. Returns the created content item, or null if it has not been created yet

Specified by:
getContentItem in interface CreateContentItem
See Also:
CreateContentItem.getContentItem()

makeTextBody

protected String makeTextBody(int iIndex)
Method makeTextBody. Returns a string suitable for placing within a text asset

Parameters:
iIndex - an index to place at the beginning of the returned string in order to make it unique
Returns:
String

makeTextBody

protected String makeTextBody()
Method makeTextBody. Returns a string suitable for placing within a text asset

Returns:
String

createImageAsset

protected com.arsdigita.cms.ImageAsset createImageAsset(String sName,
                                                        com.arsdigita.cms.ContentItem parent)
Method createImageAsset. Creates an Image Asset and returns it

Parameters:
sName - name of the ImageAsset
parent - the ImageAsset's parent
Returns:
ImageAsset

createReusableImageAsset

protected com.arsdigita.cms.ReusableImageAsset createReusableImageAsset(String sName,
                                                                        com.arsdigita.cms.ContentItem parent)
Method createImageAsset. Creates an Image Asset and returns it

Parameters:
sName - name of the ImageAsset
parent - the ImageAsset's parent
Returns:
ImageAsset

createTextAsset

protected com.arsdigita.cms.TextAsset createTextAsset(String sName,
                                                      com.arsdigita.cms.ContentItem parent,
                                                      String sText)
Method createTextAsset. Creates and returns a new TextAsset

Parameters:
sName - name of the TextAsset
sText - the text of the TextAsset
parent - the parent of the TextAsset
Returns:
TextAsset

createTextAsset

protected com.arsdigita.cms.TextAsset createTextAsset(String sName,
                                                      com.arsdigita.cms.ContentItem parent)
Method createTextAsset. Creates and returns a new TextAsset with its text automatically set

Parameters:
sName - name of the TextAsset
parent - parent of the TextAsset
Returns:
TextAsset

createTextAsset

protected com.arsdigita.cms.TextAsset createTextAsset(String sName,
                                                      com.arsdigita.cms.ContentItem parent,
                                                      int iIndex)
Method createTextAsset. Creates and returns a newTextAsset. Automatically sets its text, but will use the integer iIndex to make the text unique.

Parameters:
sName - name of the TextAsset
parent - parent of the TextAsset
iIndex - integer to make the text of the TextAsset unique
Returns:
TextAsset

getAdminUser

protected com.arsdigita.kernel.User getAdminUser()
Method getAdminUser. Returns a system administrator user

Returns:
User

finishTasks

protected void finishTasks(com.arsdigita.workflow.simple.Workflow w)
Method finishTasks. Starts and finishes all the tasks in Worflow w

Parameters:
w -


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