public class ClientState extends Object
Constructor and Description |
---|
ClientState(SlingHttpServletRequest slingRequest) |
Modifier and Type | Method and Description |
---|---|
JSONObject |
getState(String selector)
Returns all attributes from the global namespace for the given selector
|
JSONObject |
getState(String selector,
String namespace)
Returns all attributes from a given namespace for the given selector
|
JSONObject |
getState(String selector,
String[] attributes)
Returns all attributes which keys are included in the attributes array
from the global namespace for the given selector
|
JSONObject |
getState(String selector,
String[] attributes,
String namespace)
Returns all attributes which keys are included in the attributes array
from a given namespace for the given selector
|
boolean |
restoreState(AttrBuilder attr,
String selector)
Adds all attributes from the global namespace for the given selector to an AttrBuilder
|
boolean |
restoreState(AttrBuilder attr,
String selector,
String namespace)
Adds all attributes from a given namespace for the given selector to an AttrBuilder
|
boolean |
restoreState(AttrBuilder attr,
String selector,
String[] attributes)
Adds all attributes which keys are included in the attributes array
from the global namespace for the given selector to an AttrBuilder
|
boolean |
restoreState(AttrBuilder attr,
String selector,
String[] attributes,
String namespace)
Adds all attributes which keys are included in the attributes array
from a given namespace for the given selector to an AttrBuilder
|
public ClientState(SlingHttpServletRequest slingRequest)
public JSONObject getState(String selector)
selector
- the selectorpublic JSONObject getState(String selector, String namespace)
selector
- the selectornamespace
- the namespacepublic JSONObject getState(String selector, String[] attributes)
selector
- the selectorattributes
- the keys of the attributes we are interested inpublic JSONObject getState(String selector, String[] attributes, String namespace)
selector
- the selectorattributes
- the keys of the attributes we are interested innamespace
- the namespacepublic boolean restoreState(AttrBuilder attr, String selector)
attr
- the attribute builderselector
- the selectortrue
if the addition was successful, false
otherwisepublic boolean restoreState(AttrBuilder attr, String selector, String namespace)
attr
- the attribute builderselector
- the selectornamespace
- the namespacetrue
if the addition was successful, false
otherwisepublic boolean restoreState(AttrBuilder attr, String selector, String[] attributes)
attr
- the attribute builderselector
- the selectorattributes
- the attributestrue
if the addition was successful, false
otherwisepublic boolean restoreState(AttrBuilder attr, String selector, String[] attributes, String namespace)
attr
- the attribute builderselector
- the selectorattributes
- the attributesnamespace
- the namespacetrue
if the addition was successful, false
otherwise"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"