• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RuleService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.alfresco.service.cmr.rule.RuleService的典型用法代码示例。如果您正苦于以下问题:Java RuleService类的具体用法?Java RuleService怎么用?Java RuleService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RuleService类属于org.alfresco.service.cmr.rule包,在下文中一共展示了RuleService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: executeImpl

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
 */
@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{
    if (nodeService.exists(actionedUponNodeRef) == true)
    {
        // Check that the actioned upon node has the rules aspect applied
        if (nodeService.hasAspect(actionedUponNodeRef, RuleModel.ASPECT_RULES) == true)
        {                 
            // Get the rule node the actioned upon node is linked to
            NodeRef linkedToNode = ((RuleService)ruleService).getLinkedToRuleNode(actionedUponNodeRef);
            if (linkedToNode != null)
            {
                nodeService.removeAspect(actionedUponNodeRef, RuleModel.ASPECT_RULES);
            }
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:21,代码来源:UnlinkRules.java


示例2: onSetUpInTransaction

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * Called at the beginning of all tests
 */
@Override
protected void onSetUpInTransaction() throws Exception
{
    this.checkOutCheckInService = (CheckOutCheckInService) this.applicationContext.getBean("checkOutCheckInService");
    this.nodeService = (NodeService)this.applicationContext.getBean("nodeService");
    this.ruleService = (RuleService)this.applicationContext.getBean("ruleService");
    this.actionService = (ActionService)this.applicationContext.getBean("actionService");
    transactionHelper = (RetryingTransactionHelper)applicationContext.getBean("retryingTransactionHelper");
    fileFolderService = applicationContext.getBean("fileFolderService", FileFolderService.class);
    contentService = applicationContext.getBean("contentService", ContentService.class);
    
    AuthenticationComponent authenticationComponent = (AuthenticationComponent)applicationContext.getBean("authenticationComponent");
    authenticationComponent.setCurrentUser(authenticationComponent.getSystemUserName());
    
    // Create the store and get the root node
    this.testStoreRef = this.nodeService.createStore(
            StoreRef.PROTOCOL_WORKSPACE, "Test_"
                    + System.currentTimeMillis());
    this.rootNodeRef = this.nodeService.getRootNode(this.testStoreRef);

    // Get the executer instance 
    this.executer = (ExecuteAllRulesActionExecuter)this.applicationContext.getBean(ExecuteAllRulesActionExecuter.NAME);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:27,代码来源:ExecuteAllRulesActionExecuterTest.java


示例3: executeImpl

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * Execute the request
 * 
 * @exception WebDAVServerException
 */
protected void executeImpl() throws WebDAVServerException, Exception
{
    RuleService ruleService = getServiceRegistry().getRuleService();
    try
    {
        // Temporarily disable update rules.
        ruleService.disableRuleType(RuleType.UPDATE);
        attemptLock();
    }
    finally
    {
        // Re-instate update rules.
        ruleService.enableRuleType(RuleType.UPDATE);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:21,代码来源:LockMethod.java


示例4: executeImpl

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * Execute the request
 * 
 * @exception WebDAVServerException
 */
protected void executeImpl() throws WebDAVServerException
{
    RuleService ruleService = getServiceRegistry().getRuleService();
    try
    {
        // Temporarily disable update rules.
        ruleService.disableRuleType(RuleType.UPDATE);
        attemptUnlock();
    }
    finally
    {
        // Re-instate update rules.
        ruleService.enableRuleType(RuleType.UPDATE);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:21,代码来源:UnlockMethod.java


示例5: setUp

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
    super.setUp();
    this.transactionService = (TransactionService) getServer().getApplicationContext().getBean("TransactionService");
    this.nodeService = (NodeService) getServer().getApplicationContext().getBean("NodeService");
    this.fileFolderService = (FileFolderService) getServer().getApplicationContext().getBean("FileFolderService");
    this.ruleService = (RuleService) getServer().getApplicationContext().getBean("RuleService");
    this.actionService = (ActionService) getServer().getApplicationContext().getBean("ActionService");
    this.authenticationComponent = (AuthenticationComponent) getServer().getApplicationContext().getBean("authenticationComponent");

    this.authenticationComponent.setSystemUserAsCurrentUser();

    createTestFolders();

    assertNotNull(testWorkNodeRef);
    assertNotNull(testNodeRef);
    assertNotNull(testNodeRef2);
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:20,代码来源:RuleServiceTest.java


示例6: onSetUpInTransaction

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * Called at the beginning of all tests
 */
@Override
protected void onSetUpInTransaction() throws Exception
{
    this.checkOutCheckInService = (CheckOutCheckInService) this.applicationContext.getBean("checkOutCheckInService");
    this.nodeService = (NodeService)this.applicationContext.getBean("nodeService");
    this.ruleService = (RuleService)this.applicationContext.getBean("ruleService");
    this.actionService = (ActionService)this.applicationContext.getBean("actionService");
    transactionHelper = (RetryingTransactionHelper)applicationContext.getBean("retryingTransactionHelper");
    
    AuthenticationComponent authenticationComponent = (AuthenticationComponent)applicationContext.getBean("authenticationComponent");
    authenticationComponent.setCurrentUser(authenticationComponent.getSystemUserName());
    
    // Create the store and get the root node
    this.testStoreRef = this.nodeService.createStore(
            StoreRef.PROTOCOL_WORKSPACE, "Test_"
                    + System.currentTimeMillis());
    this.rootNodeRef = this.nodeService.getRootNode(this.testStoreRef);

    // Get the executer instance 
    this.executer = (ExecuteAllRulesActionExecuter)this.applicationContext.getBean(ExecuteAllRulesActionExecuter.NAME);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:25,代码来源:ExecuteAllRulesActionExecuterTest.java


示例7: executeImpl

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * Execute the request
 * 
 * @exception WebDAVServerException
 */
protected void executeImpl() throws WebDAVServerException, Exception
{
	RuleService ruleService = getServiceRegistry().getRuleService();
	try
	{
		// Temporarily disable update rules.
		ruleService.disableRuleType(RuleType.UPDATE);
		attemptLock();
	}
	finally
	{
		// Re-instate update rules.
		ruleService.enableRuleType(RuleType.UPDATE);
	}
}
 
开发者ID:to2y,项目名称:AlfrescoOnlineEditWebDAV,代码行数:21,代码来源:LockMethod.java


示例8: executeImpl

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * Execute the request
 * 
 * @exception WebDAVServerException
 */
protected void executeImpl() throws WebDAVServerException
{
	RuleService ruleService = getServiceRegistry().getRuleService();
	try
	{
		// Temporarily disable update rules.
		ruleService.disableRuleType(RuleType.UPDATE);
		attemptUnlock();
	}
	finally
	{
		// Re-instate update rules.
		ruleService.enableRuleType(RuleType.UPDATE);
	}
}
 
开发者ID:to2y,项目名称:AlfrescoOnlineEditWebDAV,代码行数:21,代码来源:UnlockMethod.java


示例9: setup

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
@Before
public void setup() throws SystemException, NotSupportedException
{
    try
    {
        nodeService = (NodeService)ctx.getBean("nodeService");
        fileFolderService = (FileFolderService)ctx.getBean("fileFolderService");
        transactionService = (TransactionService)ctx.getBean("transactionService");
        bulkImporter = (MultiThreadedBulkFilesystemImporter)ctx.getBean("bulkFilesystemImporter");
        contentService = (ContentService)ctx.getBean("contentService");
        actionService = (ActionService)ctx.getBean("actionService");
        ruleService = (RuleService)ctx.getBean("ruleService");
        versionService = (VersionService)ctx.getBean("versionService");

        AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());

        String s = "BulkFilesystemImport" + System.currentTimeMillis();

        txn = transactionService.getUserTransaction();
        txn.begin();

        AuthenticationUtil.pushAuthentication();
        AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());

        StoreRef storeRef = nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, s);
        rootNodeRef = nodeService.getRootNode(storeRef);
        top = nodeService.createNode(rootNodeRef, ContentModel.ASSOC_CHILDREN, QName.createQName("{namespace}top"), ContentModel.TYPE_FOLDER).getChildRef();
        
        topLevelFolder = fileFolderService.create(top, s, ContentModel.TYPE_FOLDER);

        txn.commit();
    }
    catch(Throwable e)
    {
        fail(e.getMessage());
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:38,代码来源:AbstractBulkImportTests.java


示例10: initSpringBeans

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
@BeforeClass public static void initSpringBeans() throws Exception
{
    final ApplicationContext appCtxt = APP_CTXT_INIT.getApplicationContext();
    
    ACTION_SERVICE     = appCtxt.getBean("ActionService", ActionService.class);
    COPY_SERVICE       = appCtxt.getBean("CopyService", CopyService.class);
    NODE_SERVICE       = appCtxt.getBean("NodeService", NodeService.class);
    TRANSACTION_HELPER = appCtxt.getBean("retryingTransactionHelper", RetryingTransactionHelper.class);
    RULE_SERVICE       = appCtxt.getBean("RuleService", RuleService.class);
    SITE_SERVICE       = appCtxt.getBean("SiteService", SiteService.class);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:12,代码来源:MiscellaneousRulesTest.java


示例11: onSetUpInTransaction

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * onSetUpInTransaction implementation
 */
@Override
protected void onSetUpInTransaction() throws Exception
{               
    // Get the services
    this.nodeService = (NodeService) this.applicationContext
            .getBean("nodeService");
    this.contentService = (ContentService) this.applicationContext
            .getBean("contentService");
    this.ruleService = (RuleService) this.applicationContext
            .getBean("ruleService");
    this.configService = (ConfigurableService)this.applicationContext
    		.getBean("ConfigurableService");
    this.actionService = (ActionService)this.applicationContext.getBean("actionService");
    this.transactionService = (TransactionService)this.applicationContext.getBean("transactionComponent");
    this.authenticationComponent = (AuthenticationComponent)this.applicationContext.getBean("authenticationComponent");

    //authenticationComponent.setSystemUserAsCurrentUser();
    authenticationComponent.setCurrentUser(AuthenticationUtil.getAdminUserName());
    
    // Get the rule type
    this.ruleType = this.ruleService.getRuleType(RULE_TYPE_NAME);

    // Create the store and get the root node
    this.testStoreRef = this.nodeService.createStore(
            StoreRef.PROTOCOL_WORKSPACE, "Test_"
                    + System.currentTimeMillis());
    this.rootNodeRef = this.nodeService.getRootNode(this.testStoreRef);

    // Create the node used for tests
    this.nodeRef = this.nodeService.createNode(rootNodeRef,
            ContentModel.ASSOC_CHILDREN,
            QName.createQName("{test}testnode"),
            ContentModel.TYPE_CONTAINER).getChildRef();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:38,代码来源:BaseRuleTest.java


示例12: onSetUpInTransaction

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void onSetUpInTransaction() throws Exception
{               
    // Get the services
    nodeService = (NodeService)getApplicationContext().getBean("nodeService");
    ruleService = (RuleService)getApplicationContext().getBean("ruleService");
    actionService = (ActionService)getApplicationContext().getBean("actionService");
    authenticationComponent = (AuthenticationComponent)getApplicationContext().getBean("authenticationComponent");
    fileFolderService = (FileFolderService)getApplicationContext().getBean("fileFolderService");

    //authenticationComponent.setSystemUserAsCurrentUser();
    authenticationComponent.setCurrentUser(AuthenticationUtil.getAdminUserName());
    
    
    // Create the store and get the root node
    testStoreRef = nodeService.createStore(
            StoreRef.PROTOCOL_WORKSPACE, "Test_"
                    + System.currentTimeMillis());
    rootNodeRef = nodeService.getRootNode(testStoreRef);

    // Create the node used for tests
    NodeRef folder = nodeService.createNode(
              rootNodeRef,
              ContentModel.ASSOC_CHILDREN,
              QName.createQName("{test}testnode"),
              ContentModel.TYPE_FOLDER).getChildRef();
    
    folderOne = fileFolderService.create(folder, "folderOne", ContentModel.TYPE_FOLDER).getNodeRef();
    folderTwo = fileFolderService.create(folder, "folderTwo", ContentModel.TYPE_FOLDER).getNodeRef();
    folderThree = fileFolderService.create(folder, "folderThree", ContentModel.TYPE_FOLDER).getNodeRef();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:33,代码来源:RuleLinkTest.java


示例13: before

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
@Before
public void before()
{
    this.actionService = (ActionService)ctx.getBean("actionService");
    this.ruleService = (RuleService)ctx.getBean("ruleService");
	this.fileFolderService = (FileFolderService)ctx.getBean("FileFolderService");
	this.transactionService = (TransactionService)ctx.getBean("transactionService");
	this.nodeService = (NodeService)ctx.getBean("NodeService");
	this.contentService = (ContentService)ctx.getBean("ContentService");
    this.versionService = (VersionService) ctx.getBean("versionService");
    this.lockService = (LockService) ctx.getBean("lockService");
    this.taggingService = (TaggingService) ctx.getBean("TaggingService");
    this.namespaceService = (NamespaceService) ctx.getBean("namespaceService");
    this.repositoryHelper = (Repository)ctx.getBean("repositoryHelper");
	this.factory = (AlfrescoCmisServiceFactory)ctx.getBean("CMISServiceFactory");
    this.versionService = (VersionService) ctx.getBean("versionService");
	this.cmisConnector = (CMISConnector) ctx.getBean("CMISConnector");
    this.nodeDAO = (NodeDAO) ctx.getBean("nodeDAO");
    this.authorityService = (AuthorityService)ctx.getBean("AuthorityService");
    this.auditSubsystem = (AuditModelRegistryImpl) ctx.getBean("Audit");
    this.permissionService = (PermissionService) ctx.getBean("permissionService");
	this.dictionaryDAO = (DictionaryDAO)ctx.getBean("dictionaryDAO");
	this.cmisDictionaryService = (CMISDictionaryService)ctx.getBean("OpenCMISDictionaryService1.1");
    this.auditDAO = (AuditDAO) ctx.getBean("auditDAO");
    this.nodeArchiveService = (NodeArchiveService) ctx.getBean("nodeArchiveService");
    this.dictionaryService = (DictionaryService) ctx.getBean("dictionaryService");
    this.workflowService = (WorkflowService) ctx.getBean("WorkflowService");
    this.workflowAdminService = (WorkflowAdminService) ctx.getBean("workflowAdminService");
    this.authenticationContext = (AuthenticationContext) ctx.getBean("authenticationContext");
    this.tenantAdminService = (TenantAdminService) ctx.getBean("tenantAdminService");
    this.tenantService = (TenantService) ctx.getBean("tenantService");
    this.searchService = (SearchService) ctx.getBean("SearchService");
    this.auditComponent = (AuditComponentImpl) ctx.getBean("auditComponent");

    this.globalProperties = (java.util.Properties) ctx.getBean("global-properties");
    this.globalProperties.setProperty(VersionableAspectTest.AUTO_VERSION_PROPS_KEY, "true");
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:38,代码来源:CMISTest.java


示例14: getRuleService

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * Get the rule service
 * @return	RuleService	rule service
 */
protected RuleService getRuleService()
{
 if (ruleService == null)
 {
  ruleService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getRuleService();
 }
 return ruleService;
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:13,代码来源:BaseDialogBean.java


示例15: getRuleService

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
protected RuleService getRuleService()
{
   if (ruleService == null)
   {
      ruleService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getRuleService();
   }
   return ruleService;
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:9,代码来源:RulesDialog.java


示例16: getRuleService

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
/**
 * @return ruleService
 */
protected RuleService getRuleService()
{
 //check for null for cluster environment
   if (ruleService == null)
   {
      ruleService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getRuleService();
   }
   return ruleService;
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:13,代码来源:DeleteRuleDialog.java


示例17: initServices

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
@Override
protected void initServices()
{
    super.initServices();

    ruleService = (RuleService) applicationContext.getBean("RuleService");
    converter = (JSONConversionComponent) applicationContext.getBean("jsonConversionComponent");
}
 
开发者ID:Alfresco,项目名称:records-management-old,代码行数:9,代码来源:RM2192Test.java


示例18: initServices

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
@Override
protected void initServices()
{
    super.initServices();
    
    ruleService = (RuleService)applicationContext.getBean("RuleService");
}
 
开发者ID:Alfresco,项目名称:records-management-old,代码行数:8,代码来源:RM2072Test.java


示例19: initServices

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
@Override
protected void initServices()
{
    super.initServices();

    ruleService = (RuleService) applicationContext.getBean("RuleService");
}
 
开发者ID:Alfresco,项目名称:records-management-old,代码行数:8,代码来源:RM2190Test.java


示例20: BaseProcessWorker

import org.alfresco.service.cmr.rule.RuleService; //导入依赖的package包/类
private BaseProcessWorker(Function processFunction, Scriptable scope,
                          String userName, boolean disableRules,
                          RuleService ruleService, Log logger,
                          BaseScopableProcessorExtension scopable) {
    this.processFunction = processFunction;
    this.scope = scope;
    this.userName = userName;
    this.disableRules = disableRules;
    this.ruleService = ruleService;
    this.logger = logger;
    this.scopable = scopable;
}
 
开发者ID:jgoldhammer,项目名称:alfresco-jscript-extensions,代码行数:13,代码来源:Workers.java



注:本文中的org.alfresco.service.cmr.rule.RuleService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ReadOptions类代码示例发布时间:2022-05-22
下一篇:
Java HotRodServer类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap