public abstract class AbstractKerberosDescriptorContainer extends AbstractKerberosDescriptor
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "AbstractKerberosDescriptorContainer",
"description": "Describes an AbstractKerberosDescriptorContainer",
"type": "object",
"properties": {
"identities": {
"description": "A list of Kerberos identity descriptors",
"type": "array",
"items": {
"title": "KerberosIdentityDescriptor"
"type": "KerberosIdentityDescriptor"
}
},
"configurations": {
"description": "A list of relevant configuration blocks",
"type": "array",
"items": {
"title": "KerberosConfigurationDescriptor"
"type": "KerberosConfigurationDescriptor"
}
},
"auth_to_local": {
"description": "A list of configuration properties declaring which properties are auth-to-local values
"type": "array",
"items": {
"title": "String"
"type": "String"
}
}
}
}
This implementation does not set the
AbstractKerberosDescriptor.name value, it is
left up to the implementing class to do so.AbstractKerberosDescriptor.Type| Modifier and Type | Field and Description |
|---|---|
static Pattern |
AUTH_TO_LOCAL_PROPERTY_SPECIFICATION_PATTERN
Regular expression pattern used to parse auth_to_local property specifications into the following
parts:
configuration type (optional, if _global_)
property name
concatenation type (optional, if using the default behavior)
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractKerberosDescriptorContainer(Map<?,?> data)
Constructs a new AbstractKerberosDescriptorContainer
This constructor must be called from the constructor(s) of the implementing classes
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
Set<String> |
getAuthToLocalProperties()
Gets the set of
auth_to_local property names. |
abstract AbstractKerberosDescriptorContainer |
getChildContainer(String name)
Returns a specific named child container
|
abstract Collection<? extends AbstractKerberosDescriptorContainer> |
getChildContainers()
Returns the child containers associated with this container.
|
KerberosConfigurationDescriptor |
getConfiguration(String name)
Returns the requested KerberosConfigurationDescriptor
|
Map<String,KerberosConfigurationDescriptor> |
getConfigurations()
Returns a Map of raw KerberosConfigurationDescriptors contained within this
AbstractKerberosDescriptorContainer.
|
Map<String,KerberosConfigurationDescriptor> |
getConfigurations(boolean includeInherited)
Returns a Map of KerberosConfigurationDescriptors contained within this
AbstractKerberosDescriptorContainer.
|
protected AbstractKerberosDescriptor |
getDescriptor(AbstractKerberosDescriptor.Type type,
String name)
Gets the requested AbstractKerberosDescriptor implementation using a type name and a relevant
descriptor name.
|
List<KerberosIdentityDescriptor> |
getIdentities()
Returns the raw List of KerberosIdentityDescriptors contained within this
AbstractKerberosDescriptorContainer.
|
List<KerberosIdentityDescriptor> |
getIdentities(boolean resolveReferences,
Map<String,Object> contextForFilter)
Returns a List of KerberosIdentityDescriptors contained within this
AbstractKerberosDescriptorContainer.
|
List<KerberosIdentityDescriptor> |
getIdentitiesSkipReferences() |
KerberosIdentityDescriptor |
getIdentity(String name)
Return a KerberosIdentityDescriptor with the specified name.
|
KerberosIdentityDescriptor |
getReferencedIdentityDescriptor(String path)
Attempts to find the KerberosIdentityDescriptor at the specified path.
|
int |
hashCode() |
boolean |
isContainer()
Test this AbstractKerberosDescriptor to see if it is a container.
|
void |
putAuthToLocalProperty(String authToLocalProperty)
Adds the specified property name to the set of
auth_to_local property names. |
void |
putConfiguration(KerberosConfigurationDescriptor configuration)
Adds the specified KerberosConfigurationDescriptor to the list of KerberosConfigurationDescriptors.
|
void |
putIdentity(KerberosIdentityDescriptor identity)
Adds the specified KerberosIdentityDescriptor to the list of KerberosIdentityDescriptor.
|
void |
removeIdentity(String name)
Remove all KerberosIdentityDescriptors have have the specified name
One or more KerberosIdentityDescriptors may be removed if multiple KerberosIdentityDescriptors
have the same name.
|
void |
setAuthToLocalProperties(Set<String> authToLocalProperties)
Sets the set of
auth_to_local property names. |
void |
setConfigurations(Map<String,KerberosConfigurationDescriptor> configurations)
|
void |
setIdentities(List<KerberosIdentityDescriptor> identities)
Set the
KerberosIdentityDescriptor for this AbstractKerberosDescriptorContainer. |
Map<String,Object> |
toMap()
Creates a Map of values that can be used to create a copy of this AbstractKerberosDescriptorContainer
or generate the JSON structure described in
AbstractKerberosDescriptorContainer |
void |
update(AbstractKerberosDescriptorContainer updates)
Updates this AbstractKerberosDescriptorContainer using information from the supplied
AbstractKerberosDescriptorContainer.
|
getBooleanValue, getBooleanValue, getName, getParent, getPath, getRoot, getStringValue, getValue, nullToEmpty, nullToEmpty, nullToEmpty, setName, setParentpublic static final Pattern AUTH_TO_LOCAL_PROPERTY_SPECIFICATION_PATTERN
protected AbstractKerberosDescriptorContainer(Map<?,?> data)
data - a Map of data used for collecting groups of common descriptorspublic abstract Collection<? extends AbstractKerberosDescriptorContainer> getChildContainers()
AbstractKerberosDescriptorContainerspublic abstract AbstractKerberosDescriptorContainer getChildContainer(String name)
name - the name of the child container to retrieveAbstractKerberosDescriptorContainerpublic List<KerberosIdentityDescriptor> getIdentities()
getIdentities(boolean, Map) and setting the
argument to 'false'public void setIdentities(List<KerberosIdentityDescriptor> identities)
KerberosIdentityDescriptor for this AbstractKerberosDescriptorContainer.identities - a List of KerberosIdentityDescriptorspublic List<KerberosIdentityDescriptor> getIdentities(boolean resolveReferences, Map<String,Object> contextForFilter) throws org.apache.ambari.server.AmbariException
resolveReferences - a Boolean value indicating whether to resolve references (true) or not
(false)org.apache.ambari.server.AmbariExceptionpublic KerberosIdentityDescriptor getIdentity(String name)
name - a String declaring the name of the descriptor to retrievepublic void putIdentity(KerberosIdentityDescriptor identity)
identity - the KerberosIdentityDescriptor to addpublic void removeIdentity(String name)
name - a String declaring the name of the descriptors to removepublic void setConfigurations(Map<String,KerberosConfigurationDescriptor> configurations)
configurations - a Map of KerberosConfigurationDescriptorspublic Map<String,KerberosConfigurationDescriptor> getConfigurations()
getConfigurations(boolean) and setting the argument
to 'false'public Map<String,KerberosConfigurationDescriptor> getConfigurations(boolean includeInherited)
includeInherited - a Boolean value indicating whether to include configuration within the
KerberosDescriptor hierarchy (true) or not (false)public void putConfiguration(KerberosConfigurationDescriptor configuration)
configuration - the KerberosConfigurationDescriptor to addpublic KerberosConfigurationDescriptor getConfiguration(String name)
name - a String declaring the name of the descriptor to retrievepublic void putAuthToLocalProperty(String authToLocalProperty)
auth_to_local property names.
Each auth_to_local property name is expected to be in the following format:
config-type/property_name`authToLocalProperty - the auth_to_local property to addpublic void setAuthToLocalProperties(Set<String> authToLocalProperties)
auth_to_local property names.authToLocalProperties - a Set of String values; or null if not setpublic Set<String> getAuthToLocalProperties()
auth_to_local property names.public boolean isContainer()
isContainer in class AbstractKerberosDescriptorpublic void update(AbstractKerberosDescriptorContainer updates)
updates - an AbstractKerberosDescriptorContainer containing the updates to this
AbstractKerberosDescriptorContainerpublic KerberosIdentityDescriptor getReferencedIdentityDescriptor(String path) throws org.apache.ambari.server.AmbariException
../service_identity will resolve to
/SERVICE/service_identity:
{
"name": "SERVICE",
"identities": [
{
"name": "service_identity",
...
}
],
"components" : [
{
"name": "COMPONENT",
"identities": [
{
"name": "./service_identity",
...
},
...
]
}
]
}
path - a String declaring the path to a KerberosIdentityDescriptororg.apache.ambari.server.AmbariExceptionprotected AbstractKerberosDescriptor getDescriptor(AbstractKerberosDescriptor.Type type, String name)
getDescriptor in class AbstractKerberosDescriptortype - a String indicating the type of the requested descriptorname - a String indicating the name of the requested descriptorpublic Map<String,Object> toMap()
AbstractKerberosDescriptorContainertoMap in class AbstractKerberosDescriptorAbstractKerberosDescriptorContainerpublic List<KerberosIdentityDescriptor> getIdentitiesSkipReferences()
public int hashCode()
hashCode in class AbstractKerberosDescriptorpublic boolean equals(Object object)
equals in class AbstractKerberosDescriptorCopyright © 2022 Apache Software Foundation. All rights reserved.