com.indexdata.mkjsf.pazpar2.data
Class Responses

java.lang.Object
  extended by com.indexdata.mkjsf.pazpar2.data.Responses
All Implemented Interfaces:
Serializable

@SessionScoped
@Named
public class Responses
extends Object
implements Serializable

Provides references to all current data objects and has general methods for clearing certain response data.

Author:
Niels Erik
See Also:
Serialized Form

Field Summary
protected  Map<String,ResponseDataObject> dataObjects
           
 
Constructor Summary
Responses()
           
 
Method Summary
 void download(String commandName)
           
 String getActiveClients()
           
 ByTargetResponse getByTarget()
           
 ErrorInterface getCommandError()
          Returns a search command error, if any, otherwise the first error found for an arbitrary command, if any, otherwise an empty dummy error.
 List<TermResponse> getFacetTerms(String facet)
           
 List<TermResponse> getFacetTerms(String facet, int count)
           
 InitResponse getInit()
           
 RecordResponse getRecord()
           
 ResponseDataObject getResponseObject(String name)
           
 SearchResponse getSearch()
           
 ShowResponse getShow()
           
 SpResponses getSp()
           
 StatResponse getStat()
           
 TermListsResponse getTermLists()
           
 boolean hasApplicationError()
           
 boolean hasRecords()
           
 void put(String name, ResponseDataObject responseData)
           
 void resetInitAndBeyond()
          Empties all data objects populated after a service was initialized, including the init response itself but excluding a possible auth response
 void resetSearchAndBeyond()
          Empties all data objects populated after a search (including the search response itself)
 void setErrorHelper(ErrorHelper helper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataObjects

protected Map<String,ResponseDataObject> dataObjects
Constructor Detail

Responses

public Responses()
Method Detail

put

public void put(String name,
                ResponseDataObject responseData)

setErrorHelper

public void setErrorHelper(ErrorHelper helper)

hasApplicationError

public boolean hasApplicationError()

getCommandError

public ErrorInterface getCommandError()
Returns a search command error, if any, otherwise the first error found for an arbitrary command, if any, otherwise an empty dummy error.


resetSearchAndBeyond

public void resetSearchAndBeyond()
Empties all data objects populated after a search (including the search response itself)


resetInitAndBeyond

public void resetInitAndBeyond()
Empties all data objects populated after a service was initialized, including the init response itself but excluding a possible auth response


getInit

public InitResponse getInit()

getShow

public ShowResponse getShow()

getStat

public StatResponse getStat()

getRecord

public RecordResponse getRecord()

getSearch

public SearchResponse getSearch()

getTermLists

public TermListsResponse getTermLists()

getFacetTerms

public List<TermResponse> getFacetTerms(String facet,
                                        int count)

getFacetTerms

public List<TermResponse> getFacetTerms(String facet)

getByTarget

public ByTargetResponse getByTarget()

getResponseObject

public ResponseDataObject getResponseObject(String name)

hasRecords

public boolean hasRecords()

getActiveClients

public String getActiveClients()

download

public void download(String commandName)
              throws UnsupportedEncodingException,
                     IOException
Throws:
UnsupportedEncodingException
IOException

getSp

public SpResponses getSp()


Copyright © 2013. All Rights Reserved.