Java Code Examples for org.alfresco.service.ServiceRegistry#getActionService()
The following examples show how to use
org.alfresco.service.ServiceRegistry#getActionService() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RuleServiceIntegrationTest.java From alfresco-repository with GNU Lesser General Public License v3.0 | 6 votes |
@BeforeClass public static void setupTest() throws Exception { SERVICE_REGISTRY = (ServiceRegistry)APP_CONTEXT_INIT.getApplicationContext().getBean(ServiceRegistry.SERVICE_REGISTRY); NODE_SERVICE = SERVICE_REGISTRY.getNodeService(); TRANSACTION_HELPER = SERVICE_REGISTRY.getTransactionService().getRetryingTransactionHelper(); ACTION_SERVICE = SERVICE_REGISTRY.getActionService(); RULE_SERVICE = SERVICE_REGISTRY.getRuleService(); CONTENT_SERVICE = SERVICE_REGISTRY.getContentService(); MAIL_ACTION_EXECUTER = APP_CONTEXT_INIT.getApplicationContext().getBean("OutboundSMTP", ApplicationContextFactory.class).getApplicationContext().getBean("mail", MailActionExecuter.class); WAS_IN_TEST_MODE = MAIL_ACTION_EXECUTER.isTestMode(); MAIL_ACTION_EXECUTER.setTestMode(true); Repository repositoryHelper = (Repository) APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper"); COMPANY_HOME = repositoryHelper.getCompanyHome(); // Create some static test content TEST_FOLDER = STATIC_TEST_NODES.createNode(COMPANY_HOME, "testFolder", ContentModel.TYPE_FOLDER, AuthenticationUtil.getAdminUserName()); }
Example 2
Source File: ThumbnailHelper.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
public static Action createCreateThumbnailAction(ThumbnailDefinition thumbnailDef, ServiceRegistry services) { ActionService actionService = services.getActionService(); Action action = actionService.createAction(CreateThumbnailActionExecuter.NAME); action.setParameterValue(CreateThumbnailActionExecuter.PARAM_THUMBANIL_NAME, thumbnailDef.getName()); decorateAction(thumbnailDef, action, actionService); return action; }
Example 3
Source File: ScriptAction.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
/** * Construct * * @param action * Alfresco action */ public ScriptAction(ServiceRegistry services, Action action, ActionDefinition actionDef) { this.services = services; this.actionService = services.getActionService(); this.namespaceService = services.getNamespaceService(); this.transactionService = services.getTransactionService(); this.action = action; this.actionDef = actionDef; this.converter = new ActionValueConverter(); }
Example 4
Source File: InviteSender.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
public InviteSender(ServiceRegistry services, Repository repository, MessageService messageService) { this.actionService = services.getActionService(); this.nodeService = services.getNodeService(); this.personService = services.getPersonService(); this.searchService = services.getSearchService(); this.siteService = services.getSiteService(); this.fileFolderService = services.getFileFolderService(); this.repoAdminService = services.getRepoAdminService(); this.namespaceService = services.getNamespaceService(); this.repository = repository; this.messageService = messageService; }
Example 5
Source File: UpdateTagScopesActionExecuterTest.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
@Before @Override public void setUp() throws Exception { applicationContext = ApplicationContextHelper.getApplicationContext(); final ServiceRegistry registry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); nodeService = registry.getNodeService(); actionService = registry.getActionService(); actionExecuter = (UpdateTagScopesActionExecuter) applicationContext.getBean(UPDATE_TAGSCOPE_ACTION_EXECUTER_BEAN_NAME); taggingService = registry.getTaggingService(); fileFolderService = registry.getFileFolderService(); transactionService = registry.getTransactionService(); actionTrackingService = (ActionTrackingService) applicationContext.getBean(ACTION_TRACKING_SERVICE_BEAN_NAME); AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser(); expectedTagScopes = new LinkedList<NodeRef>(); testTags = new LinkedList<String>(); transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Void>() { @Override public Void execute() throws Throwable { createTestContent(registry, expectedTagScopes); return null; } }, false, true); waitForTagScopeUpdate(); transaction = transactionService.getUserTransaction(); transaction.begin(); }