Package org.oa4mp.server.qdl.storage
Class StemConverter<V extends edu.uiuc.ncsa.security.core.Identifiable>
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.data.MapConverter<V>
-
- org.oa4mp.server.qdl.storage.StemConverter<V>
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.XMLConverter<V>
- Direct Known Subclasses:
AdminClientStemMC,ApprovalStemMC,ClientStemMC,PermissionStemMC,TransactionStemMC,TXRStemMC
public abstract class StemConverter<V extends edu.uiuc.ncsa.security.core.Identifiable> extends edu.uiuc.ncsa.security.storage.data.MapConverter<V>Created by Jeff Gaynor
on 12/20/20 at 7:06 AM
-
-
Constructor Summary
Constructors Constructor Description StemConverter(edu.uiuc.ncsa.security.storage.data.MapConverter<V> mapConverter)StemConverter(edu.uiuc.ncsa.security.storage.data.SerializationKeys keys, edu.uiuc.ncsa.security.core.IdentifiableProvider<V> provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.qdl_lang.variables.QDLStemconvertToStem(Map<String,Object> map)protected voidfromList(Collection c, org.qdl_lang.variables.QDLStem stem, String key)Convert a list in java object to a stem entry, setting it correctly.VfromMap(edu.uiuc.ncsa.security.storage.data.ConversionMap<String,Object> map, V v)VfromMap(Map<String,Object> map, V v)VfromMap(org.qdl_lang.variables.QDLStem stem, V v)edu.uiuc.ncsa.security.storage.data.MapConvertergetParentMC()Parent map converter is the converter for the base object, i.e.. aConversionMapto a stored object.booleanhasParentMapConverter()protected booleanisStringKeyOK(org.qdl_lang.variables.QDLStem stem, String key)Checks that a string entry to the string exists and is not trivialprotected booleanisTimeOk(org.qdl_lang.variables.QDLStem QDLStem, String key)Checks if the time (as a long) is non-negative.protected voidsetNonNullStemValue(org.qdl_lang.variables.QDLStem stem, String key, Object value)Convenience.protected DatetoDate(org.qdl_lang.variables.QDLStem stem, String key)Convert a long in a stem entry to a date.protected ListtoList(org.qdl_lang.variables.QDLStem stem, String key)Get an attribute that is a stem list and convert it to a Java (generic) list
Used infromMap(QDLStem, Identifiable)voidtoMap(V value, Map<String,Object> data)org.qdl_lang.variables.QDLStemtoMap(V v, org.qdl_lang.variables.QDLStem stem)
-
-
-
Method Detail
-
fromMap
public V fromMap(edu.uiuc.ncsa.security.storage.data.ConversionMap<String,Object> map, V v)
- Overrides:
fromMapin classedu.uiuc.ncsa.security.storage.data.MapConverter<V extends edu.uiuc.ncsa.security.core.Identifiable>
-
getParentMC
public edu.uiuc.ncsa.security.storage.data.MapConverter getParentMC()
Parent map converter is the converter for the base object, i.e.. aConversionMapto a stored object.- Returns:
-
hasParentMapConverter
public boolean hasParentMapConverter()
-
toMap
public org.qdl_lang.variables.QDLStem toMap(V v, org.qdl_lang.variables.QDLStem stem)
-
isStringKeyOK
protected boolean isStringKeyOK(org.qdl_lang.variables.QDLStem stem, String key)Checks that a string entry to the string exists and is not trivial- Parameters:
stem-key-- Returns:
-
isTimeOk
protected boolean isTimeOk(org.qdl_lang.variables.QDLStem QDLStem, String key)Checks if the time (as a long) is non-negative. If this is supposed to be a bona fide date, then it cannot be negative.- Parameters:
QDLStem-key-- Returns:
-
toDate
protected Date toDate(org.qdl_lang.variables.QDLStem stem, String key)
Convert a long in a stem entry to a date.
Used infromMap(QDLStem, Identifiable)- Parameters:
stem-key-- Returns:
-
toList
protected List toList(org.qdl_lang.variables.QDLStem stem, String key)
Get an attribute that is a stem list and convert it to a Java (generic) list
Used infromMap(QDLStem, Identifiable)- Parameters:
stem-key-- Returns:
-
fromList
protected void fromList(Collection c, org.qdl_lang.variables.QDLStem stem, String key)
Convert a list in java object to a stem entry, setting it correctly.
I.e. The result will be stem.key := c
Used intoMap(Identifiable, QDLStem)- Parameters:
c-stem-key-
-
-