java.lang.Object
com.aoapps.lang.attribute.Attribute<JspContext,T>
com.aoapps.servlet.attribute.AttributeEE<JspContext,T>
com.aoapps.servlet.attribute.AttributeEE.Page<T>
- Enclosing class:
AttributeEE<C,
T>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.aoapps.servlet.attribute.AttributeEE
AttributeEE.Application<T>, AttributeEE.Jstl<T>, AttributeEE.Name<T>, AttributeEE.Page<T>, AttributeEE.Request<T>, AttributeEE.Session<T>
Nested classes/interfaces inherited from class com.aoapps.lang.attribute.Attribute
Attribute.OldValue
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompute
(int scope, BiFunctionE<? super String, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.compute(java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute.compute
(BiFunctionE<? super String, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.compute(java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute.static <T,
Ex extends Throwable>
Tcompute
(JspContext jspContext, int scope, String name, BiFunctionE<? super String, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.compute(java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute.static <T,
Ex extends Throwable>
Tcompute
(JspContext jspContext, String name, BiFunctionE<? super String, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.compute(java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute.computeIfAbsent
(int scope, FunctionE<? super String, ? extends T, ? extends Ex> mappingFunction) Much likeMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
, but for this page-scope attribute.computeIfAbsent
(FunctionE<? super String, ? extends T, ? extends Ex> mappingFunction) Much likeMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
, but for this page-scope attribute.static <T,
Ex extends Throwable>
TcomputeIfAbsent
(JspContext jspContext, int scope, String name, FunctionE<? super String, ? extends T, ? extends Ex> mappingFunction) Much likeMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
, but for a page-scope attribute.static <T,
Ex extends Throwable>
TcomputeIfAbsent
(JspContext jspContext, String name, FunctionE<? super String, ? extends T, ? extends Ex> mappingFunction) Much likeMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
, but for a page-scope attribute.computeIfPresent
(int scope, BiFunctionE<? super String, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute.computeIfPresent
(BiFunctionE<? super String, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute.static <T,
Ex extends Throwable>
TcomputeIfPresent
(JspContext jspContext, int scope, String name, BiFunctionE<? super String, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute.static <T,
Ex extends Throwable>
TcomputeIfPresent
(JspContext jspContext, String name, BiFunctionE<? super String, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute.find()
Finds this attribute in page, request, session (if valid), then application scopes.static <T> T
find
(JspContext jspContext, String name) Finds an attribute in page, request, session (if valid), then application scopes.int
Finds this attribute's scope in page, request, session (if valid), then application scopes.static int
findScope
(JspContext jspContext, String name) Finds an attribute's scope in page, request, session (if valid), then application scopes.get()
Gets the value of this page-scope attribute.get
(int scope) Gets this attribute in the given scope.static <T> T
get
(JspContext jspContext, int scope, String name) Gets an attribute in the given scope.static <T> T
get
(JspContext jspContext, String name) Gets a page-scope attribute.Gets the page context for this attribute.getOrDefault
(int scope, T defaultValue) Much likeMap.getOrDefault(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.static <T> T
getOrDefault
(JspContext jspContext, int scope, String name, T defaultValue) Much likeMap.getOrDefault(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.static <T> T
getOrDefault
(JspContext jspContext, String name, T defaultValue) Much likeMap.getOrDefault(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.getOrDefault
(T defaultValue) Much likeMap.getOrDefault(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.Initializes this page-scope attribute, returning a backup value, which must beclosed
to restore the old value.Initializes this page-scope attribute, returning a backup value, which must beclosed
to restore the old value.merge
(int scope, T value, BiFunctionE<? super T, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute.static <T,
Ex extends Throwable>
Tmerge
(JspContext jspContext, int scope, String name, T value, BiFunctionE<? super T, ? super T, ? extends T, ? extends Ex> remappingFunction) static <T,
Ex extends Throwable>
Tmerge
(JspContext jspContext, String name, T value, BiFunctionE<? super T, ? super T, ? extends T, ? extends Ex> remappingFunction) Much likeMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute.void
remove()
Removes the value from this page-scope attribute.void
remove
(int scope) Removes this attribute from the given scope.boolean
Much likeMap.remove(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.static void
remove
(JspContext jspContext, int scope, String name) Removes an attribute from the given scope.static <T> boolean
remove
(JspContext jspContext, int scope, String name, T value) Much likeMap.remove(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.static void
remove
(JspContext jspContext, String name) Removes a page-scope attribute.static <T> boolean
remove
(JspContext jspContext, String name, T value) Much likeMap.remove(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.boolean
Much likeMap.remove(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.void
Removes this attribute from all scopes.static void
removeAll
(JspContext jspContext, String name) Removes an attribute from all scopes.Much likeMap.replace(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.boolean
Much likeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
, but for this page-scope attribute.static <T> T
replace
(JspContext jspContext, int scope, String name, T value) Much likeMap.replace(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.static <T> boolean
replace
(JspContext jspContext, int scope, String name, T oldValue, T newValue) Much likeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
, but for a page-scope attribute.static <T> T
replace
(JspContext jspContext, String name, T value) Much likeMap.replace(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.static <T> boolean
replace
(JspContext jspContext, String name, T oldValue, T newValue) Much likeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
, but for a page-scope attribute.Much likeMap.replace(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.boolean
Much likeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
, but for this page-scope attribute.void
Sets this attribute in the given scope.static <T> void
set
(JspContext jspContext, int scope, String name, T value) Sets an attribute in the given scope.static <T> void
set
(JspContext jspContext, String name, T value) Sets a page-scope attribute.void
Sets the value of this page-scope attribute.setIfAbsent
(int scope, T value) Much likeMap.putIfAbsent(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.static <T> T
setIfAbsent
(JspContext jspContext, int scope, String name, T value) Much likeMap.putIfAbsent(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.static <T> T
setIfAbsent
(JspContext jspContext, String name, T value) Much likeMap.putIfAbsent(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.setIfAbsent
(T value) Much likeMap.putIfAbsent(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.Methods inherited from class com.aoapps.servlet.attribute.AttributeEE
attribute, jstl
-
Method Details
-
getContext
Gets the page context for this attribute.- Specified by:
getContext
in classAttributeEE<JspContext,
T>
-
init
Initializes this page-scope attribute, returning a backup value, which must beclosed
to restore the old value. This is best used in try-with-resources.- Specified by:
init
in classAttribute<JspContext,
T>
-
init
Initializes this page-scope attribute, returning a backup value, which must beclosed
to restore the old value. This is best used in try-with-resources. -
compute
public static <T,Ex extends Throwable> T compute(JspContext jspContext, String name, BiFunctionE<? super String, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.compute(java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
compute
public <Ex extends Throwable> T compute(BiFunctionE<? super String, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.compute(java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Specified by:
compute
in classAttribute<JspContext,
T> - Throws:
Ex
- See Also:
-
compute
public static <T,Ex extends Throwable> T compute(JspContext jspContext, int scope, String name, BiFunctionE<? super String, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.compute(java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
compute
public <Ex extends Throwable> T compute(int scope, BiFunctionE<? super String, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.compute(java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
computeIfAbsent
public static <T,Ex extends Throwable> T computeIfAbsent(JspContext jspContext, String name, FunctionE<? super String, ? extends T, throws Ex? extends Ex> mappingFunction) Much likeMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
computeIfAbsent
public <Ex extends Throwable> T computeIfAbsent(FunctionE<? super String, ? extends T, throws Ex? extends Ex> mappingFunction) Much likeMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Specified by:
computeIfAbsent
in classAttribute<JspContext,
T> - Throws:
Ex
- See Also:
-
computeIfAbsent
public static <T,Ex extends Throwable> T computeIfAbsent(JspContext jspContext, int scope, String name, FunctionE<? super String, ? extends T, throws Ex? extends Ex> mappingFunction) Much likeMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
computeIfAbsent
public <Ex extends Throwable> T computeIfAbsent(int scope, FunctionE<? super String, ? extends T, throws Ex? extends Ex> mappingFunction) Much likeMap.computeIfAbsent(java.lang.Object, java.util.function.Function)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
computeIfPresent
public static <T,Ex extends Throwable> T computeIfPresent(JspContext jspContext, String name, BiFunctionE<? super String, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
computeIfPresent
public <Ex extends Throwable> T computeIfPresent(BiFunctionE<? super String, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Specified by:
computeIfPresent
in classAttribute<JspContext,
T> - Throws:
Ex
- See Also:
-
computeIfPresent
public static <T,Ex extends Throwable> T computeIfPresent(JspContext jspContext, int scope, String name, BiFunctionE<? super String, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
computeIfPresent
public <Ex extends Throwable> T computeIfPresent(int scope, BiFunctionE<? super String, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.computeIfPresent(java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
find
Finds an attribute in page, request, session (if valid), then application scopes.- See Also:
-
find
Finds this attribute in page, request, session (if valid), then application scopes.- See Also:
-
findScope
Finds an attribute's scope in page, request, session (if valid), then application scopes.- See Also:
-
findScope
public int findScope()Finds this attribute's scope in page, request, session (if valid), then application scopes.- See Also:
-
get
Gets a page-scope attribute.- Parameters:
jspContext
- may benull
, which will returnnull
-
get
Gets the value of this page-scope attribute.- Specified by:
get
in classAttribute<JspContext,
T>
-
get
Gets an attribute in the given scope.- Parameters:
jspContext
- may benull
, which will returnnull
-
get
Gets this attribute in the given scope. -
getOrDefault
Much likeMap.getOrDefault(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.- Parameters:
jspContext
- may benull
, which will returndefaultValue
- See Also:
-
getOrDefault
Much likeMap.getOrDefault(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.- Specified by:
getOrDefault
in classAttribute<JspContext,
T> - See Also:
-
getOrDefault
Much likeMap.getOrDefault(java.lang.Object, java.lang.Object)
, but for a page-scope attribute.- Parameters:
jspContext
- may benull
, which will returndefaultValue
- See Also:
-
getOrDefault
Much likeMap.getOrDefault(java.lang.Object, java.lang.Object)
, but for this page-scope attribute.- See Also:
-
merge
public static <T,Ex extends Throwable> T merge(JspContext jspContext, String name, T value, BiFunctionE<? super T, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
merge
public <Ex extends Throwable> T merge(T value, BiFunctionE<? super T, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Specified by:
merge
in classAttribute<JspContext,
T> - Throws:
Ex
- See Also:
-
merge
public static <T,Ex extends Throwable> T merge(JspContext jspContext, int scope, String name, T value, BiFunctionE<? super T, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
merge
public <Ex extends Throwable> T merge(int scope, T value, BiFunctionE<? super T, ? super T, throws Ex? extends T, ? extends Ex> remappingFunction) Much likeMap.merge(java.lang.Object, java.lang.Object, java.util.function.BiFunction)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Throws:
Ex
- See Also:
-
remove
Removes a page-scope attribute.- Parameters:
jspContext
- may benull
, which will skip removal
-
remove
public void remove()Removes the value from this page-scope attribute.- Specified by:
remove
in classAttribute<JspContext,
T>
-
remove
Removes an attribute from the given scope.- Parameters:
jspContext
- may benull
, which will skip removal
-
remove
public void remove(int scope) Removes this attribute from the given scope. -
remove
Much likeMap.remove(java.lang.Object, java.lang.Object)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
remove
Much likeMap.remove(java.lang.Object, java.lang.Object)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Specified by:
remove
in classAttribute<JspContext,
T> - See Also:
-
remove
Much likeMap.remove(java.lang.Object, java.lang.Object)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
remove
Much likeMap.remove(java.lang.Object, java.lang.Object)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
removeAll
Removes an attribute from all scopes. -
removeAll
public void removeAll()Removes this attribute from all scopes. -
replace
Much likeMap.replace(java.lang.Object, java.lang.Object)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
replace
Much likeMap.replace(java.lang.Object, java.lang.Object)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Specified by:
replace
in classAttribute<JspContext,
T> - See Also:
-
replace
Much likeMap.replace(java.lang.Object, java.lang.Object)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
replace
Much likeMap.replace(java.lang.Object, java.lang.Object)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
replace
Much likeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
replace
Much likeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Specified by:
replace
in classAttribute<JspContext,
T> - See Also:
-
replace
public static <T> boolean replace(JspContext jspContext, int scope, String name, T oldValue, T newValue) Much likeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
replace
Much likeMap.replace(java.lang.Object, java.lang.Object, java.lang.Object)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
set
Sets a page-scope attribute. -
set
Sets the value of this page-scope attribute.- Specified by:
set
in classAttribute<JspContext,
T>
-
set
Sets an attribute in the given scope. -
set
Sets this attribute in the given scope. -
setIfAbsent
Much likeMap.putIfAbsent(java.lang.Object, java.lang.Object)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
setIfAbsent
Much likeMap.putIfAbsent(java.lang.Object, java.lang.Object)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- Specified by:
setIfAbsent
in classAttribute<JspContext,
T> - See Also:
-
setIfAbsent
Much likeMap.putIfAbsent(java.lang.Object, java.lang.Object)
, but for a page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-
setIfAbsent
Much likeMap.putIfAbsent(java.lang.Object, java.lang.Object)
, but for this page-scope attribute. Synchronizes onjspContext
to ensure atomic operation.- See Also:
-