@Test public void testSchemaApi() { Schema schema = facade.schema(); assertNotNull(schema); Set<ObjectClassInfo> objectInfos = schema.getObjectClassInfo(); assertNotNull(objectInfos); assertEquals(1, objectInfos.size()); ObjectClassInfo objectInfo = (ObjectClassInfo) objectInfos.toArray()[0]; assertNotNull(objectInfo); assertTrue(objectInfo.is(ObjectClass.ACCOUNT_NAME)); Set<AttributeInfo> attInfos = objectInfo.getAttributeInfo(); assertNotNull(AttributeInfoUtil.find(Name.NAME, attInfos)); }
public Schema schema() { Set<AttributeInfo> attrInfoSet = new HashSet<AttributeInfo>(); attrInfoSet.add(AttributeInfoBuilder.build(Name.NAME, String.class, EnumSet.of( Flags.NOT_UPDATEABLE, Flags.REQUIRED))); AttributeInfoBuilder grantsBuilder = new AttributeInfoBuilder(); grantsBuilder.setName(USER_AUTH_GRANTS).setCreateable(true).setUpdateable(true) .setRequired(true).setReadable(true).setMultiValued(true) .setReturnedByDefault(true); attrInfoSet.add(grantsBuilder.build()); SchemaBuilder schemaBld = new SchemaBuilder(getClass()); schemaBld.defineObjectClass(ObjectClass.ACCOUNT_NAME, attrInfoSet); return schemaBld.build(); }
DB2Connector implements AuthenticateOp, SchemaOp, CreateOp,
        SearchOp<FilterWhereBuilder>, DeleteOp, UpdateAttributeValuesOp, TestOp, PoolableConnector,
        AttributeNormalizer { public Schema schema() { Set<AttributeInfo> attrInfoSet = new HashSet<AttributeInfo>(); attrInfoSet.add(AttributeInfoBuilder.build(Name.NAME, String.class, EnumSet.of( Flags.NOT_UPDATEABLE, Flags.REQUIRED))); AttributeInfoBuilder grantsBuilder = new AttributeInfoBuilder(); grantsBuilder.setName(USER_AUTH_GRANTS).setCreateable(true).setUpdateable(true) .setRequired(true).setReadable(true).setMultiValued(true) .setReturnedByDefault(true); attrInfoSet.add(grantsBuilder.build()); SchemaBuilder schemaBld = new SchemaBuilder(getClass()); schemaBld.defineObjectClass(ObjectClass.ACCOUNT_NAME, attrInfoSet); return schemaBld.build(); } }
DB2Connector implements AuthenticateOp, SchemaOp, CreateOp,
        SearchOp<FilterWhereBuilder>, DeleteOp, UpdateAttributeValuesOp, TestOp, PoolableConnector,
        AttributeNormalizer { public Schema schema() { Set<AttributeInfo> attrInfoSet = new HashSet<AttributeInfo>(); attrInfoSet.add(AttributeInfoBuilder.build(Name.NAME, String.class, EnumSet.of( Flags.NOT_UPDATEABLE, Flags.REQUIRED))); AttributeInfoBuilder grantsBuilder = new AttributeInfoBuilder(); grantsBuilder.setName(USER_AUTH_GRANTS).setCreateable(true).setUpdateable(true) .setRequired(true).setReadable(true).setMultiValued(true) .setReturnedByDefault(true); attrInfoSet.add(grantsBuilder.build()); SchemaBuilder schemaBld = new SchemaBuilder(getClass()); schemaBld.defineObjectClass(ObjectClass.ACCOUNT_NAME, attrInfoSet); return schemaBld.build(); } DB2Connector(); }
