Package services.publix.idcookie
Class IdCookieCollection
- java.lang.Object
-
- services.publix.idcookie.IdCookieCollection
-
public class IdCookieCollection extends java.lang.ObjectWrapper around a collection of JATOS ID cookies. Adds some useful methods. The number of ID cookies is limited by the jatos.idCookies.limit value in the jatos.conf.
-
-
Constructor Summary
Constructors Constructor Description IdCookieCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IdCookieModeladd(IdCookieModel idCookie)Stores the given ID cookie.protected IdCookieModelfindWithStudyResultId(long studyResultId)Returns the ID cookie to which the specified study result ID is mapped, or null if nothing maps to the ID.protected java.util.Collection<IdCookieModel>getAll()protected booleanisFull()protected IdCookieModelput(IdCookieModel idCookie)Stores the given IdCookieModel.protected IdCookieModelremove(IdCookieModel idCookie)protected intsize()java.lang.StringtoString()
-
-
-
Method Detail
-
isFull
protected boolean isFull()
-
size
protected int size()
-
add
protected IdCookieModel add(IdCookieModel idCookie) throws IdCookieAlreadyExistsException
Stores the given ID cookie. If an IdCookieModel with the same study result ID is already stored an IdCookieAlreadyExistsException is thrown. If the max number of cookies is reached an IdCookieCollectionFullException is thrown.- Throws:
IdCookieAlreadyExistsException
-
put
protected IdCookieModel put(IdCookieModel idCookie) throws IdCookieCollectionFullException
Stores the given IdCookieModel. If an ID cookie with the same study result ID is already stored it gets overwritten. If the max number of cookies is reached an IdCookieCollectionFullException is thrown.- Throws:
IdCookieCollectionFullException
-
remove
protected IdCookieModel remove(IdCookieModel idCookie)
-
getAll
protected java.util.Collection<IdCookieModel> getAll()
-
findWithStudyResultId
protected IdCookieModel findWithStudyResultId(long studyResultId)
Returns the ID cookie to which the specified study result ID is mapped, or null if nothing maps to the ID.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-