|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.nurelm.nucontent.model.RepeatItem
A RepeatItem represents one "line" in a RepeatList. As such, it
can contain content and images, which can be retrieved with the
getContentSet and getImageSet functions.
Ordered lists of RepeatItems are owned by objects, which can return sorted, restricted, or full
unordered lists of RepeatListRepeatItems
| Nested Class Summary | |
|---|---|
static class |
RepeatItem.RepeatItemComparator
This inner class, implementing the java.util.Comparator
class, is used by RepeatList to sort RepeatItem
objects. |
| Constructor Summary | |
|---|---|
RepeatItem()
Creates a new RepeatItem with a unique
repeatItemId field. |
|
RepeatItem(java.util.ArrayList repeatItemList)
|
|
RepeatItem(java.lang.String repeatItemId)
For use with Migrator - let's you set everything |
|
| Method Summary | |
|---|---|
void |
addContent(java.lang.String contentId,
java.lang.String text)
Adds a new Content object to this
RepeatItem. |
void |
addFile(StandAloneFile file)
Adds a new File object to this RepeatItem. |
void |
addImage(Image image)
Adds a new Image object to this RepeatItem. |
Content |
getContent(java.lang.String contentId)
Gets a particular Content object from this
RepeatItem. |
Content |
getContentCreateIfNeeded(java.lang.String contentId,
java.lang.String defaultContent)
Gets a specified Content object, but creates a new one if it
does not exist. |
java.util.HashSet |
getContentSet()
Gets this object's complete set of content objects. |
java.util.HashSet |
getContentSetCopy()
|
StandAloneFile |
getFile(java.lang.String fileId)
Returns the File object associated with the supplied
fileId. |
java.util.HashSet |
getFileSet()
|
Image |
getImage(java.lang.String imageId)
Returns the Image object associated with the supplied
imageId. |
java.util.HashSet |
getImageSet()
Gets this object's complete set of content objects. |
java.util.HashSet |
getImageSetCopy()
|
Page |
getLinkedPage()
Returns the page linked to this item. |
java.lang.String |
getRepeatItemId()
Returns this object's unique repeatItemId. |
java.util.ArrayList |
getRepeatItemList()
|
RepeatList |
getRepeatList()
Returns the repeatList of which this item is a member. |
void |
removeContent(java.lang.String contentId)
Removes a Content object from this RepeatItem. |
void |
removeFile(java.lang.String fileId)
Removes File object from this RepeatItem. |
void |
removeImage(java.lang.String imageId)
Removes Image object from this RepeatItem. |
void |
setContentSet(java.util.Collection ce)
|
void |
setImageSet(java.util.Collection ce)
|
void |
setLinkedPage(Page linkedPage)
Sets the ID of the page linked to this item. |
void |
setRepeatItemList(java.util.ArrayList repeatItemList)
|
void |
updateContent(java.lang.String contentId,
java.lang.String text)
Updates an existing Content object in this
RepeatItem. |
void |
updateContent(java.lang.String contentId,
java.lang.String text,
java.lang.String type)
Updates an existing Content object in this
RepeatItem. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RepeatItem()
RepeatItem with a unique
repeatItemId field.
public RepeatItem(java.lang.String repeatItemId)
public RepeatItem(java.util.ArrayList repeatItemList)
| Method Detail |
public RepeatList getRepeatList()
public java.lang.String getRepeatItemId()
repeatItemId.
repeatItemId.public java.util.HashSet getContentSet()
HashSet including all of this item's Content
objects. An unordered list type was used since content has no
meaningful ordering within a RepeatItem.public void setContentSet(java.util.Collection ce)
public void setImageSet(java.util.Collection ce)
public java.util.HashSet getContentSetCopy()
public java.util.HashSet getImageSetCopy()
public java.util.HashSet getImageSet()
HashSet including all of this item's Image objects.
An unordered list type was used since content has no meaningful
ordering within a RepeatItem.public java.util.HashSet getFileSet()
public void addContent(java.lang.String contentId,
java.lang.String text)
throws DataAccessException
Content object to this
RepeatItem. If the specified content already exists,
then modify it.
contentId - The String by which this
Content object will be known. This must be unique to
the Content objects in this RepeatItem.
text - This Content object's value.
DataAccessException
public void updateContent(java.lang.String contentId,
java.lang.String text)
throws DataAccessException
Content object in this
RepeatItem.
contentId - The String by which this
Content object will be known. This must be unique to
the Content objects in this RepeatItem.
text - This Content object's value.
DataAccessException - Thrown if content is being updated for a
userId which does not exist within this
RepeatItem.
public void updateContent(java.lang.String contentId,
java.lang.String text,
java.lang.String type)
throws DataAccessException
Content object in this
RepeatItem.
contentId - The String by which this
Content object will be known. This must be unique to
the Content objects in this RepeatItem.
text - This Content object's value.type - This Content object's type.
DataAccessException - Thrown if content is being updated for a
userId which does not exist within this
RepeatItem.
public void removeContent(java.lang.String contentId)
throws DataAccessException
Content object from this RepeatItem.
contentId - The contentId of the Content
object to be removed.
DataAccessException - Thrown if content is being removed for a
userId which does not exist within this
RepeatItem.public Content getContent(java.lang.String contentId)
Content object from this
RepeatItem.
contentId - The contentId of the Content
object to be retrieved. If this item is associated with a linked
page ID, then content will be retrieved from that page instead.
Content object specified. If nothing is
found, returns null.
public Content getContentCreateIfNeeded(java.lang.String contentId,
java.lang.String defaultContent)
throws DataAccessException
Content object, but creates a new one if it
does not exist.
contentId - The contentId of the Content
object to be retrieved / created.defaultContent - The content to use if a new object must be created.
Content object specified. If nothing is
found, creates a new Content object and returns it.
DataAccessException - DOCUMENT ME!
public void addImage(Image image)
throws DataAccessException
Image object to this RepeatItem.
image - The Image object to be added.
DataAccessException - Thrown if the image already exists within this
RepeatItem.
public void removeImage(java.lang.String imageId)
throws DataAccessException
Image object from this RepeatItem.
imageId - The imageId of the object to be removed.
DataAccessException - Thrown if the image does not exist within this
RepeatItem.public Image getImage(java.lang.String imageId)
Image object associated with the supplied
imageId.
imageId - The imageId of the Image object
to be retrieved.
Image object corresponding to the
imageId passed in, or null if no such
object exists..
public void addFile(StandAloneFile file)
throws DataAccessException
File object to this RepeatItem.
file - The File object to be added.
DataAccessException - Thrown if the file already exists within this
RepeatItem.
public void removeFile(java.lang.String fileId)
throws DataAccessException
File object from this RepeatItem.
fileId - The fileId of the object to be removed.
DataAccessException - Thrown if the file does not exist within this
RepeatItem.public StandAloneFile getFile(java.lang.String fileId)
File object associated with the supplied
fileId.
fileId - The fileId of the File object
to be retrieved.
File object corresponding to the
fileId passed in, or null if no such
object exists..
public java.util.ArrayList getRepeatItemList()
throws java.lang.NullPointerException
java.lang.NullPointerExceptionpublic void setRepeatItemList(java.util.ArrayList repeatItemList)
public Page getLinkedPage()
public void setLinkedPage(Page linkedPage)
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||