/** * Deprecated: use ObjectAsserter instead. */ @Deprecated protected void assertObjectSanity(PrismObject<? extends ObjectType> object) { object.checkConsistence(true, true, ConsistencyCheckScope.THOROUGH); assertTrue("Incomplete definition in "+object, object.hasCompleteDefinition()); assertFalse("No OID", StringUtils.isEmpty(object.getOid())); assertNotNull("Null name in "+object, object.asObjectable().getName()); }
private void assertUserElisabeth(PrismObject<UserType> user) throws SchemaException { user.checkConsistence(); user.assertDefinitions("test"); assertUserElisabethExtension(user); //assertVisitor(user,55); }
protected void assertObject(PrismObject<? extends ObjectType> object) { object.checkConsistence(true, true, ConsistencyCheckScope.THOROUGH); assertTrue("Incomplete definition in "+object, object.hasCompleteDefinition()); assertFalse("No OID", StringUtils.isEmpty(object.getOid())); assertNotNull("Null name in "+object, object.asObjectable().getName()); }
@Override protected void assertPrismObjectLocal(PrismObject<FormType> form) throws SchemaException { assertFormPrism(form, true); assertFormJaxb(form.asObjectable(), true); form.checkConsistence(true, true); }
protected void assertUserAdhoc(PrismObject<UserType> user, boolean expectRawInConstructions) throws SchemaException { user.checkConsistence(); assertUserJackContent(user, expectRawInConstructions); assertUserExtensionAdhoc(user); assertVisitor(user, 58); }
private void assertUserWill(PrismObject<UserType> user) throws SchemaException { user.checkConsistence(); user.assertDefinitions("test"); assertUserWillExtension(user); assertVisitor(user,55); }
@Override protected void assertPrismObjectLocal(PrismObject<RoleType> metarole) throws SchemaException { assertMetarolePrism(metarole, true); assertMetaroleJaxb(metarole.asObjectable(), true); metarole.checkConsistence(true, true); }
@Override protected void assertPrismObjectLocal(PrismObject<ShadowType> object) throws SchemaException { assertPrism(object, true); assertJaxb(object.asObjectable(), true); object.checkConsistence(true, false); }
protected void assertResource(PrismObject<ResourceType> resource, boolean checkConsistence, boolean checkJaxb, boolean isSimple) throws SchemaException, JAXBException { if (checkConsistence) { resource.checkConsistence(); } assertResourcePrism(resource, isSimple); assertResourceJaxb(resource.asObjectable(), isSimple); if (checkJaxb) { // serializeDom(resource); //serializeJaxb(resource); } }
@Override protected void assertPrismObjectLocal(PrismObject<UserType> user) throws SchemaException { assertUserPrism(user, true); assertUserJaxb(user.asObjectable(), true); user.checkConsistence(true, true); }
@Override protected void assertPrismObjectLocal(PrismObject<SystemConfigurationType> object) throws SchemaException { assertPrism(object, true); assertJaxb(object.asObjectable(), true); object.checkConsistence(true, true); }
protected void assertPrismObject(PrismObject<O> object) throws SchemaException { assertDefinitions(object); object.checkConsistence(); object.assertDefinitions(true, ""); assertPrismContext(object); assertPrismObjectLocal(object); }
@Override protected void assertPrismContainerValueLocal(PrismContainerValue<ShadowType> value) throws SchemaException { PrismObject object = value.asContainerable().asPrismObject(); object.checkConsistence(); assertPrism(object, false); assertJaxb(value.asContainerable(), false); }
@Override protected void assertPrismContainerValueLocal(PrismContainerValue<UserType> value) throws SchemaException { PrismObject user = value.asContainerable().asPrismObject(); user.checkConsistence(); assertUserPrism(user, false); assertUserJaxb(value.asContainerable(), false); }
@Override protected void assertPrismContainerValueLocal(PrismContainerValue<SystemConfigurationType> value) throws SchemaException { PrismObject<SystemConfigurationType> object = value.asContainerable().asPrismObject(); object.checkConsistence(); assertPrism(object, false); assertJaxb(value.asContainerable(), false); }
@Override protected void assertPrismContainerValueLocal(PrismContainerValue<FormType> value) throws SchemaException { PrismObject form = value.asContainerable().asPrismObject(); form.checkConsistence(); assertFormPrism(form, false); assertFormJaxb(value.asContainerable(), false); }
protected void assertJack(UserType userType) { display("User in principal jack", userType.asPrismObject()); assertUserJack(userType.asPrismObject()); userType.asPrismObject().checkConsistence(true, true); }
@Override protected void assertPrismContainerValueLocal(PrismContainerValue<RoleType> value) throws SchemaException { PrismObject user = value.asContainerable().asPrismObject(); user.checkConsistence(); assertMetarolePrism(user, false); assertMetaroleJaxb(value.asContainerable(), false); }
private void assertUserDrake(PrismObject<UserType> user, boolean assertDefinitions, PrismContext prismContext) throws SchemaException, SAXException, IOException { assertEquals("Wrong OID", USER_OID, user.getOid()); assertEquals("Wrong compileTimeClass", UserType.class, user.getCompileTimeClass()); user.checkConsistence(); assertUserDrakeContent(user, assertDefinitions); if (assertDefinitions) { serializeAndValidate(user, prismContext); } }
protected <F extends FocusType> ObjectDelta<F> addModificationToContextAddProjection( LensContext<F> context, Class<F> focusType, File file) throws JAXBException, SchemaException, IOException { PrismObject<ShadowType> account = PrismTestUtil.parseObject(file); account.trim(); account.checkConsistence(); LensFocusContext<F> focusContext = context.getOrCreateFocusContext(); ObjectDelta<F> userDelta = prismContext.deltaFactory().object().createModificationAddReference(focusType, focusContext .getObjectOld().getOid(), FocusType.F_LINK_REF, account); focusContext.addPrimaryDelta(userDelta); return userDelta; }