Package org.jasig.portal

Examples of org.jasig.portal.EntityIdentifier


/**
* GroupMemberImpl constructor
*/
public GroupMemberImpl(String key, Class type) throws GroupsException
{
    this(new EntityIdentifier(key, type));
}
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 = PersonDirectory.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

        private MinimalEntity(String entityKey) {
            super();
            key = entityKey;
        }
        public EntityIdentifier getEntityIdentifier() {
            return new EntityIdentifier(getKey(), getType());
        }
View Full Code Here

        // Decide whether to render a friendly or detailed screen
        this.ssTitle = "friendly";
        try {
            AuthorizationService authService = AuthorizationService.instance();
            EntityIdentifier ei = this.portcs.getUserPreferencesManager()
                    .getPerson().getEntityIdentifier();
            IAuthorizationPrincipal ap = authService.newPrincipal(ei.getKey(),
                    ei.getType());
            if (ap.hasPermission("UP_ERROR_CHAN", "VIEW", "DETAILS"))
                this.ssTitle = "detailed";
        } catch (Throwable t) {
            log.error("Exception checking whether user authorized to view " +
                    "detailed CError view.  Defaulting to friendly view.", t);
View Full Code Here

/**
* CachedEntityInvalidation constructor.
*/
public CachedEntityInvalidation(Class eType, String eKey, Date time, int cache)
{
    this( new EntityIdentifier(eKey, eType), time, cache );
}
View Full Code Here

  public void setAttribute (String key, Object value) {
    if (m_Attributes == null)
      m_Attributes = new Hashtable();
    if (value!=null) m_Attributes.put(key, value);
    if (key.equals(IPerson.USERNAME)){
       m_eid = new EntityIdentifier(String.valueOf(value),IPerson.class);
    }
  }
View Full Code Here

}
public PermissionSetImpl(IPermission[] perms, String key, Class type)
{
    super();
    permissions = perms;
    entityIdentifier = new EntityIdentifier(key, type);
}
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.