Interface Scopes
-
- All Superinterfaces:
Constructible
,Extensible<Scopes>
,java.util.Map<java.lang.String,java.lang.String>
public interface Scopes extends Constructible, Extensible<Scopes>, java.util.Map<java.lang.String,java.lang.String>
Scopes is a property of OAuth Flow Object.- See Also:
- OAuthFlow Object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Scopes
addScope(java.lang.String scope, java.lang.String description)
Adds name of an existing scope object and item parameters to a Scopes instance as a key-value pair in a map.boolean
containsKey(java.lang.Object key)
Deprecated.since 1.1java.lang.String
get(java.lang.Object key)
Deprecated.since 1.1default java.lang.String
getScope(java.lang.String scope)
Returns a scope description for a given scope name.java.util.Map<java.lang.String,java.lang.String>
getScopes()
Returns a copy map (potentially immutable) of scopes.default boolean
hasScope(java.lang.String scope)
Check whether a scope item is present in the map.java.lang.String
put(java.lang.String key, java.lang.String value)
Deprecated.since 1.1void
putAll(java.util.Map<? extends java.lang.String,? extends java.lang.String> m)
Deprecated.since 1.1java.lang.String
remove(java.lang.Object key)
Deprecated.since 1.1void
removeScope(java.lang.String scope)
Removes the given scope item to this Scopes.void
setScopes(java.util.Map<java.lang.String,java.lang.String> items)
Set the scope items map to this Scopes-
Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
-
-
-
-
Method Detail
-
addScope
Scopes addScope(java.lang.String scope, java.lang.String description)
Adds name of an existing scope object and item parameters to a Scopes instance as a key-value pair in a map.- Parameters:
scope
- the name of a scopedescription
- description of the scope. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- Scopes instance with the added key-value pair
-
removeScope
void removeScope(java.lang.String scope)
Removes the given scope item to this Scopes.- Parameters:
scope
- the name of a scope
-
getScopes
java.util.Map<java.lang.String,java.lang.String> getScopes()
Returns a copy map (potentially immutable) of scopes.- Returns:
- all items
-
setScopes
void setScopes(java.util.Map<java.lang.String,java.lang.String> items)
Set the scope items map to this Scopes- Parameters:
items
- key-value pair in a map.
-
hasScope
default boolean hasScope(java.lang.String scope)
Check whether a scope item is present in the map. This is a convenience method forgetScopes().containsKey(name)
- Parameters:
scope
- the name of a scope.- Returns:
- a boolean to indicate if the scope item is present or not.
-
getScope
default java.lang.String getScope(java.lang.String scope)
Returns a scope description for a given scope name. This is a convenience method forgetScopes().get(name)
- Parameters:
scope
- the name of a scope.- Returns:
- the corresponding description or null.
-
get
@Deprecated java.lang.String get(java.lang.Object key)
Deprecated.since 1.1In the next version,Scopes
will no longer extendsMap
, this method will no longer be present. UsegetScope(String)
instead.- Specified by:
get
in interfacejava.util.Map<java.lang.String,java.lang.String>
-
containsKey
@Deprecated boolean containsKey(java.lang.Object key)
Deprecated.since 1.1In the next version,Scopes
will no longer extendsMap
, this method will no longer be present. UsehasScope(String)
instead.- Specified by:
containsKey
in interfacejava.util.Map<java.lang.String,java.lang.String>
-
put
@Deprecated java.lang.String put(java.lang.String key, java.lang.String value)
Deprecated.since 1.1In the next version,Scopes
will no longer extendsMap
, this method will no longer be present. UseaddScope(String, String)
instead.- Specified by:
put
in interfacejava.util.Map<java.lang.String,java.lang.String>
-
putAll
@Deprecated void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.String> m)
Deprecated.since 1.1In the next version,Scopes
will no longer extendsMap
, this method will no longer be present. UsesetScopes(Map)
instead.- Specified by:
putAll
in interfacejava.util.Map<java.lang.String,java.lang.String>
-
remove
@Deprecated java.lang.String remove(java.lang.Object key)
Deprecated.since 1.1In the next version,Scopes
will no longer extendsMap
, this method will no longer be present. UseremoveScope(String)
instead.- Specified by:
remove
in interfacejava.util.Map<java.lang.String,java.lang.String>
-
-