|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.identityconnectors.framework.common.objects.SchemaBuilder
public final class SchemaBuilder
Simple builder class to help facilitate creating a Schema
object.
Constructor Summary | |
---|---|
SchemaBuilder(java.lang.Class<? extends Connector> connectorClass) Creates a SchemaBuilder for the given connector class |
Method Summary | |
---|---|
void |
addSupportedObjectClass(java.lang.Class<? extends SPIOperation> op, ObjectClassInfo def) Adds the given ObjectClassInfo as a supported ObjectClass for the given operation. |
void |
addSupportedOperationOption(java.lang.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(java.lang.String type, java.util.Set<AttributeInfo> attrInfo) Adds another ObjectClassInfo to the schema. |
void |
defineOperationOption(OperationOptionInfo info) Adds another OperationOptionInfo to the schema. |
void |
defineOperationOption(java.lang.String optionName, java.lang.Class<?> type) Adds another OperationOptionInfo to the schema. |
void |
removeSupportedObjectClass(java.lang.Class<? extends SPIOperation> op, ObjectClassInfo def) Removes the given ObjectClassInfo as a supported ObjectClass for the given operation. |
void |
removeSupportedOperationOption(java.lang.Class<? extends SPIOperation> op, OperationOptionInfo def) Removes the given OperationOptionInfo as a supported option for the given operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaBuilder(java.lang.Class<? extends Connector> connectorClass)
connectorClass
- The connector for which we are building the schema.Method Detail |
---|
public void defineObjectClass(ObjectClassInfo info)
info
-java.lang.IllegalStateException
- If already definedpublic void defineOperationOption(OperationOptionInfo info)
public void defineObjectClass(java.lang.String type, java.util.Set<AttributeInfo> attrInfo)
java.lang.IllegalStateException
- If already definedpublic void defineOperationOption(java.lang.String optionName, java.lang.Class<?> type)
java.lang.IllegalStateException
- If already definedpublic void addSupportedObjectClass(java.lang.Class<? extends SPIOperation> op, ObjectClassInfo def)
op
- The SPI operationdef
- The ObjectClassInfojava.lang.IllegalArgumentException
- If the given ObjectClassInfo was not already defined using defineObjectClass(ObjectClassInfo)
.public void removeSupportedObjectClass(java.lang.Class<? extends SPIOperation> op, ObjectClassInfo def)
op
- The SPI operationdef
- The ObjectClassInfojava.lang.IllegalArgumentException
- If the given ObjectClassInfo was not already defined using defineObjectClass(ObjectClassInfo)
.public void addSupportedOperationOption(java.lang.Class<? extends SPIOperation> op, OperationOptionInfo def)
op
- The SPI operationdef
- The OperationOptionInfojava.lang.IllegalArgumentException
- If the given OperationOptionInfo was not already defined using defineOperationOption(OperationOptionInfo)
.public void removeSupportedOperationOption(java.lang.Class<? extends SPIOperation> op, OperationOptionInfo def)
op
- The SPI operationdef
- The OperationOptionInfojava.lang.IllegalArgumentException
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |