|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.nurelm.nucontent.model.RepeatList
A RepeatList contains an list of RepeatItems. This
object contains methods to retrieve RepeatItems, which can be
returned in their natural ordering, restricted based on content values, or
ordered based on certain content fields.
A RepeatList can be thought of as a table, with each row
represented by a RepeatItems. Fields in each row of this
hypothetical table are represented by Content and
Image items, and column names correspond to each
Content and Image item's contentId
and imageId.
Here's a summary of how RepeatLists fit into a
Page's object structure:
Pages contain an unordered collection of
RepeatLists.
RepeatLists contain an ordered list of
RepeatItems.
RepeatItems contain unordered lists of 1)
Content objects, and 2) Image objects.
| Constructor Summary | |
|---|---|
protected |
RepeatList()
Does nothing, used nowhere, but eliminates JDO complie-time warning about not having a zero-args constructor. |
|
RepeatList(java.lang.String repeatListId)
Create a new RepeatList. |
|
RepeatList(java.lang.String repeatListId,
java.util.ArrayList repeatItemList)
Create a new RepeatList. |
|
RepeatList(java.lang.String repeatListId,
java.lang.String linkedTemplateId)
Create a new RepeatList linked to the template indicated. |
| Method Summary | |
|---|---|
RepeatItem |
addRepeatItem()
Adds a new RepeatItem at the end of the list of
RepeatItems |
RepeatItem |
addRepeatItem(java.util.ArrayList repeatItemList)
Allows an entire list of repeat items to be added. |
RepeatItem |
addRepeatItem(int index)
Adds a new RepeatItem at the location specified by the
supplied index. |
RepeatItem |
addRepeatItem(int index,
Page linkedPage)
Adds a new RepeatItem at the location specified by the
supplied index. |
RepeatItem |
addRepeatItem(java.lang.String repeatItemId)
Adds a new RepeatItem at the end of the list of
RepeatItems with the specified id. |
boolean |
containsLinkedPage(Page linkedPage)
Determines if this repeat list contains a repeat item that is linked to the page specified. |
RepeatItem |
copyRepeatItem(int index)
Adds a new RepeatItem at the location specified by the
supplied index. |
java.lang.String |
getContentType(java.lang.String restrictId)
|
java.lang.String |
getLinkedTemplateId()
Returns this RepeatList's linked template ID. |
RepeatItem |
getRepeatItem(int index)
Get a particular RepeatItem object. |
RepeatItem |
getRepeatItem(java.lang.String repeatItemId)
Get a particular RepeatItem object. |
RepeatItem |
getRepeatItem(java.lang.String contentId,
java.lang.String contentText)
Get the first RepeatItem that contains content with the
specified ID and value. |
RepeatItem |
getRepeatItemCreateIfNeeded(java.lang.String repeatItemId)
Get a particular RepeatItem object, and create a new one
if it does not exist. |
int |
getRepeatItemIndex(java.lang.String repeatItemId)
Returns the index of the specified RepeatItem in this
RepeatList's list. |
java.util.List |
getRepeatItemList()
Returns this RepeatList's collection of
RepeatItems. |
java.util.List |
getRepeatItemList(java.lang.String restrictIds,
java.lang.String restrictValues,
java.lang.String sortByIds,
java.lang.String sortByDirections)
Returns this RepeatList's collection of
RepeatItems. |
java.util.List |
getRepeatItemList(java.lang.String searchIds,
java.lang.String searchValues,
java.lang.String sortByIds,
java.lang.String sortByDirections,
boolean isCaseSensitive)
Returns this RepeatList's collection of
RepeatItems. |
int |
getRepeatItemListSize()
Returns the number of items contained in this repeat list. |
java.lang.String |
getRepeatListId()
Returns this RepeatList's identifier. |
void |
moveRepeatItemDown(int index)
Moving up means giving the RepeatItem a smaller index. |
void |
moveRepeatItemUp(int index)
Moving up means giving the RepeatItem a larger index. |
boolean |
removeDuplicatesIfExist()
|
void |
removeRepeatItem(int index)
Removes a RepeatItem, and any corresponding
Image or Content items. |
void |
removeRepeatItem(int index,
Page page)
Removes a RepeatItem, and any corresponding
Image or Content items. |
void |
removeRepeatItem(java.lang.String repeatItemId)
Remove the repeat item with the specified id. |
void |
removeRepeatItemsByLinkedPageId(java.lang.String linkedPageId)
Removes all repeat items with the specified linkedPageId |
void |
setLinkedTemplateId(java.lang.String linkedTemplateId)
Sets this RepeatList's linked template ID. |
int |
size()
Returns the number of RepeatItem objects in this
RepeatList. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected RepeatList()
public RepeatList(java.lang.String repeatListId)
RepeatList.
repeatListId - The id associated with this RepeatList.
Must be unique among other RepeatLists in
the current Page.
public RepeatList(java.lang.String repeatListId,
java.lang.String linkedTemplateId)
RepeatList linked to the template indicated.
repeatListId - The id associated with this RepeatList.
Must be unique among other RepeatLists in
the current Page.linkedTemplateId - The templateId of a page with which to link this
list.
public RepeatList(java.lang.String repeatListId,
java.util.ArrayList repeatItemList)
RepeatList.
repeatListId - The id associated with this RepeatList.
Must be unique among other RepeatLists in
the current Page.repeatItemList - A list of repeatItem objects.| Method Detail |
public java.lang.String getRepeatListId()
RepeatList's identifier.
RepeatList's identifier.public java.lang.String getLinkedTemplateId()
RepeatList's linked template ID.
RepeatList's linked template ID.public boolean containsLinkedPage(Page linkedPage)
linkedPage - The page to determine if this repeat list contains.
public void setLinkedTemplateId(java.lang.String linkedTemplateId)
RepeatList's linked template ID.
public int size()
RepeatItem objects in this
RepeatList.
RepeatItem objects in this
RepeatList.public java.util.List getRepeatItemList()
RepeatList's collection of
RepeatItems.
The returned collection will be sorted in its natural order, and will not be restricted.
RepeatList's collection of
RepeatItems sorted in natural order.public int getRepeatItemListSize()
public java.util.List getRepeatItemList(java.lang.String restrictIds,
java.lang.String restrictValues,
java.lang.String sortByIds,
java.lang.String sortByDirections)
throws DataAccessException
RepeatList's collection of
RepeatItems.
The returned collection will be sorted and restricted based on the input parameters.
restrictIds - A comma-separated list of Content object
ids which will be used to restrict the returned collection. Use an
empty string if you do not want to restrict results.restrictValues - A comma-separated list of Content
object values which will be used to restrict the returned
collection. The list must contain one value corresponding to each
value in the restictIds list. sortByIds - A comma-separated list of Content object ids
which will be used to sort the returned collection. Use an empty
string if you do not want to sort results.sortByDirections - A comma-separated list of directions will be used
to sort the returned collection. Each direction can be either
"ascending" or "descending".
RepeatItem
objects.
DataAccessException - Thrown if anything bad happens during the
query.
public java.util.List getRepeatItemList(java.lang.String searchIds,
java.lang.String searchValues,
java.lang.String sortByIds,
java.lang.String sortByDirections,
boolean isCaseSensitive)
throws DataAccessException
RepeatList's collection of
RepeatItems.
The returned collection will be sorted and searched based on the input parameters.
searchIds - A comma-separated list of Content object
ids which will be used to search the returned collection. Use an
empty string if you do not want to search results.searchValues - A comma-separated list of Content
object values which will be used to search the returned
collection. The list must contain one value corresponding to each
value in the searchIds list. sortByIds - A comma-separated list of Content object ids
which will be used to sort the returned collection. Use an empty
string if you do not want to sort results.sortByDirections - A comma-separated list of directions will be used
to sort the returned collection. Each direction can be either
"ascending" or "descending". isCaseSensitive - True if search should be case sensitive.
RepeatItem
objects.
DataAccessException - Thrown if anything bad happens during the
query.public int getRepeatItemIndex(java.lang.String repeatItemId)
RepeatItem in this
RepeatList's list.
RepeatItem's
position in this RepeatList.public RepeatItem getRepeatItem(int index)
RepeatItem object.
index - The index of the object to be retrieved (starts at 0).
RepeatItem object corresponding to the
repeatItemId specified. public RepeatItem getRepeatItem(java.lang.String repeatItemId)
RepeatItem object.
repeatItemId - The id of the object to be retrieved.
RepeatItem object corresponding to the
repeatItemId specified.
public RepeatItem getRepeatItem(java.lang.String contentId,
java.lang.String contentText)
RepeatItem that contains content with the
specified ID and value.
contentId - The contentId of the content to seek.contentText - The value of the text of the content to seek.
RepeatItem corresponding to the values
specified.public java.lang.String getContentType(java.lang.String restrictId)
public RepeatItem getRepeatItemCreateIfNeeded(java.lang.String repeatItemId)
RepeatItem object, and create a new one
if it does not exist.
repeatItemId - The id of the object to be retrieved.
RepeatItem object corresponding to the
repeatItemId specified. public RepeatItem addRepeatItem()
RepeatItem at the end of the list of
RepeatItems
RepeatItem just added.public RepeatItem addRepeatItem(java.lang.String repeatItemId)
RepeatItem at the end of the list of
RepeatItems with the specified id.
repeatItemId - The id of the new repeatItem to add.
RepeatItem just added.public RepeatItem addRepeatItem(int index)
RepeatItem at the location specified by the
supplied index.
index - The position in the collection of RepeatItems at
which to add a new object.
RepeatItem just added.
public RepeatItem addRepeatItem(int index,
Page linkedPage)
RepeatItem at the location specified by the
supplied index.
index - The position in the collection of RepeatItems at
which to add a new object.
RepeatItem just added.public RepeatItem addRepeatItem(java.util.ArrayList repeatItemList)
public RepeatItem copyRepeatItem(int index)
RepeatItem at the location specified by the
supplied index.
index - The position in the collection of RepeatItems at
which to add a new object.
RepeatItem just added.
public void removeRepeatItem(int index,
Page page)
RepeatItem, and any corresponding
Image or Content items.
index - The position of the object to be removed.page - The Page object that is associated with the
RepeatItem.public void removeRepeatItem(java.lang.String repeatItemId)
public void removeRepeatItemsByLinkedPageId(java.lang.String linkedPageId)
linkedPageId - The linkedPageId to search for when finding repeat
items to remove.public boolean removeDuplicatesIfExist()
public void removeRepeatItem(int index)
RepeatItem, and any corresponding
Image or Content items.
index - The position of the object to be removed.public void moveRepeatItemUp(int index)
RepeatItem a larger index. If the
supplied index is out of bounds, then an
IndexOutOfBoundsException is thrown.
index - The position of the object to be moved up.public void moveRepeatItemDown(int index)
RepeatItem a smaller index. If the
supplied index is out of bounds, then an
IndexOutOfBoundsException is thrown.
index - The index of the object to be moved down.
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||