Package org.webappos.webmem
Interface IWebMemory
-
- All Superinterfaces:
RAAPI
public interface IWebMemory extends RAAPI
Provides access to web memory from the server-side Java code. IWebMemory is an extension of the universal model repository interface RAAPI (Repository Access API).- See Also:
- RAAPI Docs, Notes on RAAPI
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
creatingSubmitLink(long rSourceObject, long rTargetObject, long rAssociationEnd)
Checks whether the given link to be created is a submit link (i.e., the link used to invoke web calls).default <T> T
elevate(java.lang.Class<T> javaObjectsFactoryClass)
Elevates this web memory by initializing a factory of Java objects acting as wrappers for web memory objects; creates the corresponding classes (with their attributes and associations) in web memory, if they do not exist.default <T> T
elevate(java.lang.Class<T> javaObjectsFactoryClass, boolean create)
Elevates this web memory by initializing a factory of Java objects acting as wrappers for web memory objects.void
flush()
If this web memory has attached synchronizers, flushes them.org.webappos.webmem.WebMemoryContext
getContext()
Returns the current (temporal) context.java.lang.String
getUUID()
Obtains a stringified reference (unique identifier, UUID) to the current web memory.boolean
isCommand(long rObject)
Checks whether the given object is a command (e.g., a web call action with the same name exists and will be called when this object is linked to the submitter).boolean
isEvent(long rObject)
Checks whether the given object is an event (e.g., web calls actions can be registered as listeners to this event).boolean
isSubmitter(long rObject)
Checks whether the given object is a submitter.default long
replicateObject(long rObject)
Replicates the given object (copies attribute values and sets links to the same linked objects).void
setContext(org.webappos.webmem.WebMemoryContext ctx)
Sets (temporarily) the context for this web memory.-
Methods inherited from interface lv.lumii.tda.raapi.RAAPI
callSpecificOperation, createAdvancedAssociation, createAssociation, createAttribute, createClass, createDirectedAssociation, createGeneralization, createLink, createObject, createOrderedLink, deleteAssociation, deleteAttribute, deleteAttributeValue, deleteClass, deleteGeneralization, deleteLink, deleteObject, deserializeReference, excludeObjectFromClass, findAssociationEnd, findAttribute, findClass, findPrimitiveDataType, freeIterator, freeReference, getAttributeDomain, getAttributeName, getAttributeType, getAttributeValue, getClassName, getInverseAssociationEnd, getIteratorForAllAttributes, getIteratorForAllClassObjects, getIteratorForAllIngoingAssociationEnds, getIteratorForAllLinguisticInstances, getIteratorForAllOutgoingAssociationEnds, getIteratorForClasses, getIteratorForDirectAttributes, getIteratorForDirectClassObjects, getIteratorForDirectIngoingAssociationEnds, getIteratorForDirectLinguisticInstances, getIteratorForDirectObjectClasses, getIteratorForDirectOutgoingAssociationEnds, getIteratorForDirectSubClasses, getIteratorForDirectSuperClasses, getIteratorForLinguisticClasses, getIteratorForLinkedObjects, getIteratorForObjectsByAttributeValue, getIteratorLength, getLinguisticClassFor, getLinkedObjectPosition, getPrimitiveDataTypeName, getRoleName, getSourceClass, getTargetClass, includeObjectInClass, isAdvancedAssociation, isAssociationEnd, isAttribute, isClass, isComposition, isDerivedClass, isDirectSubClass, isKindOf, isLinguistic, isPrimitiveDataType, isTypeOf, linkExists, moveObject, resolveIterator, resolveIteratorFirst, resolveIteratorNext, serializeReference, setAttributeValue
-
-
-
-
Method Detail
-
getUUID
java.lang.String getUUID()
Obtains a stringified reference (unique identifier, UUID) to the current web memory. The UUID can be used as an inter-process web memory reference (e.g., when connecting to web memory at the Java side from the native code via the native library webmem.dll/.so/.dylib).- Returns:
- a string representing the current web memory
-
flush
void flush()
If this web memory has attached synchronizers, flushes them.
-
setContext
void setContext(org.webappos.webmem.WebMemoryContext ctx)
Sets (temporarily) the context for this web memory. The context is used to provide more detail for further web call seeds originated from the current web call.- Parameters:
ctx
- the context (~the last user used to invoke something on this web memory)
-
getContext
org.webappos.webmem.WebMemoryContext getContext()
Returns the current (temporal) context.- Returns:
- the context last set (or null)
-
isSubmitter
boolean isSubmitter(long rObject)
Checks whether the given object is a submitter.- Parameters:
rObject
- the object to check- Returns:
- the result of the check
-
isEvent
boolean isEvent(long rObject)
Checks whether the given object is an event (e.g., web calls actions can be registered as listeners to this event).- Parameters:
rObject
- the object to check- Returns:
- the result of the check
-
isCommand
boolean isCommand(long rObject)
Checks whether the given object is a command (e.g., a web call action with the same name exists and will be called when this object is linked to the submitter).- Parameters:
rObject
- the object to check- Returns:
- the result of the check
-
creatingSubmitLink
default boolean creatingSubmitLink(long rSourceObject, long rTargetObject, long rAssociationEnd)
Checks whether the given link to be created is a submit link (i.e., the link used to invoke web calls).- Parameters:
rSourceObject
- the source object referencerTargetObject
- the target object referencerAssociationEnd
- the target association end reference- Returns:
- whether the operation succeeded
-
replicateObject
default long replicateObject(long rObject)
Replicates the given object (copies attribute values and sets links to the same linked objects). Useful, when the object is about to be deleted, but we wish to keep it for us.- Parameters:
rObject
- an object to replicate- Returns:
- a reference to the new object
-
elevate
default <T> T elevate(java.lang.Class<T> javaObjectsFactoryClass, boolean create)
Elevates this web memory by initializing a factory of Java objects acting as wrappers for web memory objects.- Type Parameters:
T
- is the factory class (generated by ecore2java or mmd2java)- Parameters:
javaObjectsFactoryClass
- a factory class (usually, generated by ecore2java)create
- create classes (and their attributes and associations) in web memory if they do not exist- Returns:
- a new instance of the factory class, or null on error
-
elevate
default <T> T elevate(java.lang.Class<T> javaObjectsFactoryClass)
Elevates this web memory by initializing a factory of Java objects acting as wrappers for web memory objects; creates the corresponding classes (with their attributes and associations) in web memory, if they do not exist.- Type Parameters:
T
- is the factory class (generated by ecore2java or mmd2java)- Parameters:
javaObjectsFactoryClass
- a factory class (usually, generated by ecore2java)- Returns:
- a new instance of the factory class, or null on error
-
-