130 likes | 351 Views
WSRP Interfaces Transient Properties. Overview. Transient properties are consumer managed transient state. Distinguished from Navigational Parameters in that they are state vs being inputs. Should we add in 2.0? Yes, reflect in draft 12. Transient Properties.
E N D
WSRP Interfaces Transient Properties
Overview • Transient properties are consumer managed transient state. • Distinguished from Navigational Parameters in that they are state vs being inputs. • Should we add in 2.0? Yes, reflect in draft 12 WSRP Technical Committee
Transient Properties • Transient Property: a piece of shared consumer managed state with a defined-nonpersistent lifetime declared by the producer and supplied to that producer in all non-initialization calls in its Markup port . • i.e. not initCookie() or releaseSessions() WSRP Technical Committee
Transient Properties • shared ... state: the property can be set/received by any constituent of the consumer including the declaring portlet. • consumer managed state: the consumer maintains the property and supplies it to the producer at appropriate times. • defined non-persistent lifetime: lifetimes are defined by scope (names). WSRP Technical Committee
Transient Properties • declared by the producer: the basic declaration includes a name, type, suggested default, scope. • Property uniquely described by its scope + name • supplied to that producer on all non-initialization calls in its Markup port: • PerformBlockingInteraction(), HandleEvents(), GetMarkup(), and GetResource(). WSRP Technical Committee
Scopes • wsrp:consumerSession: lifetime = consumer session with client/user <- define in v2 • wsrp:consumerRequest: lifetime = consumer request. <- do not define in v2 • wsrp:consumerApplication: lifetime = consumer active/running <- do not define in v2 WSRP Technical Committee
Structure/Details • ScopedPropertyDescription [R] QName name [R] QName type[O] string scope [O] LocalizedString label [O] LocalizedString hint [O] string capabilities[] [O] Extension extensions[] • Rather than introduce scopes for existing property usage, have this extend PropertyDescription and have the containing structure also have a ModelTypes WSRP Technical Committee
Possible Scopes • Define: • wsrp:consumerSession: duration of consumer's user session -Only one defined and required but null-able • Do not define in v2: • wsrp:consumerRequest: single consumer request • wsrp:consumerApplication: duration of active consumer. • wsrp:persistent: duration is persistent across consumer activations. • wsrp:registration: duration of this registration • Unkown scopes get a value of null WSRP Technical Committee
PortletDescription • Add a transientPropertyDescriptions field • PortletDescription …. [O] QName handledEvents[][O] ScopedPropertyDescription transientPropertyDescriptions[] [O] ModelTypes schemas [O] string userCategories[] …. WSRP Technical Committee
Property Type • Property [R] QName name [O] string xmlLang [O] Object value[] • // null is name with no value • Note: no indication of scope … the property is at the scope where the portlet defined it WSRP Technical Committee
RuntimeContext • Add transientProperties field • RuntimeContext [R] string userAuthentication [O] Key portletInstanceKey [O] string namespacePrefix [O] string interactionFieldPrefix [O] Templates templates [O] ID sessionID[O] Property transientProperties[] [O] Extension extensions[] WSRP Technical Committee
Registration Data • Declaring custom consumer scopes? • String[] customConsumerScopes • wsrp:consumerSession scope is required but not to be passed (carry this to custom mode and windowState definitions) WSRP Technical Committee
Portlet setting a value • PBIA and HandleEvents return a transientProperty array in response • No encoding in URLs • Should we allow return from getMarkup that is used in subsequent requests? No for now. WSRP Technical Committee