Package com.adobe.granite.ui.components
Class ClientState
- java.lang.Object
-
- com.adobe.granite.ui.components.ClientState
-
@Deprecated public class ClientState extends java.lang.Object
Deprecated.CoralUI v1 specificA class to receive the client state for DOM attributes out of Coral UI'sutil.state
. It's purpose is to receive the values from the HTTP request and either transform it to a JSON object or to add them to an existingAttrBuilder
.
-
-
Constructor Summary
Constructors Constructor Description ClientState(SlingHttpServletRequest slingRequest)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description JSONObject
getState(java.lang.String selector)
Deprecated.Returns all attributes from the global namespace for the given selector.JSONObject
getState(java.lang.String selector, java.lang.String namespace)
Deprecated.Returns all attributes from a given namespace for the given selector.JSONObject
getState(java.lang.String selector, java.lang.String[] attributes)
Deprecated.Returns all attributes which keys are included in the attributes array from the global namespace for the given selector.JSONObject
getState(java.lang.String selector, java.lang.String[] attributes, java.lang.String namespace)
Deprecated.Returns all attributes which keys are included in the attributes array from a given namespace for the given selector.boolean
restoreState(AttrBuilder attr, java.lang.String selector)
Deprecated.Adds all attributes from the global namespace for the given selector to an AttrBuilder.boolean
restoreState(AttrBuilder attr, java.lang.String selector, java.lang.String namespace)
Deprecated.Adds all attributes from a given namespace for the given selector to an AttrBuilder.boolean
restoreState(AttrBuilder attr, java.lang.String selector, java.lang.String[] attributes)
Deprecated.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, java.lang.String selector, java.lang.String[] attributes, java.lang.String namespace)
Deprecated.Adds all attributes which keys are included in the attributes array from a given namespace for the given selector to an AttrBuilder.
-
-
-
Constructor Detail
-
ClientState
public ClientState(@Nonnull SlingHttpServletRequest slingRequest)
Deprecated.
-
-
Method Detail
-
getState
@CheckForNull public JSONObject getState(@Nonnull java.lang.String selector)
Deprecated.Returns all attributes from the global namespace for the given selector.- Parameters:
selector
- the selector- Returns:
- all attributes from the global namespace for the given selector
-
getState
@CheckForNull public JSONObject getState(@Nonnull java.lang.String selector, @Nonnull java.lang.String namespace)
Deprecated.Returns all attributes from a given namespace for the given selector.- Parameters:
selector
- the selectornamespace
- the namespace- Returns:
- all attributes from the given namespace for the given selector
-
getState
@CheckForNull public JSONObject getState(@Nonnull java.lang.String selector, @CheckForNull java.lang.String[] attributes)
Deprecated.Returns all attributes which keys are included in the attributes array from the global namespace for the given selector.- Parameters:
selector
- the selectorattributes
- the keys of the attributes we are interested in- Returns:
- all attributes which keys are included in the attributes array from the global namespace for the given selector
-
getState
@CheckForNull public JSONObject getState(@Nonnull java.lang.String selector, @CheckForNull java.lang.String[] attributes, @Nonnull java.lang.String namespace)
Deprecated.Returns all attributes which keys are included in the attributes array from a given namespace for the given selector.- Parameters:
selector
- the selectorattributes
- the keys of the attributes we are interested innamespace
- the namespace- Returns:
- all attributes which keys are included in the attributes array from a given namespace for the given selector
-
restoreState
public boolean restoreState(@Nonnull AttrBuilder attr, @Nonnull java.lang.String selector)
Deprecated.Adds all attributes from the global namespace for the given selector to an AttrBuilder.- Parameters:
attr
- the attribute builderselector
- the selector- Returns:
true
if the addition is successful,false
otherwise
-
restoreState
public boolean restoreState(@Nonnull AttrBuilder attr, @Nonnull java.lang.String selector, @Nonnull java.lang.String namespace)
Deprecated.Adds all attributes from a given namespace for the given selector to an AttrBuilder.- Parameters:
attr
- the attribute builderselector
- the selectornamespace
- the namespace- Returns:
true
if the addition is successful,false
otherwise
-
restoreState
public boolean restoreState(@Nonnull AttrBuilder attr, @Nonnull java.lang.String selector, @CheckForNull java.lang.String[] attributes)
Deprecated.Adds all attributes which keys are included in the attributes array from the global namespace for the given selector to an AttrBuilder.- Parameters:
attr
- the attribute builderselector
- the selectorattributes
- the attributes- Returns:
true
if the addition is successful,false
otherwise
-
restoreState
public boolean restoreState(@Nonnull AttrBuilder attr, @Nonnull java.lang.String selector, @CheckForNull java.lang.String[] attributes, @Nonnull java.lang.String namespace)
Deprecated.Adds all attributes which keys are included in the attributes array from a given namespace for the given selector to an AttrBuilder.- Parameters:
attr
- the attribute builderselector
- the selectorattributes
- the attributesnamespace
- the namespace- Returns:
true
if the addition is successful,false
otherwise
-
-