Ignore:
Timestamp:
Aug 28, 2012, 6:23:12 PM (12 years ago)
Author:
casties
Branch:
default
Message:

ASSIGNED - # 249: Annotations shared in groups
https://it-dev.mpiwg-berlin.mpg.de/tracs/mpdl-project-software/ticket/249

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/Actor.java

    r14 r15  
    44package de.mpiwg.itgroup.annotations;
    55
     6import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore;
    67import de.mpiwg.itgroup.annotations.old.NS;
    78
     
    2223
    2324    /**
    24      * Returns if this Actor is equivalent to an Actor with this id. If this is
     25     * Returns if this Actor is equivalent to Person person. If this is
    2526     * a Group returns true when the Person is in the Group.
    2627     *
    27      * @param userId
     28     * @param person
     29     * @param store AnnotationStore to check group membership
    2830     * @return
    2931     */
    30     public boolean isEquivalentWith(String userId) {
    31         if (userId == null) return false;
    32         if (userId.equals(getIdString())) {
     32    public boolean isEquivalentWith(Person person, AnnotationStore store) {
     33        if (person == null) return false;
     34        if (person.equals(getIdString())) {
    3335            return true;
    3436        }
    35         if (isGroup()) {
    36             // TODO: check if person in group
     37        if (isGroup() && store != null) {
     38            // check if person in group
     39            return store.isPersonInGroup(person, (Group) this);           
    3740        }
    3841        return false;
Note: See TracChangeset for help on using the changeset viewer.