001 /** 002 * 003 */ 004 package org.springframework.richclient.security.support; 005 006 import org.springframework.richclient.core.Authorizable; 007 008 /** 009 * Authorizable object for test support 010 * @author Larry Streepy 011 */ 012 public class TestAuthorizable implements Authorizable { 013 014 private boolean authorized; 015 private int authCount = 0; 016 017 public TestAuthorizable() { 018 authorized = false; 019 } 020 021 public TestAuthorizable( boolean authorized ) { 022 this.authorized = authorized; 023 } 024 025 public void setAuthorized(boolean authorized) { 026 authCount += 1; 027 this.authorized = authorized; 028 } 029 030 public boolean isAuthorized() { 031 return authorized; 032 } 033 034 public int getAuthCount() { 035 return authCount; 036 } 037 public void resetAuthCount() { 038 authCount = 0; 039 } 040 }