Java tutorial
/******************************************************************************* * Educational Online Test Delivery System * Copyright (c) 2013 American Institutes for Research * * Distributed under the AIR Open Source License, Version 1.0 * See accompanying file AIR-License-1_0.txt or at * http://www.smarterapp.org/documents/American_Institutes_for_Research_Open_Source_Software_License.pdf ******************************************************************************/ package org.opentestsystem.delivery.testreg.service.impl; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import org.opentestsystem.delivery.testreg.domain.Sb11Entity; import org.opentestsystem.delivery.testreg.domain.TestRegPermission; import org.opentestsystem.delivery.testreg.domain.amqp.StudentSecurity; import org.opentestsystem.delivery.testreg.service.TestRegUserDetailsService; import org.opentestsystem.shared.security.domain.SbacRole; import org.opentestsystem.shared.security.domain.SbacUser; import org.opentestsystem.shared.security.domain.permission.UserRole; import org.opentestsystem.shared.security.service.UserDetailsServiceImpl; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.saml.SAMLCredential; import org.springframework.stereotype.Service; import java.util.Collection; import java.util.List; import java.util.Set; @Service public class MockTestRegUserDetailsServiceImpl extends UserDetailsServiceImpl implements TestRegUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCred) throws UsernameNotFoundException { return super.loadUserBySAML(samlCred); } @Override public boolean hasAccess(Object obj, TestRegPermission testRegPermission) { return true; } @Override public Set<String> getMongoIdsOfEntitiesCurrentUserHasAccessTo(StudentSecurity studentSecurity) { return null; } @Override public Set<String> getMongoIdsOfEntitiesCurrentUserHasAccessTo() { return null; } @Override public Collection<SbacRole> getCurrentUserSbacRoles(boolean includeNonEffectiveRoles) { return null; } @Override public SbacUser getCurrentUser() { Multimap<String, SbacRole> roles = ArrayListMultimap.create(); return new SbacUser(roles, null); } @Override public List<UserRole> getAllUserRolesForCurrentUser() { return null; } @Override public Set<String> getCurrentUserSbacRoleNamesThatAreProtected(boolean includeNonEffectiveRoles) { return null; } @Override public List<String> getProtectedUserRoleNamesThatTheCurrentUserDoesNotHave() { return null; } @Override public String convertRoleToEffectiveEntityMongoId(SbacRole sbacRole) { return null; } @Override public Sb11Entity convertRoleToEffectiveEntity(SbacRole sbacRole) { return null; } @Override public void evictRoleToEntityCache() { } @Override public boolean isElevatedAccessUser() { return false; } @Override public void evictRoleToEntityCacheForUser(String userName) { } @Override public void evictAccessibleUsersCache() { } @Override public void evictAccessibleUsersCacheForUser(String userName) { } }