mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -32,12 +32,12 @@ import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||
*/
|
||||
public class CMISDispatcherRegistryImpl implements CMISDispatcherRegistry
|
||||
{
|
||||
private Map<Binding, CMISDispatcher> registry = new HashMap<Binding, CMISDispatcher>();
|
||||
private Map<Endpoint, CMISDispatcher> registry = new HashMap<Endpoint, CMISDispatcher>();
|
||||
|
||||
@Override
|
||||
public void registerDispatcher(Binding binding, CMISDispatcher dispatcher)
|
||||
public void registerDispatcher(Endpoint endpoint, CMISDispatcher dispatcher)
|
||||
{
|
||||
registry.put(binding, dispatcher);
|
||||
registry.put(endpoint, dispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,7 +48,8 @@ public class CMISDispatcherRegistryImpl implements CMISDispatcherRegistry
|
||||
Match match = req.getServiceMatch();
|
||||
Map<String, String> templateVars = match.getTemplateVars();
|
||||
String bindingStr = templateVars.get("binding");
|
||||
if(bindingStr != null)
|
||||
String apiVersion = templateVars.get("apiVersion");
|
||||
if(bindingStr != null && apiVersion != null)
|
||||
{
|
||||
Binding binding = null;
|
||||
try
|
||||
@@ -59,9 +60,15 @@ public class CMISDispatcherRegistryImpl implements CMISDispatcherRegistry
|
||||
{
|
||||
// nothing to do, binding remains null
|
||||
}
|
||||
|
||||
if(binding != null)
|
||||
{
|
||||
dispatcher = registry.get(binding);
|
||||
Endpoint endpoint = new Endpoint(binding, apiVersion);
|
||||
dispatcher = registry.get(endpoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user