当前位置: 首页>>代码示例>>Java>>正文


Java WebScriptRequest.getServiceMatch方法代码示例

本文整理汇总了Java中org.springframework.extensions.webscripts.WebScriptRequest.getServiceMatch方法的典型用法代码示例。如果您正苦于以下问题:Java WebScriptRequest.getServiceMatch方法的具体用法?Java WebScriptRequest.getServiceMatch怎么用?Java WebScriptRequest.getServiceMatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.extensions.webscripts.WebScriptRequest的用法示例。


在下文中一共展示了WebScriptRequest.getServiceMatch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: executeImpl

import org.springframework.extensions.webscripts.WebScriptRequest; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Map<String, Object> executeImpl(final WebScriptRequest req, final Status status, final Cache cache)
{
    final Match serviceMatch = req.getServiceMatch();
    final Map<String, String> templateVars = serviceMatch.getTemplateVars();
    final String storeProtocol = templateVars.get(TEMPLATE_STORE_PROTOCOL);
    final String storeIdentifier = templateVars.get(TEMPLATE_STORE_IDENTIFIER);
    final String uuid = templateVars.get(TEMPLATE_UUID);

    final StoreRef store = new StoreRef(storeProtocol, storeIdentifier);
    final NodeRef node = new NodeRef(store, uuid);

    this.validateArchivedItem(node);

    final Map<String, Object> model = this.executeImpl(req, node, status, cache);
    return model;
}
 
开发者ID:AFaust,项目名称:alfresco-better-trashmanagement,代码行数:21,代码来源:ArchivedItemsChildrenGet.java

示例2: getDispatcher

import org.springframework.extensions.webscripts.WebScriptRequest; //导入方法依赖的package包/类
@Override
public CMISDispatcher getDispatcher(WebScriptRequest req)
{
	CMISDispatcher dispatcher = null;

	Match match = req.getServiceMatch();
	Map<String, String> templateVars = match.getTemplateVars();
	String bindingStr = templateVars.get("binding");
	String apiVersion = templateVars.get("apiVersion");
	if(bindingStr != null && apiVersion != null)
	{
		Binding binding = null;
		try
		{
			binding = Binding.valueOf(bindingStr);
		}
		catch(IllegalArgumentException e)
		{
			// nothing to do, binding remains null
		}
		
		if(binding != null)
		{
			Endpoint endpoint = new Endpoint(binding, apiVersion);
			dispatcher = registry.get(endpoint);
		}
		else
		{
			// TODO
		}
	}

	return dispatcher;
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:35,代码来源:CMISDispatcherRegistryImpl.java

示例3: CMISHttpServletRequest

import org.springframework.extensions.webscripts.WebScriptRequest; //导入方法依赖的package包/类
public CMISHttpServletRequest(WebScriptRequest req, String serviceName, BaseUrlGenerator baseUrlGenerator, Binding binding, Descriptor currentDescriptor,
        TenantAdminService tenantAdminService)
{
	this.req = req;
	this.serviceName = serviceName;
	this.baseUrlGenerator = baseUrlGenerator;
	this.binding = binding;

	String pathInfo = req.getPathInfo();
	WebScriptRequest baseReq = getBaseRequest(req);
	if(!pathInfo.startsWith("/cmis") && (baseReq instanceof TenantWebScriptServletRequest))
	{
		TenantWebScriptServletRequest servletReq = (TenantWebScriptServletRequest)baseReq;

		String tenant = servletReq.getTenant();
		if(tenant.equalsIgnoreCase(TenantUtil.DEFAULT_TENANT))
           {
		    String user = AuthenticationUtil.getFullyAuthenticatedUser();
               String domain = tenantAdminService.getUserDomain(user);
               if(domain == null || domain.equals(TenantService.DEFAULT_DOMAIN))
               {
                   this.networkId = tenant;
               }
               else
               {
                   this.networkId = domain;
               }
           }
		else
		{
		    this.networkId = tenant;
		}
	}

	Match match = req.getServiceMatch();
	Map<String, String> templateVars = match.getTemplateVars();

       HttpServletRequest httpReq = WebScriptServletRuntime.getHttpServletRequest(req);
	this.httpReq = httpReq;
	this.operation = templateVars.get("operation");
	this.id = templateVars.get("id");

   	addAttributes();
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:45,代码来源:CMISHttpServletRequest.java


注:本文中的org.springframework.extensions.webscripts.WebScriptRequest.getServiceMatch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。