Examples of IEntityGroup


Examples of org.jasig.portal.groups.IEntityGroup

      String chanKey = String.valueOf(channelDefinition.getId());
      IEntity channelDefEntity = GroupService.getEntity(chanKey, IChannelDefinition.class);
    @SuppressWarnings("unchecked")
      Iterator iter = channelDefEntity.getAllContainingGroups();
      while (iter.hasNext()) {
          IEntityGroup group = (IEntityGroup) iter.next();
          group.removeMember(channelDefEntity);
          group.update();
      }

      // remove permissions
      AuthorizationService authService = AuthorizationService.instance();
      String target = IPermission.CHANNEL_PREFIX + channelDefinition.getId();
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

     * @param parent the destination category
     * @throws org.jasig.portal.groups.GroupsException
     */
    public void addCategoryToCategory(ChannelCategory child, ChannelCategory parent) throws GroupsException {
        String childKey = String.valueOf(child.getId());
        IEntityGroup childGroup = GroupService.findGroup(childKey);
        String parentKey = String.valueOf(parent.getId());
        IEntityGroup parentGroup = GroupService.findGroup(parentKey);
        parentGroup.addMember(childGroup);
        parentGroup.updateMembers();
    }
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

     * @throws org.jasig.portal.PortalException
     */
    public void addChannelToCategory(IChannelDefinition channelDef, ChannelCategory category) throws PortalException {
        String channelDefKey = String.valueOf(channelDef.getId());
        IEntity channelDefEntity = GroupService.getEntity(channelDefKey, IChannelDefinition.class);
        IEntityGroup categoryGroup = GroupService.findGroup(category.getId());
        categoryGroup.addMember(channelDefEntity);
        categoryGroup.updateMembers();
    }
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

     * @param channelCategoryId the id of the category to get
     * @return channelCategory the channel category
     * @throws org.jasig.portal.groups.GroupsException
     */
    public ChannelCategory getChannelCategory(String channelCategoryId) throws GroupsException {
        IEntityGroup categoryGroup = GroupService.findGroup(channelCategoryId);
        ChannelCategory category = new ChannelCategory(channelCategoryId);
        category.setName(categoryGroup.getName());
        category.setDescription(categoryGroup.getDescription());
        category.setCreatorId(categoryGroup.getCreatorID());
        return category;
    }
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

     * @throws org.jasig.portal.groups.GroupsException
     */
    @SuppressWarnings("unchecked")
    public ChannelCategory[] getChildCategories(ChannelCategory parent) throws GroupsException {
        String parentKey = String.valueOf(parent.getId());
        IEntityGroup parentGroup = GroupService.findGroup(parentKey);
        Set<ChannelCategory> categories = new HashSet<ChannelCategory>();
        Iterator<IGroupMember> iter = parentGroup.getMembers();
        while (iter.hasNext()) {
            IGroupMember gm = iter.next();
            if (gm.isGroup()) {
                String categoryId = gm.getKey();
                categories.add(getChannelCategory(categoryId));
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

     * @throws org.jasig.portal.groups.GroupsException
     */
    @SuppressWarnings("unchecked")
    public IChannelDefinition[] getChildChannels(ChannelCategory parent) {
        String parentKey = String.valueOf(parent.getId());
        IEntityGroup parentGroup = GroupService.findGroup(parentKey);
        Set<IChannelDefinition> channelDefs = new HashSet<IChannelDefinition>();
        Iterator<IGroupMember> iter = parentGroup.getMembers();
        while (iter.hasNext()) {
            IGroupMember gm = (IGroupMember)iter.next();
            if (gm.isEntity()) {
                int channelPublishId = Integer.parseInt(gm.getKey());
                channelDefs.add(getChannelDefinition(channelPublishId));
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

    EntityIdentifier ei = person.getEntityIdentifier();
      IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
     
        String parentKey = String.valueOf(parent.getId());
        IEntityGroup parentGroup = GroupService.findGroup(parentKey);
        Set<IChannelDefinition> channelDefs = new HashSet<IChannelDefinition>();
        Iterator<IGroupMember> iter = parentGroup.getMembers();
        while (iter.hasNext()) {
            IGroupMember gm = (IGroupMember)iter.next();
            if (gm.isEntity()) {
                int channelPublishId = Integer.parseInt(gm.getKey());
              if(ap.canSubscribe(channelPublishId)) {
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

    EntityIdentifier ei = person.getEntityIdentifier();
      IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
     
        String parentKey = String.valueOf(parent.getId());
        IEntityGroup parentGroup = GroupService.findGroup(parentKey);
        Set<IChannelDefinition> channelDefs = new HashSet<IChannelDefinition>();
        Iterator<IGroupMember> iter = parentGroup.getMembers();
        while (iter.hasNext()) {
            IGroupMember gm = (IGroupMember)iter.next();
            if (gm.isEntity()) {
                int channelPublishId = Integer.parseInt(gm.getKey());
              if(ap.canManage(channelPublishId)) {
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

     * @throws org.jasig.portal.groups.GroupsException
     */
    @SuppressWarnings("unchecked")
    public ChannelCategory[] getParentCategories(ChannelCategory child) throws GroupsException {
        String childKey = String.valueOf(child.getId());
        IEntityGroup childGroup = GroupService.findGroup(childKey);
        Set<ChannelCategory> parents = new HashSet<ChannelCategory>();
        Iterator iter = childGroup.getContainingGroups();
        while (iter.hasNext()) {
            IGroupMember gm = (IGroupMember)iter.next();
            if (gm.isGroup()) {
                String categoryId = gm.getKey();
                parents.add(getChannelCategory(categoryId));
View Full Code Here

Examples of org.jasig.portal.groups.IEntityGroup

     * Gets top level channel category
     * @return channelCategories the new channel category
     * @throws org.jasig.portal.groups.GroupsException
     */
    public ChannelCategory getTopLevelChannelCategory() throws GroupsException {
        IEntityGroup categoryGroup = GroupService.getDistinguishedGroup(IGroupConstants.CHANNEL_CATEGORIES);
        return getChannelCategory(categoryGroup.getKey());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.