@ExperimentalApi @ParametersAreNonnullByDefault public interface PermissionSchemeAttributeManager
Modifier and Type | Interface and Description |
---|---|
static class |
PermissionSchemeAttributeManager.AttributeKeys |
Modifier and Type | Method and Description |
---|---|
void |
clearAttributes(Long schemeId)
Deletes all attributes from the permission scheme.
|
void |
deleteAttributes(Long schemeId,
Collection<String> keys)
Deletes attributes with the defined keys from the permission scheme.
|
Optional<String> |
getAttribute(Long schemeId,
String key)
Retrieves attribute value.
|
Map<String,String> |
getAttributes(Long schemeId)
Retrieves all attributes for the given permission scheme (including default attributes).
|
Map<String,String> |
getDefaultAttributes()
Default attributes are meant to exist even if there's no such attribute stored.
|
void |
setAttribute(Long schemeId,
String key,
String value)
Upserts an attribute for the given scheme.
|
void |
updateAttributes(Long schemeId,
Map<String,String> attributes)
Updates ALL attributes for the permission scheme.
|
Optional<String> getAttribute(Long schemeId, String key)
schemeId
- permission scheme idkey
- attribute keyOptional<String>
containing attribute value if it exists or default value if specifiedOptional<String>#empty()
if an attribute with the given key was not found for the given scheme
and doesn't have specified default valueMap<String,String> getAttributes(Long schemeId)
schemeId
- permission scheme idMap<String, String>
of attributes' keys and values for the given permission schemevoid setAttribute(Long schemeId, String key, String value)
schemeId
- permission scheme idkey
- attribute keyvalue
- attribute valuevoid updateAttributes(Long schemeId, Map<String,String> attributes)
schemeId
- permission scheme idattributes
- Map<String, String>
of all attributes the defined scheme should have,
e.g. if this map doesn't contain an existing attribute, it would be deletedvoid deleteAttributes(Long schemeId, Collection<String> keys)
schemeId
- permission scheme idkeys
- a Collection<String>
of attribute keysvoid clearAttributes(Long schemeId)
schemeId
- permission scheme idMap<String,String> getDefaultAttributes()
Map<String, String>
of default attributes' keys and valuesCopyright © 2002-2019 Atlassian. All Rights Reserved.