Package org.jasig.portal

Examples of org.jasig.portal.EntityIdentifier


        Iterator<IGroupMember> membersIterator = group.getMembers();

        while (membersIterator != null && membersIterator.hasNext()) {
            IGroupMember iGroupMember = membersIterator.next();
            EntityIdentifier entityIdentifier = iGroupMember
                    .getEntityIdentifier();

            String identifier = entityIdentifier.getKey();

            gcAddMember.addSubjectIdentifier(identifier);
        }
        gcAddMember.execute();
View Full Code Here


        {
            File[] files = ((File)itr.next()).listFiles(filter);
            for ( int filesIdx=0; filesIdx<files.length; filesIdx++ )
            {
                String key = getKeyFromFile(files[filesIdx]);
                EntityIdentifier ei = new EntityIdentifier(key, EntityTypes.GROUP_ENTITY_TYPE);
                ids.add(ei);
            }
        }
    }
View Full Code Here

   
    /* (non-Javadoc)
     * @see org.jasig.portal.concurrency.IEntityCachingService#add(org.jasig.portal.IBasicEntity)
     */
    public void add(IBasicEntity entity) throws CachingException {
        final EntityIdentifier entityIdentifier = entity.getEntityIdentifier();
        final Class<? extends IBasicEntity> entityType = entityIdentifier.getType();
        final IEntityCache entityCache = this.getCache(entityType);
       
        entityCache.add(entity);
    }
View Full Code Here

   public UserFragmentSubscriptionImpl(IPerson person, IPerson fragmentOwner) {
       this.userFragmentInfoId = -1;
       this.entityVersion = -1;
       this.active = true;
       this.fragmentOwner = fragmentOwner.getUserName();
       this.entityIdentifier = new EntityIdentifier(String.valueOf(this.fragmentOwner), IUserFragmentSubscription.class);
       this.userId = person.getID();
       this.createdBy = person.getUserName();
   }
View Full Code Here

    /* (non-Javadoc)
     * @see org.jasig.portal.concurrency.IEntityCache#add(org.jasig.portal.IBasicEntity)
     */
    public void add(IBasicEntity entity) throws CachingException {
        final EntityIdentifier entityIdentifier = entity.getEntityIdentifier();
        final Class<? extends IBasicEntity> addType = entityIdentifier.getType();
       
        if (!this.entityType.isAssignableFrom(addType)) {
            throw new CachingException("Problem adding " + entity + ": entity type '" + addType + "' is incompatible with cache type '" + this.entityType + "'.");
        }

        this.cache.put(entityIdentifier.getKey(), entity);
    }
View Full Code Here

            }
        }
      } else if (gm.isEntity() && gm.getEntityType().equals(ROOT_GROUP.getEntityType())) { 
         
          // Ask the individual...
        EntityIdentifier ei = gm.getUnderlyingEntityIdentifier();
        Map<String,List<Object>> seed = new HashMap<String,List<Object>>();
        List<Object> seedValue = new LinkedList<Object>();
        seedValue.add(ei.getKey());
        seed.put(IPerson.USERNAME, seedValue);
        Map<String,List<Object>> attr = PersonAttributeDaoLocator.getPersonAttributeDao().getMultivaluedUserAttributes(seed);
            // avoid NPEs and unnecessary IPerson creation
            if (attr != null && !attr.isEmpty()) {
                IPerson p = PersonFactory.createPerson();
View Full Code Here

      List<EntityIdentifier> rslt = new LinkedList<EntityIdentifier>();
      for (Map.Entry<String,List<String>> y : groupsTree.getKeysByUpperCaseName().entrySet()) {
        if (y.getKey().matches(regex)) {
          List<String> keys = y.getValue();
          for (String k : keys) {
            rslt.add(new EntityIdentifier(k, IEntityGroup.class));
          }
        }
      }
     
      return rslt.toArray(new EntityIdentifier[0]);
View Full Code Here

    testValue = testEntities[totNumEntities].isMemberOf(childGroup);
    assertEquals(msg, true, testValue);

    msg = "Getting child entity thru the service (should be cached copy).";
    print(msg);
    EntityIdentifier entID = testEntities[totNumEntities].getUnderlyingEntityIdentifier();
    IGroupMember ent = GroupService.getGroupMember(entID);
    msg = "Checking child entity for membership in child group.";
    print(msg);
    testValue = ent.isMemberOf(childGroup);
    assertEquals(msg, true, testValue);
View Full Code Here

    private class TestEntity implements IBasicEntity
    {
        private EntityIdentifier entityIdentifier;
        private TestEntity(String entityKey) {
            super();
            entityIdentifier = new EntityIdentifier(entityKey, this.getClass());
        }
View Full Code Here

                        if(groupName.equalsIgnoreCase(groupMemberName)) {
                            Iterator it = groupMember.getAllMembers();

                            while(it.hasNext()) {
                                IEntity e = (IEntity)it.next();
                                EntityIdentifier ident = e.getUnderlyingEntityIdentifier();
                                Entity member = findMember(ident.getKey(),true);
                                members.add(member);
                            }
                            return members;
                        }
                    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.EntityIdentifier

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.