public abstract class AccessControlBuilder<T extends AccessControlBuilder<T>>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AccessControlBuilder.Builder |
static class |
AccessControlBuilder.Emitter |
Constructor and Description |
---|
AccessControlBuilder(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
T |
addAllInbound(java.util.List<java.lang.String> inBound)
Add all values to the Inbound Object
|
T |
addAllOutbound(java.util.List<java.lang.String> outBound)
Add all values to the Outbound Object
|
T |
addToInbound(java.lang.String inBound)
Add all values to the Inbound Object
|
T |
addToOutbound(java.lang.String outBound)
Add all values to the Outbound Object
|
AccessControl |
build() |
T |
fields(java.util.function.Consumer<MapBuilder> consumer)
Accepts a
MapBuilder consumer. |
MapBuilder |
getFieldsBuilder() |
java.lang.String |
getId() |
java.util.Set<java.lang.String> |
getInbound() |
MapBuilder |
getMetadataBuilder() |
java.util.Set<java.lang.String> |
getOutbound() |
protected abstract T |
getThis() |
boolean |
isLeafNode() |
T |
metadata(java.util.function.Consumer<MapBuilder> consumer)
Accepts a
MapBuilder consumer. |
T |
withIsLeafNode(boolean isLeafNode)
Whether the Access control is leaf node or not
|
protected abstract T getThis()
public T addAllInbound(java.util.List<java.lang.String> inBound)
inBound
- A List
of values for Inbound object.public T addAllOutbound(java.util.List<java.lang.String> outBound)
outBound
- A List
of values for Outbound object.public T addToInbound(java.lang.String inBound)
inBound
- A String
value for Inbound object.public T addToOutbound(java.lang.String outBound)
outBound
- A String
value for Inbound object.public T withIsLeafNode(boolean isLeafNode)
isLeafNode
- A boolean
.public T metadata(java.util.function.Consumer<MapBuilder> consumer)
MapBuilder
consumer.
e.g. AccessControl.builder("id")
.fields(m -> {
m.setLong(“long_value”, 123l);
m.setString(“str_value”, “test”)
m.merge(Collections.singletonMap("id",123));
})
.build();
consumer
- the consumer that accepts a MapBuilder
object which sets only allowed values in map object.public T fields(java.util.function.Consumer<MapBuilder> consumer)
MapBuilder
consumer.
e.g. AccessControl.builder("id")
.fields(f -> {
f.setLong(“long_value”, 123l);
f.setString(“str_value”, “test”)
f.merge(Collections.singletonMap("id",123));
})
.build();
consumer
- the consumer that accepts a MapBuilder
object which sets only allowed values in map object.public java.lang.String getId()
public java.util.Set<java.lang.String> getInbound()
public java.util.Set<java.lang.String> getOutbound()
public boolean isLeafNode()
public MapBuilder getMetadataBuilder()
public MapBuilder getFieldsBuilder()
public AccessControl build()