Package org.apache.jetspeed.security.mapping.impl

Examples of org.apache.jetspeed.security.mapping.impl.CollectingEntitySearchResultHandler


        }
    }

    public Entity getEntity(String entityId) throws SecurityException
    {
        CollectingEntitySearchResultHandler handler = new CollectingEntitySearchResultHandler(1);
        getEntities(new EqualsFilter(configuration.getLdapIdAttribute(), entityId), handler);
        return handler.getCount() == 1 ? handler.getSingleResult() : null;
    }
View Full Code Here


        getEntities(filter, handler);
    }

    public Entity getEntityByInternalId(String internalId) throws SecurityException
    {
        CollectingEntitySearchResultHandler handler = new CollectingEntitySearchResultHandler(1);
        getEntityByInternalId(internalId, handler);
        return handler.getSingleResult();
    }
View Full Code Here

        TestCase.assertEquals(true, resultUser.equals(sampleEntity));
    }

    public void testFetchAllEntities(int totalNrOfUsers) throws Exception
    {
        CollectingEntitySearchResultHandler handler = new CollectingEntitySearchResultHandler();
        entityManager.getAllEntities("user", handler);
        TestCase.assertNotNull(handler.getResults());
        TestCase.assertEquals(totalNrOfUsers, handler.getSize());
    }
View Full Code Here

            String toEntityType, String relationType, String toEntityId,
            Collection<Entity> expectedEntities) throws Exception
    {
        Entity randomEntity = entityManager.getEntity(toEntityType,toEntityId);
        TestCase.assertNotNull(randomEntity);
        CollectingEntitySearchResultHandler handler = new CollectingEntitySearchResultHandler();
        entityManager.getRelatedEntitiesTo(randomEntity, new SecurityEntityRelationTypeImpl(relationType,fromEntityType,toEntityType), handler);
        basicEntityResultSetChecks(expectedEntities, handler.getResults());
    }
View Full Code Here

            String toEntityType, String relationType, String fromEntityId,
            Collection<Entity> expectedEntities) throws Exception
    {
        Entity randomEntity = entityManager.getEntity(fromEntityType,fromEntityId);
        TestCase.assertNotNull(randomEntity);
        CollectingEntitySearchResultHandler handler = new CollectingEntitySearchResultHandler();
        entityManager.getRelatedEntitiesFrom(randomEntity, new SecurityEntityRelationTypeImpl(relationType,fromEntityType,toEntityType), handler);
        basicEntityResultSetChecks(expectedEntities, handler.getResults());
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.security.mapping.impl.CollectingEntitySearchResultHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.