public class BookForm extends LibraryForm
libraryManager, logger
Constructor and Description |
---|
BookForm() |
Modifier and Type | Method and Description |
---|---|
String |
getAction() |
ArrayList<Author> |
getAuthors() |
String |
getAuthorString() |
String |
getClassName() |
String |
getCreated() |
String |
getEnumeratedSubjectString() |
long |
getId() |
String |
getIsbn() |
long |
getOwner() |
String |
getOwnerPhone() |
String |
getPub_date() |
String |
getPublisher() |
ArrayList<Subject> |
getSubjectList()
Getter for property subjectList.
|
String |
getSubjectListString() |
ArrayList<Subject> |
getSubjects() |
String |
getSubjectString() |
String |
getTitle() |
boolean |
isIsbn10Valid(String isbn)
Validate syntactically the ISBN 10 digits
|
boolean |
isIsbn13Valid(String isbn)
Validate syntactically the ISBN 13 digits
|
void |
setAction(String action) |
void |
setAuthors(ArrayList<Author> authors) |
void |
setAuthorString(String inString)
Takes String from Authors text area and fills authors ArrayList
with author objects constructed from the names in the \n-delimited
input string.
nb: ID fields in author objects will not be set . |
void |
setCreated(String created) |
void |
setId(long id) |
void |
setIsbn(String isbn) |
void |
setOwner(long owner) |
void |
setOwnerPhone(String ownerPhone) |
void |
setPub_date(String pub_date) |
void |
setPublisher(String publisher) |
void |
setSubjectList(ArrayList<Subject> subjectList)
Setter for property subjectList.
|
void |
setSubjects(ArrayList<Subject> subjects) |
void |
setSubjectString(String inString)
Takes String from Subjects text area and fills subjects ArrayList
with subject objects constructed from the descriptions in the
\n-delimited input string.
|
void |
setTitle(String title) |
String |
stripIsbnDashesBlanks(String isbn)
Strip any dashes and/or blanks in the isbn
so validation based on ISBN rules can be performed
|
org.apache.struts.action.ActionErrors |
validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Validate the properties that have been set from this HTTP request,
and return an
ActionErrors object that encapsulates any
validation errors that have been found. |
void |
validateIsbn(String isbn,
org.apache.struts.action.ActionErrors errors)
Validate the ISBN
Any error found is added to the errors ActionErrors
|
setLibraryManager
public String getClassName()
getClassName
in class LibraryForm
public String getCreated()
public void setCreated(String created)
public long getId()
public void setId(long id)
public String getIsbn()
public void setIsbn(String isbn)
public long getOwner()
public void setOwner(long owner)
public String getPub_date()
public void setPub_date(String pub_date)
public String getPublisher()
public void setPublisher(String publisher)
public String getTitle()
public void setTitle(String title)
public String getAuthorString()
public void setAuthorString(String inString)
inString
- String -- \n-delimited list of author full namespublic String getSubjectString()
public String getEnumeratedSubjectString()
public String getSubjectListString()
public void setSubjectString(String inString)
inString
- String -- \n-delimited list of author full namespublic org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
ActionErrors
object that encapsulates any
validation errors that have been found. If no errors are found, return
null
or an ActionErrors
object with no
recorded error messages.LibraryManagerFacade.getReaderID()
to lookup and set owner
field.validate
in class org.apache.struts.action.ActionForm
mapping
- The mapping used to select this instancerequest
- The servlet request we are processingpublic void validateIsbn(String isbn, org.apache.struts.action.ActionErrors errors)
isbn
- String -- The ISBN number to validateerrors
- ActionErrors - errors ActionErrors for this form to include any validation error(s) foundpublic boolean isIsbn10Valid(String isbn)
isbn
- String -- The ISBN number to validatepublic boolean isIsbn13Valid(String isbn)
isbn
- String -- The ISBN number to validatepublic String stripIsbnDashesBlanks(String isbn)
isbn
- String -- The ISBN number to strip dashes and/or blankspublic String getAction()
public void setAction(String action)
public String getOwnerPhone()
public void setOwnerPhone(String ownerPhone)
public ArrayList<Subject> getSubjectList()
Copyright © 2003-2017 The Virtual Library Team. All Rights Reserved.