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


Java RuleService类代码示例

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


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


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