Package org.apache.jetspeed.security.mapping

Examples of org.apache.jetspeed.security.mapping.EntityFactory


    public void addAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) throws SecurityException
    {
        if (!SynchronizationStateAccess.isSynchronizing())
        {
            EntityFactory entityFactory = ldapEntityManager.getEntityFactory(from.getType().getName());
            EntityFactory relatedFactory = ldapEntityManager.getEntityFactory(to.getType().getName());
            Entity fromEntity = entityFactory.createEntity(from);
            Entity toEntity = relatedFactory.createEntity(to);
            SecurityEntityRelationType relationType = new SecurityEntityRelationTypeImpl(associationName, fromEntity.getType(), toEntity.getType());
            ldapEntityManager.addRelation(fromEntity, toEntity, relationType);
        }
        databaseStorageManager.addAssociation(from, to, associationName);
    }
View Full Code Here


    public void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) throws SecurityException
    {
        if (!SynchronizationStateAccess.isSynchronizing())
        {
            EntityFactory entityFactory = ldapEntityManager.getEntityFactory(from.getType().getName());
            EntityFactory relatedFactory = ldapEntityManager.getEntityFactory(to.getType().getName());
            Entity fromEntity = entityFactory.createEntity(from);
            Entity toEntity = relatedFactory.createEntity(to);
            SecurityEntityRelationType relationType = new SecurityEntityRelationTypeImpl(associationName, fromEntity.getType(), toEntity.getType());
            ldapEntityManager.removeRelation(fromEntity, toEntity, relationType);
            databaseStorageManager.removeAssociation(from, to, associationName);
        }
    }
View Full Code Here

        this.ldapEntityManager = ldapEntityManager;
    }

    public void addPrincipal(JetspeedPrincipal principal, Set<JetspeedPrincipalAssociationReference> associations) throws SecurityException
    {
        EntityFactory entityFactory = ldapEntityManager.getEntityFactory(principal.getType().getName());
        if (!SynchronizationStateAccess.isSynchronizing())
        {
            ldapEntityManager.addEntity(entityFactory.createEntity(principal));
        }
        delegateJpsm.addPrincipal(principal, associations);
    }
View Full Code Here

        return false;
    }

    public void removePrincipal(JetspeedPrincipal principal) throws SecurityException
    {
        EntityFactory entityFactory = ldapEntityManager.getEntityFactory(principal.getType().getName());
        if (!SynchronizationStateAccess.isSynchronizing())
        {
            ldapEntityManager.removeEntity(entityFactory.createEntity(principal));
        }
        delegateJpsm.removePrincipal(principal);
    }
View Full Code Here

        delegateJpsm.removePrincipal(principal);
    }

    public void updatePrincipal(JetspeedPrincipal principal) throws SecurityException
    {
        EntityFactory entityFactory = ldapEntityManager.getEntityFactory(principal.getType().getName());
        if (!SynchronizationStateAccess.isSynchronizing())
        {
            ldapEntityManager.updateEntity(entityFactory.createEntity(principal));
        }
        delegateJpsm.updatePrincipal(principal);
    }
View Full Code Here

    public void addPrincipal(JetspeedPrincipal principal, Set<JetspeedPrincipalAssociationReference> associations) throws SecurityException
    {
        if (!SynchronizationStateAccess.isSynchronizing() && !ldapEntityManager.isReadOnly())
        {
            EntityFactory entityFactory = ldapEntityManager.getEntityFactory(principal.getType().getName());
            if (entityFactory.isCreateAllowed())
            {
                ldapEntityManager.addEntity(entityFactory.createEntity(principal));
            }
        }
        delegateJpsm.addPrincipal(principal, associations);
    }
View Full Code Here

    public void removePrincipal(JetspeedPrincipal principal) throws SecurityException
    {
        if (!SynchronizationStateAccess.isSynchronizing() && !ldapEntityManager.isReadOnly())
        {
            EntityFactory entityFactory = ldapEntityManager.getEntityFactory(principal.getType().getName());
            if (entityFactory.isRemoveAllowed())
            {
                ldapEntityManager.removeEntity(entityFactory.createEntity(principal));
            }
        }
        delegateJpsm.removePrincipal(principal);
    }
View Full Code Here

    public void updatePrincipal(JetspeedPrincipal principal) throws SecurityException
    {
        if (!SynchronizationStateAccess.isSynchronizing() && !ldapEntityManager.isReadOnly())
        {
            EntityFactory entityFactory = ldapEntityManager.getEntityFactory(principal.getType().getName());
            if (entityFactory.isUpdateAllowed())
            {
                ldapEntityManager.updateEntity(entityFactory.createEntity(principal));
            }
        }
        delegateJpsm.updatePrincipal(principal);
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.security.mapping.EntityFactory

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.