Package i2p.susi.dns
Class AddressbookBean
- java.lang.Object
-
- i2p.susi.dns.BaseBean
-
- i2p.susi.dns.AddressbookBean
-
- Direct Known Subclasses:
NamingServiceBean
public class AddressbookBean extends BaseBean
-
-
Field Summary
Fields Modifier and Type Field Description protected intbeginIndexprotected Stringbookprotected LinkedList<String>deletionMarksprotected Stringdestinationprotected intendIndexprotected AddressBean[]entriesprotected Stringfilterprotected Stringhostnameprotected Stringsearchprotected static Comparator<AddressBean>sorter-
Fields inherited from class i2p.susi.dns.BaseBean
_context, action, lastSerial, PROP_PW_ENABLE, properties, serial
-
-
Constructor Summary
Constructors Constructor Description AddressbookBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgenerateLoadMessage()Format a message about filtered addressbook size, and the number of displayed entries addressbook.jsp catches the case where the whole book is empty.StringgetBegin()protected intgetBeginInt()StringgetBook()This always returns a valid book, non-null.StringgetDestination()StringgetDisplayName()StringgetEnd()protected intgetEndInt()AddressBean[]getEntries()StringgetFileName()StringgetFilter()StringgetHostname()StringgetLoadBookMessages()Load addressbook and apply filter, returning messages about this.StringgetMessages()Perform actions, returning messages about this.StringgetResultBegin()StringgetResultEnd()StringgetSearch()intgetTrClass()booleanisHasFilter()booleanisIsEmpty()booleanisNotEmpty()protected booleanisPrefiltered()Does the entries map contain only the lookup result, or must we index into it?booleanisValidBook()Because the following from addressbook.jsp fails parsing in the new EL: javax.el.ELException: Failed to parse the expression Can't figure out why, so just replace it with book.validBook: <c:if test="${book.master || book.router || book.published || book.private}"> This always returns true anyway, because getBook() always returns a valid book.protected intresultSize()voidsetBegin(String s)voidsetBook(String book)voidsetDestination(String destination)voidsetEnd(String s)voidsetFilter(String filter)voidsetHostname(String hostname)voidsetMarkedForDeletion(String name)voidsetResetDeletionMarks(String dummy)voidsetSearch(String search)voidsetTrClass(int trClass)protected inttotalSize()
-
-
-
Field Detail
-
book
protected String book
-
filter
protected String filter
-
search
protected String search
-
hostname
protected String hostname
-
destination
protected String destination
-
beginIndex
protected int beginIndex
-
endIndex
protected int endIndex
-
deletionMarks
protected final LinkedList<String> deletionMarks
-
sorter
protected static final Comparator<AddressBean> sorter
-
entries
protected AddressBean[] entries
-
-
Method Detail
-
getSearch
public String getSearch()
-
setSearch
public void setSearch(String search)
-
isHasFilter
public boolean isHasFilter()
-
setTrClass
public void setTrClass(int trClass)
-
getTrClass
public int getTrClass()
-
isIsEmpty
public boolean isIsEmpty()
-
isNotEmpty
public boolean isNotEmpty()
-
getFileName
public String getFileName()
-
getDisplayName
public String getDisplayName()
-
getEntries
public AddressBean[] getEntries()
-
getBook
public String getBook()
This always returns a valid book, non-null.
-
setBook
public void setBook(String book)
-
getLoadBookMessages
public String getLoadBookMessages()
Load addressbook and apply filter, returning messages about this.
-
generateLoadMessage
protected String generateLoadMessage()
Format a message about filtered addressbook size, and the number of displayed entries addressbook.jsp catches the case where the whole book is empty.
-
getMessages
public String getMessages()
Perform actions, returning messages about this.
-
getFilter
public String getFilter()
-
isValidBook
public boolean isValidBook()
Because the following from addressbook.jsp fails parsing in the new EL: javax.el.ELException: Failed to parse the expression Can't figure out why, so just replace it with book.validBook: <c:if test="${book.master || book.router || book.published || book.private}"> This always returns true anyway, because getBook() always returns a valid book.- Returns:
- true
- Since:
- 0.9.28
-
setFilter
public void setFilter(String filter)
-
getDestination
public String getDestination()
-
setDestination
public void setDestination(String destination)
-
getHostname
public String getHostname()
-
setResetDeletionMarks
public void setResetDeletionMarks(String dummy)
-
setMarkedForDeletion
public void setMarkedForDeletion(String name)
-
setHostname
public void setHostname(String hostname)
-
getBeginInt
protected int getBeginInt()
-
getBegin
public String getBegin()
-
getResultBegin
public String getResultBegin()
- Returns:
- beginning index into results
- Since:
- 0.8.7
-
setBegin
public void setBegin(String s)
-
getEndInt
protected int getEndInt()
-
getEnd
public String getEnd()
-
getResultEnd
public String getResultEnd()
- Returns:
- ending index into results
- Since:
- 0.8.7
-
setEnd
public void setEnd(String s)
-
isPrefiltered
protected boolean isPrefiltered()
Does the entries map contain only the lookup result, or must we index into it?- Since:
- 0.8.7
-
resultSize
protected int resultSize()
- Returns:
- the size of the lookup result
- Since:
- 0.8.7
-
totalSize
protected int totalSize()
- Returns:
- the total size of the address book
- Since:
- 0.8.7
-
-