Class TreeStorageNodePrescription
- java.lang.Object
-
- org.keycloak.models.map.storage.tree.DefaultTreeNode<TreeStorageNodePrescription>
-
- org.keycloak.models.map.storage.tree.TreeStorageNodePrescription
-
- All Implemented Interfaces:
TreeNode<TreeStorageNodePrescription>
public class TreeStorageNodePrescription extends DefaultTreeNode<TreeStorageNodePrescription>
Prescription of the tree storage. This prescription can be externalized and contains e.g. details on the particular storage type represented by this node, or properties of the node and edge between this and the parent storage.Realization of this prescription is in
TreeStorageNodeInstance, namely it does not contain a map storage instance that can be directly used for accessing data.- Author:
- hmlnarik
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTreeStorageNodePrescription.FieldContainedStatus-
Nested classes/interfaces inherited from interface org.keycloak.models.map.storage.tree.TreeNode
TreeNode.PathOrientation
-
-
Field Summary
-
Fields inherited from class org.keycloak.models.map.storage.tree.DefaultTreeNode
edgeProperties, nodeProperties, treeProperties
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V extends AbstractEntity>
TreeStorageNodePrescriptionforEntityClass(Class<V> targetEntityClass)protected StringgetLabel()<V extends AbstractEntity>
TreeStorageNodeInstance<V>instantiate(KeycloakSession session)TreeStorageNodePrescription.FieldContainedStatusisCacheFor(EntityField<?> field, Object parameter)TreeStorageNodePrescription.FieldContainedStatusisPrimarySourceFor(EntityField<?> field, Object parameter)Returns if the given field is primary source for the field, potentially specified further by a parameter.booleanisReadOnly()-
Methods inherited from class org.keycloak.models.map.storage.tree.DefaultTreeNode
addChild, addChild, cloneTree, equals, findFirstBfs, findFirstBottommostDfs, findFirstDfs, forEachParent, getChild, getChildren, getEdgeProperties, getEdgeProperty, getId, getNodeProperties, getNodeProperty, getParent, getParentsStream, getPathToRoot, getTreeProperties, getTreeProperty, hasChildren, hashCode, hasNoChildren, removeChild, removeChild, setEdgeProperty, setId, setNodeProperty, setParent, toString, walkBfs, walkDfs
-
-
-
-
Method Detail
-
forEntityClass
public <V extends AbstractEntity> TreeStorageNodePrescription forEntityClass(Class<V> targetEntityClass)
-
instantiate
public <V extends AbstractEntity> TreeStorageNodeInstance<V> instantiate(KeycloakSession session)
-
isReadOnly
public boolean isReadOnly()
-
isPrimarySourceFor
public TreeStorageNodePrescription.FieldContainedStatus isPrimarySourceFor(EntityField<?> field, Object parameter)
Returns if the given field is primary source for the field, potentially specified further by a parameter.- Parameters:
field- Fieldparameter- First parameter, which in case of maps is the key to that map, e.g. attribute name.- Returns:
- For a fully specified field and a parameter (e.g. "attribute" and "attr1"), or a parameterless field (e.g. "client_id"),
returns either
FULLYorNOT_CONTAINED. May also returnPARTIALfor a field that requires a parameter but the parameter is not specified.
-
isCacheFor
public TreeStorageNodePrescription.FieldContainedStatus isCacheFor(EntityField<?> field, Object parameter)
-
getLabel
protected String getLabel()
- Overrides:
getLabelin classDefaultTreeNode<TreeStorageNodePrescription>
-
-