Merged V3.0 to HEAD

12145: Merged V2.2 to V3.0 (AuthenticationUtil)
    12109: AuthenticationUtil and AuthenticationComponent refactor
  12152: Removed Lucene usage from lookup of 'sites' root folder
  12153: Fix InviteServiceTest by cleaning up leaking authentications
  12159: Fix for broken usage pattern of the Threadlocal values in recent AuthenticationUtil refactor.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12508 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-12-19 12:15:59 +00:00
parent 21bb599e20
commit cd09266213
74 changed files with 870 additions and 997 deletions

View File

@@ -35,7 +35,7 @@ import net.sf.acegisecurity.context.ContextInvalidException;
*/
public class AlfrescoSecureContextImpl implements AlfrescoSecureContext
{
private Authentication storedAuthentication;
private static final long serialVersionUID = -8893133731693272549L;
private Authentication realAuthentication;
@@ -78,11 +78,6 @@ public class AlfrescoSecureContextImpl implements AlfrescoSecureContext
return realAuthentication;
}
public Authentication getStoredAuthentication()
{
return storedAuthentication;
}
public void setEffectiveAuthentication(Authentication effictiveAuthentication)
{
this.effectiveAuthentication = effictiveAuthentication;
@@ -93,11 +88,6 @@ public class AlfrescoSecureContextImpl implements AlfrescoSecureContext
this.realAuthentication = realAuthentication;
}
public void setStoredAuthentication(Authentication storedAuthentication)
{
this.storedAuthentication = storedAuthentication;
}
@Override
public int hashCode()
{
@@ -105,7 +95,6 @@ public class AlfrescoSecureContextImpl implements AlfrescoSecureContext
int result = 1;
result = PRIME * result + ((effectiveAuthentication == null) ? 0 : effectiveAuthentication.hashCode());
result = PRIME * result + ((realAuthentication == null) ? 0 : realAuthentication.hashCode());
result = PRIME * result + ((storedAuthentication == null) ? 0 : storedAuthentication.hashCode());
return result;
}
@@ -133,13 +122,6 @@ public class AlfrescoSecureContextImpl implements AlfrescoSecureContext
}
else if (!realAuthentication.equals(other.realAuthentication))
return false;
if (storedAuthentication == null)
{
if (other.storedAuthentication != null)
return false;
}
else if (!storedAuthentication.equals(other.storedAuthentication))
return false;
return true;
}
@@ -168,15 +150,6 @@ public class AlfrescoSecureContextImpl implements AlfrescoSecureContext
}
builder.append(", ");
if (storedAuthentication == null)
{
builder.append("Stored authenticaion = null");
}
else
{
builder.append("Stored authenticaion = " + storedAuthentication.toString());
}
return builder.toString();
}