Package org.apache.jetspeed.security.mapping

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


        {
            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


        {
            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

        public boolean equals(Object obj)
        {
            if (this == obj) return true;
            if (obj == null) return false;
            if (getClass() != obj.getClass()) return false;
            SecurityEntityRelationType other = (SecurityEntityRelationType) obj;
            if (relationType == null)
            {
                if (other.getRelationType() != null) return false;
            } else if (!relationType.equals(other.getRelationType())) return false;
            if (sourceEntityType == null)
            {
                if (other.getFromEntityType() != null) return false;
            } else if (!sourceEntityType.equals(other.getFromEntityType()))
                return false;
            if (targetEntityType == null)
            {
                if (other.getToEntityType() != null) return false;
            } else if (!targetEntityType.equals(other.getToEntityType()))
                return false;
            return true;
        }
View Full Code Here

TOP

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

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.