Package io.goobi.viewer.model.cms
Class PageList
java.lang.Object
io.goobi.viewer.model.cms.PageList
A list of strings with some convenience methods. Each string is either the id of a cmsPage or a pageType name The list may be stored as a single
string containing all strings in the list separated by ;
- Author:
- Florian Alpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetPage()get the if/pageName of the first page, or an empty string if no pages existgetPage(int index) getPage.getPage.getPages()Getter for the fieldpages.Get the matchingSearchInterfacefor the first listed page.getSearch(int pageIndex) getSearch.getUrl(int pageIndex) getUrl.inthashCode()booleanisEmpty()isEmpty.iterator()voidSets the pages list to a list containing only the given stringvoidSetter for the fieldpages.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PageList
public PageList()Constructor for PageList.
-
PageList
-
PageList
Constructor for PageList.
- Parameters:
stringRep- aStringobject.
-
-
Method Details
-
toString
-
hashCode
public int hashCode() -
equals
-
getPages
Getter for the field
pages.- Returns:
- the pages
-
setPages
Setter for the field
pages.- Parameters:
pages- the pages to set
-
getPage
get the if/pageName of the first page, or an empty string if no pages exist- Returns:
- the if/pageName of the first page, or an empty string if no pages exist
-
getPage
getPage.
- Parameters:
index- a int.- Returns:
- a
Stringobject.
-
getSearch
Get the matchingSearchInterfacefor the first listed page. This is theSearchFunctionalityof that page if any exists, or otherwise theSearchBean- Returns:
- the matching
SearchInterfacefor the first listed page. This is theSearchFunctionalityof that page if any exists, or otherwise theSearchBean - Throws:
NumberFormatException- if any.DAOException- if any.
-
getSearch
getSearch.
- Parameters:
pageIndex- a int.- Returns:
- a
SearchInterfaceobject. - Throws:
NumberFormatException- if any.DAOException- if any.
-
getUrl
getUrl.
- Parameters:
pageIndex- the index of the desired page in the page list- Returns:
- the url of the page at pageIndex, relative to the host url
- Throws:
NumberFormatException- if any.DAOException- if any.
-
setPage
Sets the pages list to a list containing only the given string- Parameters:
page- aStringobject.
-
iterator
-
getPage
getPage.
- Parameters:
idString- aStringobject.- Returns:
- a
CMSPageobject. - Throws:
DAOException- if any.
-
isEmpty
public boolean isEmpty()isEmpty.
- Returns:
- a boolean.
-