DB2Connector implements AuthenticateOp, SchemaOp, CreateOp,
        SearchOp<FilterWhereBuilder>, DeleteOp, UpdateAttributeValuesOp, TestOp, PoolableConnector,
        AttributeNormalizer { public Schema schema() { Set<AttributeInfo> attrInfoSet = new HashSet<AttributeInfo>(); attrInfoSet.add(AttributeInfoBuilder.build(Name.NAME, String.class, EnumSet.of( Flags.NOT_UPDATEABLE, Flags.REQUIRED))); AttributeInfoBuilder grantsBuilder = new AttributeInfoBuilder(); grantsBuilder.setName(USER_AUTH_GRANTS).setCreateable(true).setUpdateable(true) .setRequired(true).setReadable(true).setMultiValued(true) .setReturnedByDefault(true); attrInfoSet.add(grantsBuilder.build()); SchemaBuilder schemaBld = new SchemaBuilder(getClass()); schemaBld.defineObjectClass(ObjectClass.ACCOUNT_NAME, attrInfoSet); return schemaBld.build(); } DB2Connector(); Uid authenticate(ObjectClass objectClass, String username, GuardedString password,
            OperationOptions options); Schema schema(); void checkAlive(); void dispose(); DB2Configuration getConfiguration(); void init(Configuration cfg); FilterTranslator<FilterWhereBuilder> createFilterTranslator(ObjectClass oclass,
            OperationOptions options); void executeQuery(ObjectClass oclass, FilterWhereBuilder where, ResultsHandler handler,
            OperationOptions options); Uid create(ObjectClass oclass, Set<Attribute> attrs, OperationOptions options); void delete(ObjectClass objClass, Uid uid, OperationOptions options); void test(); Uid update(ObjectClass objclass, Uid uid, Set<Attribute> attrs, OperationOptions options); Uid addAttributeValues(ObjectClass objclass, Uid uid, Set<Attribute> valuesToAdd,
            OperationOptions options); Uid removeAttributeValues(ObjectClass objclass, Uid uid, Set<Attribute> valuesToRemove,
            OperationOptions options); Attribute normalizeAttribute(ObjectClass oclass, Attribute attribute); }
DB2Connector implements AuthenticateOp, SchemaOp, CreateOp,
        SearchOp<FilterWhereBuilder>, DeleteOp, UpdateAttributeValuesOp, TestOp, PoolableConnector,
        AttributeNormalizer { public Schema schema() { Set<AttributeInfo> attrInfoSet = new HashSet<AttributeInfo>(); attrInfoSet.add(AttributeInfoBuilder.build(Name.NAME, String.class, EnumSet.of( Flags.NOT_UPDATEABLE, Flags.REQUIRED))); AttributeInfoBuilder grantsBuilder = new AttributeInfoBuilder(); grantsBuilder.setName(USER_AUTH_GRANTS).setCreateable(true).setUpdateable(true) .setRequired(true).setReadable(true).setMultiValued(true) .setReturnedByDefault(true); attrInfoSet.add(grantsBuilder.build()); SchemaBuilder schemaBld = new SchemaBuilder(getClass()); schemaBld.defineObjectClass(ObjectClass.ACCOUNT_NAME, attrInfoSet); return schemaBld.build(); } DB2Connector(); Uid authenticate(ObjectClass objectClass, String username, GuardedString password,
            OperationOptions options); Schema schema(); void checkAlive(); void dispose(); DB2Configuration getConfiguration(); void init(Configuration cfg); FilterTranslator<FilterWhereBuilder> createFilterTranslator(ObjectClass oclass,
            OperationOptions options); void executeQuery(ObjectClass oclass, FilterWhereBuilder where, ResultsHandler handler,
            OperationOptions options); Uid create(ObjectClass oclass, Set<Attribute> attrs, OperationOptions options); void delete(ObjectClass objClass, Uid uid, OperationOptions options); void test(); Uid update(ObjectClass objclass, Uid uid, Set<Attribute> attrs, OperationOptions options); Uid addAttributeValues(ObjectClass objclass, Uid uid, Set<Attribute> valuesToAdd,
            OperationOptions options); Uid removeAttributeValues(ObjectClass objclass, Uid uid, Set<Attribute> valuesToRemove,
            OperationOptions options); Attribute normalizeAttribute(ObjectClass oclass, Attribute attribute);  }