Constructor and Description |
---|
SchemaBuilder(Class<? extends Connector> connectorClass)
Creates a SchemaBuilder for the given connector class
|
Modifier and Type | Method and Description |
---|---|
void |
addSupportedObjectClass(Class<? extends SPIOperation> op,
ObjectClassInfo def)
Adds the given ObjectClassInfo as a supported ObjectClass for the given operation.
|
void |
addSupportedOperationOption(Class<? extends SPIOperation> op,
OperationOptionInfo def)
Adds the given OperationOptionInfo as a supported option for the given operation.
|
Schema |
build()
Builds the
Schema object based on the ObjectClassInfo s added so far. |
void |
clearSupportedObjectClassesByOperation()
Clears the operation-specific supported classes.
|
void |
clearSupportedOptionsByOperation()
Clears the operation-specific supported options.
|
void |
defineObjectClass(ObjectClassInfo info)
Adds another ObjectClassInfo to the schema.
|
void |
defineObjectClass(ObjectClassInfo objectClassInfo,
Class<? extends SPIOperation>... operations)
Adds another ObjectClassInfo to the schema.
|
void |
defineObjectClass(String type,
Set<AttributeInfo> attrInfo)
Adds another ObjectClassInfo to the schema.
|
void |
defineOperationOption(OperationOptionInfo info)
Adds another OperationOptionInfo to the schema.
|
void |
defineOperationOption(OperationOptionInfo operationOptionInfo,
Class<? extends SPIOperation>... operations)
Adds another OperationOptionInfo to the schema.
|
void |
defineOperationOption(String optionName,
Class<?> type)
Adds another OperationOptionInfo to the schema.
|
void |
removeSupportedObjectClass(Class<? extends SPIOperation> op,
ObjectClassInfo def)
Removes the given ObjectClassInfo as a supported ObjectClass for the given operation.
|
void |
removeSupportedOperationOption(Class<? extends SPIOperation> op,
OperationOptionInfo def)
Removes the given OperationOptionInfo as a supported option for the given operation.
|
public void defineObjectClass(ObjectClassInfo info)
info
- IllegalStateException
- If already defined@SafeVarargs public final void defineObjectClass(ObjectClassInfo objectClassInfo, Class<? extends SPIOperation>... operations)
objectClassInfo
- operations
- The SPI operation which use supports this objectClassInfo
IllegalStateException
- If already definedpublic void defineOperationOption(OperationOptionInfo info)
@SafeVarargs public final void defineOperationOption(OperationOptionInfo operationOptionInfo, Class<? extends SPIOperation>... operations)
operationOptionInfo
- operations
- IllegalStateException
- If already definedpublic void defineObjectClass(String type, Set<AttributeInfo> attrInfo)
IllegalStateException
- If already definedpublic void defineOperationOption(String optionName, Class<?> type)
IllegalStateException
- If already definedpublic void addSupportedObjectClass(Class<? extends SPIOperation> op, ObjectClassInfo def)
op
- The SPI operationdef
- The ObjectClassInfoIllegalArgumentException
- If the given ObjectClassInfo was not already defined using
defineObjectClass(ObjectClassInfo)
.public void removeSupportedObjectClass(Class<? extends SPIOperation> op, ObjectClassInfo def)
op
- The SPI operationdef
- The ObjectClassInfoIllegalArgumentException
- If the given ObjectClassInfo was not already defined using
defineObjectClass(ObjectClassInfo)
.public void addSupportedOperationOption(Class<? extends SPIOperation> op, OperationOptionInfo def)
op
- the SPI operationdef
- The OperationOptionInfoIllegalArgumentException
- If the given OperationOptionInfo was not already defined
using defineOperationOption(OperationOptionInfo)
.public void removeSupportedOperationOption(Class<? extends SPIOperation> op, OperationOptionInfo def)
op
- The SPI operationdef
- The OperationOptionInfoIllegalArgumentException
- If the given OperationOptionInfo was not already defined
using defineOperationOption(OperationOptionInfo)
.public void clearSupportedObjectClassesByOperation()
defineObjectClass(ObjectClassInfo)
, it is added to all
operations. You may then remove those that you need using
removeSupportedObjectClass(Class, ObjectClassInfo)
. You may
wish, as an alternative to clear everything out and instead add using
addSupportedObjectClass(Class, ObjectClassInfo)
.public void clearSupportedOptionsByOperation()
defineOperationOption(OperationOptionInfo)
, this adds the option
to all operations. You may then remove the option from any operation that
does not support the option using
removeSupportedOperationOption(Class, OperationOptionInfo)
. An
alternative approach is to clear everything out (using this method) and
then add each option to every operation that supports the option using
addSupportedOperationOption(Class, OperationOptionInfo)
.public Schema build()
Schema
object based on the ObjectClassInfo
s added so far.Copyright © 2022. All rights reserved.