Class EditingSessionContext
- java.lang.Object
-
- ro.sync.ecss.extensions.api.access.EditingSessionContext
-
- All Implemented Interfaces:
ContextKeyManagerProvider
@API(type=NOT_EXTENDABLE, src=PUBLIC) public abstract class EditingSessionContext extends java.lang.Object implements ContextKeyManagerProvider
The editing session context.
An editing session correspond to an user editing a document in the editor. Custom attributes can be registered from the API which can include information about the context of the editing, e.g. the user that performs the edit, the project in whose scope the editing session was started, etc.
The session context is serializable and it serializes only the attributes whose value is serializable. The rest of the attributes are ignored.
In Web Author, attributes can be added to the editing context by using:
- URL parameters specified in the web brosers
- JavaScript
LoadingOptions
set on thesync.api.Workspace.EventType.BEFORE_EDITOR_LOADED
event handler.- The
WebappEditingSessionLifecycleListener.editingSessionAboutToBeStarted(String, String, java.net.URL, java.util.Map)
callback.- Since:
- 15.2
-
-
Constructor Summary
Constructors Constructor Description EditingSessionContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.Object
getAttribute(java.lang.String attr)
Gets the value of a custom attribute.abstract java.util.Set<java.lang.String>
getAttributes()
Returns the set of all attributes.abstract void
setAttribute(java.lang.String attr, java.lang.Object value)
Sets a custom attribute for the editing session.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ro.sync.ecss.dita.ContextKeyManagerProvider
getContextKeyManager
-
-
-
-
Method Detail
-
setAttribute
public abstract void setAttribute(java.lang.String attr, java.lang.Object value)
Sets a custom attribute for the editing session. If the attribute is already set it overrides the previous value.- Parameters:
attr
- The attribute name.value
- The attribute value.
-
getAttribute
public abstract java.lang.Object getAttribute(java.lang.String attr)
Gets the value of a custom attribute.- Parameters:
attr
- The attribute name.- Returns:
- The attribute value or
null
if the attribute was not set.
-
getAttributes
public abstract java.util.Set<java.lang.String> getAttributes()
Returns the set of all attributes.- Returns:
- The set of all attributes.
-
-