|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.cms.installer.xml.ContentItemHelper
Helper class for processing XML input. Used to create, retrieve, and clone ContentItems based on xml input.
XMLContentItemHandler
,
ContentItemLoader
Field Summary | |
protected ContentItem |
m_item
|
protected String |
m_language
|
Constructor Summary | |
ContentItemHelper(ContentSection section)
|
Method Summary | |
ContentItem |
cloneItem(int count,
Folder parent)
|
protected ContentItem |
cloneItem(int count,
Folder parent,
boolean save)
|
protected ContentItem |
cloneItem(String name,
Folder parent,
boolean save)
|
String |
cloneName(int count)
Returns a name suitable to be used by a clone. |
ContentItem |
create()
Convenience method that creates (or retrieves) the ContentItem without saving it |
ContentItem |
create(boolean save)
Convenience method that creates (or retrives) the ContentItem and optionally saves it according to the value of save |
ContentItem |
createContentItem()
Convenience method that creates (or retrives) the ContentItem without saving it |
protected ContentItem |
createContentItem(boolean save)
Creates (or retrieves) a ContentItem of given type that can be upcasted. |
protected ContentItem |
createNewContentItem()
This method is used to create a new ContentItem. |
int |
getCloneCount()
|
ContentItem |
getContentItem()
|
protected ContentItem |
getContentItemByName(String name,
Folder parent)
Look for ContentItems with the same name |
ContentSection |
getContentSection()
|
String |
getContentType()
|
String |
getName()
|
Folder |
getParent()
|
protected ContentItem |
newCloneItem(String name,
Folder parent)
Creates and returns a new Clone for the name and parent specified. |
void |
save()
Saves the ContentItem. |
void |
set(String methodName,
String argClass,
String value)
|
void |
setBodyText(String body)
Convenience method to set the item's body text. |
void |
setCloneCount(int cloneCount)
Number of times this item should be cloned |
void |
setContentItem(ContentItem item)
|
void |
setContentSection(ContentSection section)
|
void |
setContentType(String type)
|
void |
setLanguage(String lang)
|
void |
setName(String name)
|
void |
setParent(Folder parent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ContentItem m_item
protected String m_language
Constructor Detail |
public ContentItemHelper(ContentSection section)
Method Detail |
public void setContentSection(ContentSection section)
public ContentSection getContentSection()
public void setName(String name)
public String getName()
public void setContentType(String type)
public String getContentType()
public void setParent(Folder parent)
public Folder getParent()
public void setCloneCount(int cloneCount)
public int getCloneCount()
public ContentItem getContentItem()
public void setContentItem(ContentItem item)
public void setLanguage(String lang)
public void setBodyText(String body)
Convenience method to set the item's body text. This is a no-op, subclasses should override it.
public ContentItem create()
Convenience method that creates (or retrieves) the ContentItem without saving it
createContentItem(boolean)
public ContentItem create(boolean save)
Convenience method that creates (or retrives) the ContentItem
and optionally saves it according to the value of save
createContentItem(boolean)
public ContentItem createContentItem()
Convenience method that creates (or retrives) the ContentItem without saving it
createContentItem(boolean)
public void save()
Saves the ContentItem. The parent is also set at this point, as setting the parent implicitly saves the item
protected ContentItem createContentItem(boolean save)
Creates (or retrieves) a ContentItem of given type that
can be upcasted. The new item is optionally saved if the
save
parameter is true.
createNewContentItem()
protected ContentItem createNewContentItem()
This method is used to create a new ContentItem. It does not check to see if this item already exists. The new ContentItem is not saved.
createContentItem(boolean)
public void set(String methodName, String argClass, String value)
protected ContentItem getContentItemByName(String name, Folder parent)
public ContentItem cloneItem(int count, Folder parent)
protected ContentItem cloneItem(int count, Folder parent, boolean save)
protected ContentItem cloneItem(String name, Folder parent, boolean save)
protected ContentItem newCloneItem(String name, Folder parent)
Creates and returns a new Clone for the name and parent specified. It does not check to see if the Item already exits, but creates it. Subclasses should override this method if the ContentItem requires special cloning procedures
public String cloneName(int count)
Returns a name suitable to be used by a clone. Based of the name of
the ContentItem and the parameter count
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |