Search in sources :

Example 16 with IntAttrName

use of org.apache.syncope.core.provisioning.api.IntAttrName in project syncope by apache.

the class IntAttrNameParserTest method enclosingGroup.

@Test
public void enclosingGroup() throws ParseException {
    IntAttrName intAttrName = intAttrNameParser.parse("groups[readers].cn", AnyTypeKind.USER);
    assertNotNull(intAttrName);
    assertEquals(AnyTypeKind.GROUP, intAttrName.getAnyTypeKind());
    assertNull(intAttrName.getField());
    assertEquals("cn", intAttrName.getSchemaName());
    assertEquals(SchemaType.DERIVED, intAttrName.getSchemaType());
    assertEquals("readers", intAttrName.getEnclosingGroup());
    assertNull(intAttrName.getMembershipOfGroup());
    assertNull(intAttrName.getRelatedAnyObject());
    assertNull(intAttrName.getPrivilegesOfApplication());
}
Also used : IntAttrName(org.apache.syncope.core.provisioning.api.IntAttrName) Test(org.junit.jupiter.api.Test)

Example 17 with IntAttrName

use of org.apache.syncope.core.provisioning.api.IntAttrName in project syncope by apache.

the class IntAttrNameParserTest method membership.

@Test
public void membership() throws ParseException {
    IntAttrName intAttrName = intAttrNameParser.parse("memberships[top].cn", AnyTypeKind.USER);
    assertNotNull(intAttrName);
    assertEquals(AnyTypeKind.USER, intAttrName.getAnyTypeKind());
    assertNull(intAttrName.getField());
    assertEquals("cn", intAttrName.getSchemaName());
    assertEquals(SchemaType.DERIVED, intAttrName.getSchemaType());
    assertNull(intAttrName.getEnclosingGroup());
    assertEquals("top", intAttrName.getMembershipOfGroup());
    assertNull(intAttrName.getRelatedAnyObject());
    assertNull(intAttrName.getPrivilegesOfApplication());
}
Also used : IntAttrName(org.apache.syncope.core.provisioning.api.IntAttrName) Test(org.junit.jupiter.api.Test)

Aggregations

IntAttrName (org.apache.syncope.core.provisioning.api.IntAttrName)17 ParseException (java.text.ParseException)11 ArrayList (java.util.ArrayList)8 PlainAttrValue (org.apache.syncope.core.persistence.api.entity.PlainAttrValue)6 Test (org.junit.jupiter.api.Test)6 List (java.util.List)5 Optional (java.util.Optional)5 VirSchema (org.apache.syncope.core.persistence.api.entity.VirSchema)5 ItemTransformer (org.apache.syncope.core.provisioning.api.data.ItemTransformer)5 Collections (java.util.Collections)4 AttrTO (org.apache.syncope.common.lib.to.AttrTO)4 ParsingValidationException (org.apache.syncope.core.persistence.api.attrvalue.validation.ParsingValidationException)4 PlainSchema (org.apache.syncope.core.persistence.api.entity.PlainSchema)4 AnyObject (org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject)4 User (org.apache.syncope.core.persistence.api.entity.user.User)4 Attribute (org.identityconnectors.framework.common.objects.Attribute)4 Date (java.util.Date)3 HashSet (java.util.HashSet)3 Pair (org.apache.commons.lang3.tuple.Pair)3 AttrSchemaType (org.apache.syncope.common.lib.types.AttrSchemaType)3