Merged HEAD-QA to HEAD (4.2) (including moving test classes into separate folders)

51903 to 54309 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54310 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Samuel Langlois
2013-08-20 17:17:31 +00:00
parent a91f6e2535
commit 788d3c9c89
777 changed files with 77820 additions and 23746 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -558,23 +558,39 @@ public class Utils
/**
* Gets the current http session id
*
* @return the current http session id, null if none found
* @return the current http session id, null if none found
*/
public static String getSessionId()
{
String result = null;
ServletEndpointContext endpointContext = (ServletEndpointContext)MessageContext.getCurrentContext().getProperty("servletEndpointContext");
HttpSession session = getSession();
return ((session != null) ? (session.getId()) : (null));
}
private static HttpSession getSession()
{
HttpSession result = null;
ServletEndpointContext endpointContext = (ServletEndpointContext) MessageContext.getCurrentContext().getProperty("servletEndpointContext");
if (endpointContext != null)
{
HttpSession session = endpointContext.getHttpSession();
if (session != null)
{
result = session.getId();
}
result = endpointContext.getHttpSession();
}
return result;
}
/**
* Invalidates the current http session
*/
public static void invalidateSession()
{
HttpSession session = getSession();
if (session != null)
{
session.invalidate();
}
}
/**
* Returns the value of the <code>fetchSize</code> from the
* QueryConfiguration SOAP header (if present)