|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.identityconnectors.framework.common.objects.SchemaBuilder
public final class SchemaBuilder
Simple builder class to help facilitate creating a Schema
object.
Constructor Summary | |
---|---|
SchemaBuilder(Class<? extends Connector> connectorClass)
Creates a SchemaBuilder for the given connector class |
Method Summary | |
---|---|
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(String type,
Set<AttributeInfo> attrInfo)
Adds another ObjectClassInfo to the schema. |
void |
defineOperationOption(OperationOptionInfo info)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaBuilder(Class<? extends Connector> connectorClass)
connectorClass
- The connector for which we
are building the schema.Method Detail |
---|
public void defineObjectClass(ObjectClassInfo info)
info
-
IllegalStateException
- If already definedpublic void defineOperationOption(OperationOptionInfo info)
public 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 ObjectClassInfo
IllegalArgumentException
- 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 ObjectClassInfo
IllegalArgumentException
- 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 OperationOptionInfo
IllegalArgumentException
- 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 OperationOptionInfo
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 |