Class ModelstoreBase
- java.lang.Object
-
- no.priv.bang.modeling.modelstore.backend.BuiltinAspectsBase
-
- no.priv.bang.modeling.modelstore.backend.ModelstoreBase
-
- All Implemented Interfaces:
BuiltinAspects
,Modelstore
- Direct Known Subclasses:
ModelstoreProvider
class ModelstoreBase extends BuiltinAspectsBase implements Modelstore
Class implementing Modelstore for use as a base class for Provider classes for Modelstore.
-
-
Field Summary
Fields Modifier and Type Field Description private ModelContext
context
private DateFactory
dateFactory
private List<ErrorBean>
errors
private ValueCreator
valueCreator
-
Constructor Summary
Constructors Modifier Constructor Description protected
ModelstoreBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelContext
createContext()
protected void
doActivate()
protected void
doSetValueCreator(ValueCreator valueCreator)
ModelContext
getDefaultContext()
List<ErrorBean>
getErrors()
Get the list of logged errorsValueCreator
getValueCreator()
Access factory used to createValue
andPropertyset
instances.void
logError(String message, Object fileOrStream, Exception execption)
Log an error situation that resulted in a caught exception.void
persistContext(OutputStream jsonfilestream, ModelContext context)
ModelContext
restoreContext(InputStream jsonfilestream)
void
setDateFactory(DateFactory dateFactory)
-
Methods inherited from class no.priv.bang.modeling.modelstore.backend.BuiltinAspectsBase
getAspectContainerAspectId, getGeneralObjectAspectId, getGeneralRelationshipAspectId, getMetadataAspectId, getModelAspectId, getRelationshipAspectId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface no.priv.bang.modeling.modelstore.services.BuiltinAspects
getAspectContainerAspectId, getGeneralObjectAspectId, getGeneralRelationshipAspectId, getMetadataAspectId, getModelAspectId, getRelationshipAspectId
-
-
-
-
Field Detail
-
context
private ModelContext context
-
dateFactory
private DateFactory dateFactory
-
valueCreator
private ValueCreator valueCreator
-
-
Method Detail
-
setDateFactory
public void setDateFactory(DateFactory dateFactory)
-
doSetValueCreator
protected void doSetValueCreator(ValueCreator valueCreator)
-
doActivate
protected void doActivate()
-
getDefaultContext
public ModelContext getDefaultContext()
- Specified by:
getDefaultContext
in interfaceModelstore
-
createContext
public ModelContext createContext()
- Specified by:
createContext
in interfaceModelstore
-
restoreContext
public ModelContext restoreContext(InputStream jsonfilestream)
- Specified by:
restoreContext
in interfaceModelstore
-
persistContext
public void persistContext(OutputStream jsonfilestream, ModelContext context)
- Specified by:
persistContext
in interfaceModelstore
-
logError
public void logError(String message, Object fileOrStream, Exception execption)
Description copied from interface:Modelstore
Log an error situation that resulted in a caught exception.- Specified by:
logError
in interfaceModelstore
- Parameters:
message
- a human readable message explaining where the error occurredfileOrStream
- a File or stream involved in the error, null if not relevantexecption
- the exception caught by the code logging the error
-
getErrors
public List<ErrorBean> getErrors()
Description copied from interface:Modelstore
Get the list of logged errors- Specified by:
getErrors
in interfaceModelstore
- Returns:
- a list of
ErrorBean
, return the empty list if no errors have been reported
-
getValueCreator
public ValueCreator getValueCreator()
Description copied from interface:Modelstore
Access factory used to createValue
andPropertyset
instances.- Specified by:
getValueCreator
in interfaceModelstore
- Returns:
- a
ValueCreator
that can be used to createValue
andPropertyset
instances
-
-