本文整理汇总了Java中org.alfresco.repo.nodelocator.NodeLocatorService类的典型用法代码示例。如果您正苦于以下问题:Java NodeLocatorService类的具体用法?Java NodeLocatorService怎么用?Java NodeLocatorService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NodeLocatorService类属于org.alfresco.repo.nodelocator包,在下文中一共展示了NodeLocatorService类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUp
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
applicationContext = ApplicationContextHelper.getApplicationContext();
// initialise policy test model
DictionaryBootstrap bootstrap = new DictionaryBootstrap();
List<String> bootstrapModels = new ArrayList<String>();
bootstrapModels.add(TEST_MODEL);
bootstrap.setModels(bootstrapModels);
bootstrap.setDictionaryDAO((DictionaryDAO)applicationContext.getBean("dictionaryDAO"));
bootstrap.setTenantService((TenantService)applicationContext.getBean("tenantService"));
bootstrap.bootstrap();
// retrieve policy component
this.policyComponent = (PolicyComponent)applicationContext.getBean("policyComponent");
this.behaviourFilter = (BehaviourFilter) applicationContext.getBean("policyBehaviourFilter");
this.trxService = (TransactionService) applicationContext.getBean("transactionComponent");
this.nodeService = (NodeService) applicationContext.getBean("nodeService");
this.nodeLocatorService = (NodeLocatorService) applicationContext.getBean("nodeLocatorService");
this.authenticationComponent = (AuthenticationComponent)applicationContext.getBean("authenticationComponent");
this.authenticationComponent.setSystemUserAsCurrentUser();
// Register Policy
if (sideEffectDelegate == null)
{
sideEffectDelegate = policyComponent.registerClassPolicy(SideEffectTestPolicy.class);
// Bind Behaviour to side effect policy
QName policyName = QName.createQName(TEST_NAMESPACE, "sideEffect");
Behaviour baseBehaviour = new JavaBehaviour(this, "sideEffectTest", NotificationFrequency.TRANSACTION_COMMIT);
this.policyComponent.bindClassBehaviour(policyName, BASE_TYPE, baseBehaviour);
}
this.companyHome = nodeLocatorService.getNode(CompanyHomeNodeLocator.NAME, null, null);
createAndEnableBehaviours();
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:37,代码来源:PolicyComponentTransactionTest.java
示例2: setUp
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
// initialise policy test model
DictionaryBootstrap bootstrap = new DictionaryBootstrap();
List<String> bootstrapModels = new ArrayList<String>();
bootstrapModels.add(TEST_MODEL);
bootstrap.setModels(bootstrapModels);
bootstrap.setDictionaryDAO((DictionaryDAO)applicationContext.getBean("dictionaryDAO"));
bootstrap.setTenantService((TenantService)applicationContext.getBean("tenantService"));
bootstrap.bootstrap();
// retrieve policy component
this.policyComponent = (PolicyComponent)applicationContext.getBean("policyComponent");
this.behaviourFilter = (BehaviourFilter) applicationContext.getBean("policyBehaviourFilter");
this.trxService = (TransactionService) applicationContext.getBean("transactionComponent");
this.nodeService = (NodeService) applicationContext.getBean("nodeService");
this.nodeLocatorService = (NodeLocatorService) applicationContext.getBean("nodeLocatorService");
this.authenticationComponent = (AuthenticationComponent)applicationContext.getBean("authenticationComponent");
this.authenticationComponent.setSystemUserAsCurrentUser();
// Register Policy
if (sideEffectDelegate == null)
{
sideEffectDelegate = policyComponent.registerClassPolicy(SideEffectTestPolicy.class);
// Bind Behaviour to side effect policy
QName policyName = QName.createQName(TEST_NAMESPACE, "sideEffect");
Behaviour baseBehaviour = new JavaBehaviour(this, "sideEffectTest", NotificationFrequency.TRANSACTION_COMMIT);
this.policyComponent.bindClassBehaviour(policyName, BASE_TYPE, baseBehaviour);
}
this.companyHome = nodeLocatorService.getNode(CompanyHomeNodeLocator.NAME, null, null);
createAndEnableBehaviours();
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:36,代码来源:PolicyComponentTransactionTest.java
示例3: setNodeLocatorService
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
public void setNodeLocatorService(NodeLocatorService nodeLocatorService) {
this.nodeLocatorService = nodeLocatorService;
}
开发者ID:EisenVault,项目名称:Alfresco-Autocad-Viewer,代码行数:4,代码来源:DemoComponent.java
示例4: getNodeLocatorService
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
@Override
public NodeLocatorService getNodeLocatorService()
{
return (NodeLocatorService)getService(NODE_LOCATOR_SERVICE);
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:ServiceDescriptorRegistry.java
示例5: resolveNodeReference
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
/**
* Use the Node Locator Service to find the a node reference from a number of possible locator types.
* This method is responsible for determining the locator type and then calling the Service as the
* Service does not know how to guess which locator to use.
* <p>
* This service supports 'virtual' nodes including the following:
* <p>
* alfresco://company/home The Company Home root node<br>
* alfresco://user/home The User Home node under Company Home<br>
* alfresco://company/shared The Shared node under Company Home<br>
* alfresco://sites/home The Sites home node under Company Home<br>
* workspace://.../... Any standard NodeRef<br>
* /app:company_home/cm:... XPath QName style node reference<br>
*
* @param reference The node reference - See above for list of possible node references supported.
*
* @return ScriptNode representing the node or null if not found
*/
public ScriptNode resolveNodeReference(final String reference)
{
if (reference == null)
{
throw new IllegalArgumentException("Node 'reference' argument is mandatory.");
}
final NodeLocatorService locatorService = this.services.getNodeLocatorService();
NodeRef nodeRef = null;
switch (reference)
{
case "alfresco://company/home":
nodeRef = locatorService.getNode(CompanyHomeNodeLocator.NAME, null, null);
break;
case "alfresco://user/home":
nodeRef = locatorService.getNode(UserHomeNodeLocator.NAME, null, null);
break;
case "alfresco://company/shared":
nodeRef = locatorService.getNode(SharedHomeNodeLocator.NAME, null, null);
break;
case "alfresco://sites/home":
nodeRef = locatorService.getNode(SitesHomeNodeLocator.NAME, null, null);
break;
default:
if (reference.indexOf("://") > 0)
{
NodeRef ref = new NodeRef(reference);
if (this.services.getNodeService().exists(ref) &&
this.services.getPermissionService().hasPermission(ref, PermissionService.READ) == AccessStatus.ALLOWED)
{
nodeRef = ref;
}
}
else if (reference.startsWith("/"))
{
final Map<String, Serializable> params = new HashMap<>(1, 1.0f);
params.put(XPathNodeLocator.QUERY_KEY, reference);
nodeRef = locatorService.getNode(XPathNodeLocator.NAME, null, params);
}
break;
}
return nodeRef != null ? (ScriptNode)new ValueConverter().convertValueForScript(this.services, getScope(), null, nodeRef) : null;
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:65,代码来源:ScriptUtils.java
示例6: getNodeLocatorService
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
@Override
public NodeLocatorService getNodeLocatorService()
{
// A mock response
return null;
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:7,代码来源:MockedTestServiceRegistry.java
示例7: setNodeLocatorService
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
/**
* @param locatorService the locatorService to set
*/
public void setNodeLocatorService(NodeLocatorService locatorService)
{
this.locatorService = locatorService;
}
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:8,代码来源:NodeLocatorGet.java
示例8: setNodeLocatorService
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
public void setNodeLocatorService(NodeLocatorService nodeLocatorService)
{
this.nodeLocatorService = nodeLocatorService;
}
开发者ID:pdubois,项目名称:alfrescoprotectnode,代码行数:5,代码来源:ProtectNodesComponent.java
示例9: getNodeLocatorService
import org.alfresco.repo.nodelocator.NodeLocatorService; //导入依赖的package包/类
/**
* Get the node locator service (or null if one is not provided)
*/
@NotAuditable
NodeLocatorService getNodeLocatorService();
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:ServiceRegistry.java
注:本文中的org.alfresco.repo.nodelocator.NodeLocatorService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论