com.pkrete.jsip2.messages.responses
Class SIP2PatronResponse

java.lang.Object
  extended by com.pkrete.jsip2.messages.SIP2Message
      extended by com.pkrete.jsip2.messages.SIP2MessageResponse
          extended by com.pkrete.jsip2.messages.responses.SIP2PatronResponse
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SIP2PatronEnableResponse, SIP2PatronInformationResponse, SIP2PatronStatusResponse

public abstract class SIP2PatronResponse
extends SIP2MessageResponse

This abstract class is a base class of the SIP2PatronStatusResponse and the SIP2PatronInformationResponse classes.

Author:
Petteri Kivimäki
See Also:
Serialized Form

Field Summary
protected  Language language
          Language.
protected  String personalName
          Patron's name.
protected  PatronStatus status
          Patron's status.
protected  boolean validPatron
          Indicates if the patron barcode is valid.
protected  boolean validPatronPassword
          Indicates if the patron password is valid.
protected  boolean validPatronPasswordUsed
          Indicates if the validPatronPassword value was used in the response received from the ILS SIP server.
protected  boolean validPatronUsed
          Indicates if the validPatron value was used in the response received from the ILS SIP server.
 
Fields inherited from class com.pkrete.jsip2.messages.SIP2MessageResponse
data, dueDate, mediaType, ok, permanentLocation, printLine, screenMessage
 
Fields inherited from class com.pkrete.jsip2.messages.SIP2Message
bibId, checkSum, code, currencyType, currentLocation, expirationDate, feeAmount, feeType, institutionId, itemIdentifier, itemProperties, patronIdentifier, pickupLocation, sequence, titleIdentifier, transactionDate, transactionId
 
Constructor Summary
protected SIP2PatronResponse(String code, String data)
          Constructs and initializes a new SIP2PatronStatusResponse object containing the given data.
 
Method Summary
 Language getLanguage()
          Returns the language
 String getPersonalName()
          Returns the patron name.
 PatronStatus getStatus()
          Returns a PatronStatus object that contains all the information about the patron's status.
 boolean isValidPatron()
          Return true if and only if the patron barcode is valid, otherwise returns false.
 boolean isValidPatronPassword()
          Return true if and only if the patron password is valid, otherwise returns false.
 boolean isValidPatronPasswordUsed()
          Returns true if and only if the valid patron password field was used in the response message received from the ILS SIP server.
 boolean isValidPatronUsed()
          Returns true if and only if the valid patron field was used in the response message received from the ILS SIP server.
 void setLanguage(Language language)
          Sets the language.
 void setPersonalName(String personalName)
          Sets the patron name.
 void setStatus(PatronStatus status)
          Sets the patron status value that contains all the information about the patron's status.
 void setValidPatron(boolean validPatron)
          Sets the boolean value that tells if the patron barcode is valid.
 void setValidPatronPassword(boolean validPatronPassword)
          Sets the boolean value that tells if the patron password is valid.
 void setValidPatronPasswordUsed(boolean validPatronPasswordUsed)
          Sets the boolean value that tells if the valid patron password field was used in the response message received from the ILS SIP server.
 void setValidPatronUsed(boolean validPatronUsed)
          Sets the boolean value that tells if the valid patron field was used in the response message received from the ILS SIP server.
 
Methods inherited from class com.pkrete.jsip2.messages.SIP2MessageResponse
countChecksum, getData, getDueDate, getMediaType, getPermanentLocation, getPrintLine, getScreenMessage, isOk, isValid, setData, setDueDate, setMediaType, setOk, setPermanentLocation, setPrintLine, setScreenMessage
 
Methods inherited from class com.pkrete.jsip2.messages.SIP2Message
getBibId, getCheckSum, getCode, getCurrencyType, getCurrentLocation, getExpirationDate, getFeeAmount, getFeeType, getInstitutionId, getItemIdentifier, getItemProperties, getPatronIdentifier, getPickupLocation, getSequence, getTitleIdentifier, getTransactionDate, getTransactionId, isChecksum, isSequence, setBibId, setCheckSum, setCode, setCurrencyType, setCurrentLocation, setExpirationDate, setFeeAmount, setFeeType, setInstitutionId, setItemIdentifier, setItemProperties, setPatronIdentifier, setPickupLocation, setSequence, setTitleIdentifier, setTransactionDate, setTransactionId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

status

protected PatronStatus status
Patron's status.


language

protected Language language
Language.


personalName

protected String personalName
Patron's name.


validPatron

protected boolean validPatron
Indicates if the patron barcode is valid. Optional field.


validPatronUsed

protected boolean validPatronUsed
Indicates if the validPatron value was used in the response received from the ILS SIP server.


validPatronPassword

protected boolean validPatronPassword
Indicates if the patron password is valid. Optional field.


validPatronPasswordUsed

protected boolean validPatronPasswordUsed
Indicates if the validPatronPassword value was used in the response received from the ILS SIP server.

Constructor Detail

SIP2PatronResponse

protected SIP2PatronResponse(String code,
                             String data)
Constructs and initializes a new SIP2PatronStatusResponse object containing the given data.

Parameters:
code - command identifier
data - the data that the message contains
Method Detail

getStatus

public PatronStatus getStatus()
Returns a PatronStatus object that contains all the information about the patron's status.

Returns:
PatronStatus containing all the information about the patron's status

setStatus

public void setStatus(PatronStatus status)
Sets the patron status value that contains all the information about the patron's status.

Parameters:
status - new value

getLanguage

public Language getLanguage()
Returns the language

Returns:
language

setLanguage

public void setLanguage(Language language)
Sets the language.

Parameters:
language - new value

getPersonalName

public String getPersonalName()
Returns the patron name.

Returns:
name of the patron

setPersonalName

public void setPersonalName(String personalName)
Sets the patron name.

Parameters:
personalName - new value

isValidPatron

public boolean isValidPatron()
Return true if and only if the patron barcode is valid, otherwise returns false.

Returns:
true if patron barcode is valid, otherwise false

setValidPatron

public void setValidPatron(boolean validPatron)
Sets the boolean value that tells if the patron barcode is valid.

Parameters:
validPatron - true or false

isValidPatronPassword

public boolean isValidPatronPassword()
Return true if and only if the patron password is valid, otherwise returns false.

Returns:
true if patron password is valid, otherwise false

setValidPatronPassword

public void setValidPatronPassword(boolean validPatronPassword)
Sets the boolean value that tells if the patron password is valid.

Parameters:
validPatronPassword - true or false

isValidPatronUsed

public boolean isValidPatronUsed()
Returns true if and only if the valid patron field was used in the response message received from the ILS SIP server.

Returns:
true if the valid patron field was used in the response message, otherwise false

setValidPatronUsed

public void setValidPatronUsed(boolean validPatronUsed)
Sets the boolean value that tells if the valid patron field was used in the response message received from the ILS SIP server.

Parameters:
validPatronUsed - true or false

isValidPatronPasswordUsed

public boolean isValidPatronPasswordUsed()
Returns true if and only if the valid patron password field was used in the response message received from the ILS SIP server.

Returns:
true if the valid patron password field was used in the response message, otherwise false

setValidPatronPasswordUsed

public void setValidPatronPasswordUsed(boolean validPatronPasswordUsed)
Sets the boolean value that tells if the valid patron password field was used in the response message received from the ILS SIP server.

Parameters:
validPatronPasswordUsed - true or false


Copyright © 2012-2014. All Rights Reserved.