1 53 54 package com.Yasna.forum; 55 56 import java.util.*; 57 58 66 class ForumModeratorIteratorProxy extends IteratorProxy { 67 68 private ArrayList forums = new ArrayList(); 69 70 public ForumModeratorIteratorProxy(Iterator iterator, Authorization 71 authorization, ForumPermissions permissions) 72 { 73 super(iterator, authorization, permissions); 76 77 while (iterator.hasNext()) { 78 Forum forum = (Forum)iterator.next(); 79 ForumPermissions forumPermissions = forum.getPermissions(authorization); 80 if (forumPermissions.get(ForumPermissions.SYSTEM_ADMIN)|| 85 forumPermissions.get(ForumPermissions.FORUM_ADMIN)|| 86 forumPermissions.get(ForumPermissions.MODERATOR)){ 87 ForumProxy proxy = new ForumProxy(forum, authorization, forumPermissions); 88 forums.add(proxy); 89 } 90 } 91 92 this.iterator = forums.listIterator(); 93 } 94 95 public Object next() throws java.util.NoSuchElementException { 96 return iterator.next(); 97 } 98 } 99 | Popular Tags |