1 4 package org.exoplatform.services.jcr.impl.mock; 5 6 import java.util.Collection ; 7 8 import org.exoplatform.commons.utils.PageList; 9 import org.exoplatform.services.organization.Group; 10 import org.exoplatform.services.organization.GroupEventListener; 11 import org.exoplatform.services.organization.Membership; 12 import org.exoplatform.services.organization.MembershipEventListener; 13 import org.exoplatform.services.organization.MembershipType; 14 import org.exoplatform.services.organization.OrganizationService; 15 import org.exoplatform.services.organization.OrganizationServiceListener; 16 import org.exoplatform.services.organization.Query; 17 import org.exoplatform.services.organization.User; 18 import org.exoplatform.services.organization.UserEventListener; 19 import org.exoplatform.services.organization.UserProfile; 20 import org.exoplatform.services.organization.UserProfileEventListener; 21 22 25 public class DummyOrganizationService implements OrganizationService{ 26 27 28 public void addListener(OrganizationServiceListener listener) {} 29 30 31 public void removeListener(OrganizationServiceListener listener) { 32 } 33 34 public User createUserInstance() { 35 return null; 36 } 37 38 public void createUser(User user) throws Exception { 39 } 40 41 public void saveUser(User user) throws Exception { 42 } 43 44 public User removeUser(String userName) throws Exception { 45 return null; 47 } 48 49 52 public User findUserByName(String userName) throws Exception { 53 return null; 55 } 56 57 60 public PageList findUsersByGroup(String groupId) throws Exception { 61 return null; 63 } 64 65 68 public PageList getUserPageList(int pageSize) throws Exception { 69 return null; 71 } 72 73 76 public PageList findUsers(Query query) throws Exception { 77 return null; 79 } 80 81 84 public UserProfile createUserProfileInstance() { 85 return null; 87 } 88 89 92 public void saveUserProfile(UserProfile profile) throws Exception { 93 95 } 96 97 100 public UserProfile removeUserProfile(String userName) throws Exception { 101 return null; 103 } 104 105 108 public UserProfile findUserProfileByName(String userName) throws Exception { 109 return null; 111 } 112 113 116 public Collection findUserProfiles() throws Exception { 117 return null; 119 } 120 121 124 public Group createGroupInstance() { 125 return null; 127 } 128 129 132 public void createGroup(Group group) throws Exception { 133 135 } 136 137 140 public void addChild(Group parent, Group child) throws Exception { 141 143 } 144 145 148 public void saveGroup(Group group) throws Exception { 149 151 } 152 153 156 public Group removeGroup(Group group) throws Exception { 157 return null; 159 } 160 161 164 public Collection findGroupByMembership(String userName, String membershipType) throws Exception { 165 return null; 167 } 168 169 172 public Group findGroupById(String groupId) throws Exception { 173 return null; 175 } 176 177 180 public Collection findGroups(Group parent) throws Exception { 181 return null; 183 } 184 185 188 public Collection findGroupsOfUser(String user) throws Exception { 189 return null; 191 } 192 193 196 public Membership createMembershipInstance() { 197 return null; 199 } 200 201 204 public void createMembership(Membership m) throws Exception { 205 207 } 208 209 212 public void linkMembership(String userName, Group group, Membership m) throws Exception { 213 215 } 216 217 220 public void saveMembership(Membership m) throws Exception { 221 223 } 224 225 228 public Membership removeMembership(String id) throws Exception { 229 return null; 231 } 232 233 236 public Membership findMembership(String id) throws Exception { 237 return null; 239 } 240 241 244 public Membership findMembershipByUserGroupAndType(String userName, String groupId, String type) throws Exception { 245 return null; 247 } 248 249 252 public Collection findMembershipsByUserAndGroup(String userName, String groupId) throws Exception { 253 return null; 255 } 256 257 260 public Collection findMembershipsByUser(String userName) throws Exception { 261 return null; 263 } 264 265 268 public Collection findMembershipsByGroup(Group group) throws Exception { 269 return null; 271 } 272 273 276 public MembershipType createMembershipTypeInstance() { 277 return null; 279 } 280 281 284 public MembershipType createMembershipType(MembershipType mt) throws Exception { 285 return null; 287 } 288 289 292 public MembershipType saveMembershipType(MembershipType mt) throws Exception { 293 return null; 295 } 296 297 300 public MembershipType removeMembershipType(String name) throws Exception { 301 return null; 303 } 304 305 308 public MembershipType findMembershipType(String name) throws Exception { 309 return null; 311 } 312 313 316 public Collection findMembershipTypes() throws Exception { 317 return null; 319 } 320 321 324 public void addUserEventListener(UserEventListener listener) { 325 327 } 328 329 332 public void addUserProfileEventListener(UserProfileEventListener listener) { 333 335 } 336 337 340 public void addGroupEventListener(GroupEventListener listener) { 341 343 } 344 345 348 public void addMembershipEventListener(MembershipEventListener listener) { 349 351 } 352 353 356 public boolean authenticate(String username, String password) throws Exception { 357 if("exo".equals(username) && "exo".equals(password)) 358 return true; 359 return false; 360 } 361 362 } 363 | Popular Tags |