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

Java ActionService类代码示例

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

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



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

示例1: mockServices

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * @return ServiceRegistry
 */
private ServiceRegistry mockServices()
{
    ActionService mockActionService = mockActionService();
    NodeService mockNodeService = mockNodeService();
    PersonService mockPersonService = mockPersonService();
    SearchService mockSearchService = mockSearchService();
    SiteService mockSiteService = mockSiteService();
    FileFolderService mockFileFolderService = mockFileFolderService();
    RepoAdminService mockRepoAdminService = mockRepoAdminService();
    SysAdminParams sysAdminParams = new SysAdminParamsImpl();

    ServiceRegistry services = mock(ServiceRegistry.class);
    when(services.getActionService()).thenReturn(mockActionService);
    when(services.getNodeService()).thenReturn(mockNodeService);
    when(services.getPersonService()).thenReturn(mockPersonService);
    when(services.getSearchService()).thenReturn(mockSearchService);
    when(services.getSiteService()).thenReturn(mockSiteService);
    when(services.getFileFolderService()).thenReturn(mockFileFolderService);
    when(services.getSysAdminParams()).thenReturn(sysAdminParams);
    when(services.getRepoAdminService()).thenReturn(mockRepoAdminService);
    return services;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:26,代码来源:InviteSenderTest.java


示例2: mockServices

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * @return ServiceRegistry
 */
private ServiceRegistry mockServices()
{
    ActionService mockActionService = mockActionService();
    NodeService mockNodeService = mockNodeService();
    PersonService mockPersonService = mockPersonService();
    SearchService mockSearchService = mockSearchService();
    SiteService mockSiteService = mockSiteService();
    FileFolderService mockFileFolderService = mockFileFolderService();

    ServiceRegistry services = mock(ServiceRegistry.class);
    when(services.getActionService()).thenReturn(mockActionService);
    when(services.getNodeService()).thenReturn(mockNodeService);
    when(services.getPersonService()).thenReturn(mockPersonService);
    when(services.getSearchService()).thenReturn(mockSearchService);
    when(services.getSiteService()).thenReturn(mockSiteService);
    when(services.getFileFolderService()).thenReturn(mockFileFolderService);
    return services;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:InviteModeratedSenderTest.java


示例3: setUp

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
@Before
public void setUp()
{
    appCtx = ApplicationContextHelper.getApplicationContext();
    // The user that will create locks, this should be different from the user that queries them (ALF-19465)
    lockOwner = "jbloggs";
    // The 'current' user.
    userName = AuthenticationUtil.getAdminUserName();
    AuthenticationUtil.setFullyAuthenticatedUser(userName);
    transactionService = (TransactionService) appCtx.getBean("TransactionService");
    nodeService = (NodeService) appCtx.getBean("NodeService");
    rawNodeService = (NodeService) appCtx.getBean("dbNodeService");
    lockStore = (LockStore) appCtx.getBean("lockStore");
    rootNode = nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
    interceptor = (LockableAspectInterceptor) appCtx.getBean("lockableAspectInterceptor");
    lockService = (LockService)appCtx.getBean("lockService");
    fileFolderService = (FileFolderService) appCtx.getBean("FileFolderService");
    actionService = (ActionService) appCtx.getBean("ActionService");
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:20,代码来源:LockableAspectInterceptorTest.java


示例4: onSetUpInTransaction

import org.alfresco.service.cmr.action.ActionService; //导入依赖的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


示例5: onSetUpInTransaction

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * On setup in transaction override
 */
@SuppressWarnings("deprecation")
@Override
protected void onSetUpInTransaction() throws Exception
{
    super.onSetUpInTransaction();

    // Get a reference to the node service
    this.nodeService = (NodeService) this.applicationContext.getBean("nodeService");
    this.contentService = (ContentService) this.applicationContext.getBean("contentService");
    this.authenticationService = (MutableAuthenticationService) this.applicationContext.getBean("authenticationService");
    this.actionService = (ActionService)this.applicationContext.getBean("actionService");
    this.transactionService = (TransactionService)this.applicationContext.getBean("transactionComponent");

    // Authenticate as the system user
    authenticationComponent = (AuthenticationComponent) this.applicationContext
            .getBean("authenticationComponent");
    authenticationComponent.setSystemUserAsCurrentUser();
    
    // Create the store and get the root node
    this.storeRef = this.nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis());
    this.rootNodeRef = this.nodeService.getRootNode(this.storeRef);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:26,代码来源:BaseAlfrescoSpringTest.java


示例6: setUp

import org.alfresco.service.cmr.action.ActionService; //导入依赖的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


示例7: setUp

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
@Before
public void setUp()
{
    // The user that will create locks, this should be different from the user that queries them (ALF-19465)
    lockOwner = "jbloggs";
    // The 'current' user.
    userName = AuthenticationUtil.getAdminUserName();
    AuthenticationUtil.setFullyAuthenticatedUser(userName);
    transactionService = (TransactionService) appCtx.getBean("TransactionService");
    nodeService = (NodeService) appCtx.getBean("NodeService");
    rawNodeService = (NodeService) appCtx.getBean("dbNodeService");
    lockStore = (LockStore) appCtx.getBean("lockStore");
    rootNode = nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
    interceptor = (LockableAspectInterceptor) appCtx.getBean("lockableAspectInterceptor");
    lockService = (LockService)appCtx.getBean("lockService");
    fileFolderService = (FileFolderService) appCtx.getBean("FileFolderService");
    actionService = (ActionService) appCtx.getBean("ActionService");
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:19,代码来源:LockableAspectInterceptorTest.java


示例8: onSetUpInTransaction

import org.alfresco.service.cmr.action.ActionService; //导入依赖的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


示例9: createCreateThumbnailAction

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:12,代码来源:ThumbnailHelper.java


示例10: decorateAction

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
private static void decorateAction(ThumbnailDefinition thumbnailDef, Action action, ActionService actionService)
{
    final FailureHandlingOptions failureOptions = thumbnailDef.getFailureHandlingOptions();
    long retryPeriod = failureOptions == null ? FailureHandlingOptions.DEFAULT_PERIOD : failureOptions.getRetryPeriod() * 1000l;
    int retryCount = failureOptions == null ? FailureHandlingOptions.DEFAULT_RETRY_COUNT : failureOptions.getRetryCount();
    long quietPeriod = failureOptions == null ? FailureHandlingOptions.DEFAULT_PERIOD : failureOptions.getQuietPeriod() * 1000l;
    boolean quietPeriodRetriesEnabled = failureOptions == null ?
            FailureHandlingOptions.DEFAULT_QUIET_PERIOD_RETRIES_ENABLED : failureOptions.getQuietPeriodRetriesEnabled();
    
    // The thumbnail/action should only be run if it is eligible.
    Map<String, Serializable> failedThumbnailConditionParams = new HashMap<String, Serializable>();
    failedThumbnailConditionParams.put(NodeEligibleForRethumbnailingEvaluator.PARAM_THUMBNAIL_DEFINITION_NAME, thumbnailDef.getName());
    failedThumbnailConditionParams.put(NodeEligibleForRethumbnailingEvaluator.PARAM_RETRY_PERIOD, retryPeriod);
    failedThumbnailConditionParams.put(NodeEligibleForRethumbnailingEvaluator.PARAM_RETRY_COUNT, retryCount);
    failedThumbnailConditionParams.put(NodeEligibleForRethumbnailingEvaluator.PARAM_QUIET_PERIOD, quietPeriod);
    failedThumbnailConditionParams.put(NodeEligibleForRethumbnailingEvaluator.PARAM_QUIET_PERIOD_RETRIES_ENABLED, quietPeriodRetriesEnabled);
    
    ActionCondition thumbnailCondition = actionService.createActionCondition(NodeEligibleForRethumbnailingEvaluator.NAME, failedThumbnailConditionParams);
    

    // If it is run and if it fails, then we want a compensating action to run which will mark
    // the source node as having failed to produce a thumbnail.
    Action applyBrokenThumbnail = actionService.createAction("add-failed-thumbnail");
    applyBrokenThumbnail.setParameterValue(AddFailedThumbnailActionExecuter.PARAM_THUMBNAIL_DEFINITION_NAME, thumbnailDef.getName());
    applyBrokenThumbnail.setParameterValue(AddFailedThumbnailActionExecuter.PARAM_FAILURE_DATETIME, new Date());

    action.addActionCondition(thumbnailCondition);
    action.setCompensatingAction(applyBrokenThumbnail);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:30,代码来源:ThumbnailHelper.java


示例11: processActionConstraints

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * This method creates a list of {@link FieldConstraint field constraints}, if there are any.
 * 
 * @return a List<FieldConstraint> if there are any, else Collections.emptyList()
 */
private List<FieldConstraint> processActionConstraints(ParameterDefinition parameterDef,
        ActionService actionService)
{
    List<FieldConstraint> fieldConstraints = Collections.emptyList();
    String paramConstraintName = parameterDef.getParameterConstraintName();
    if (paramConstraintName != null)
    {
        ParameterConstraint paramConstraint = actionService.getParameterConstraint(paramConstraintName);
        if (paramConstraint == null)
        {
            throw new FormException("ParameterConstraint name '" + paramConstraintName + "' not recognised.");
        }
        else
        {
            // This map is of allowedValue : display label for that value.
            Map<String, String> allowableValuesMap = paramConstraint.getAllowableValues();
            
            // We need to concatenate each key-value entry into a String like "value|displaylabel"
            // Then the FormService can display the labels but deal with the values as the underlying data.
            List<String> pipeSeparatedAllowedValues = new ArrayList<String>(allowableValuesMap.size());
            for (Map.Entry<String, String> entry : allowableValuesMap.entrySet())
            {
                pipeSeparatedAllowedValues.add(entry.getKey() + "|" + entry.getValue());
            }
            
            Map<String, Object> params = new HashMap<String, Object>();
            params.put("allowedValues", pipeSeparatedAllowedValues);
            
            // Finally wrap it up in a parameter map.
            fieldConstraints = new ArrayList<FieldConstraint>(allowableValuesMap.size());
            fieldConstraints.add(new FieldConstraint("LIST", params));
            
        }
    }
    return fieldConstraints;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:42,代码来源:ActionParameterField.java


示例12: getRegistered

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * Gets the list of registered action names
 * 
 * @return the registered action names
 */
public String[] getRegistered()
{
    ActionService actionService = services.getActionService();
    List<ActionDefinition> defs = actionService.getActionDefinitions();
    String[] registered = new String[defs.size()];
    int i = 0;
    for (ActionDefinition def : defs)
    {
        registered[i++] = def.getName();
    }
    return registered;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:18,代码来源:Actions.java


示例13: create

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * Create an Action
 * 
 * @param actionName
 *            the action name
 * @return the action
 */
public ScriptAction create(String actionName)
{
    ScriptAction scriptAction = null;
    ActionService actionService = services.getActionService();
    ActionDefinition actionDef = actionService.getActionDefinition(actionName);
    if (actionDef != null)
    {
        Action action = actionService.createAction(actionName);
        scriptAction = new ScriptAction(this.services, action, actionDef);
        scriptAction.setScope(getScope());
    }
    return scriptAction;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:21,代码来源:Actions.java


示例14: setApplicationContext

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
public void setApplicationContext(ApplicationContext applicationContext)
{
   nodeService = (NodeService)applicationContext.getBean("NodeService");
   actionService = (ActionService)applicationContext.getBean("ActionService");
   transactionService = (TransactionService)applicationContext.getBean("transactionService");
   runtimeActionService = (RuntimeActionService)applicationContext.getBean("actionService");
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:ScheduledPersistedActionServiceImpl.java


示例15: setup

import org.alfresco.service.cmr.action.ActionService; //导入依赖的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


示例16: setUp

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Before
public void setUp() throws Exception
{
    ChildApplicationContextFactory activitiesFeed = (ChildApplicationContextFactory) ctx.getBean("ActivitiesFeed");
    ApplicationContext activitiesFeedCtx = activitiesFeed.getApplicationContext();
    feedNotifier = (FeedNotifierImpl) activitiesFeedCtx.getBean("feedNotifier");
    activityService = (ActivityService) activitiesFeedCtx.getBean("activityService");
    feedGenerator = (FeedGenerator) activitiesFeedCtx.getBean("feedGenerator");
    postLookup = (PostLookup) activitiesFeedCtx.getBean("postLookup");
    ObjectFactory<ActivitiesFeedModelBuilder> feedModelBuilderFactory = (ObjectFactory<ActivitiesFeedModelBuilder>) activitiesFeedCtx.getBean("feedModelBuilderFactory");
    EmailUserNotifier emailUserNotifier = (EmailUserNotifier) activitiesFeedCtx.getBean("emailUserNotifier");
    
    tenantAdminService = (TenantAdminService) ctx.getBean("tenantAdminService");
    transactionService = (TransactionService) ctx.getBean("transactionService");
    personService = (PersonService) ctx.getBean("personService");
    postDAO = (ActivityPostDAO) ctx.getBean("postDAO");
    nodeService = (NodeService) ctx.getBean("nodeService");
    namespaceService = (NamespaceService) ctx.getBean("namespaceService");
    siteService = (SiteService) ctx.getBean("siteService");
    repoAdminService = (RepoAdminService) ctx.getBean("repoAdminService");
    actionService = (ActionService) ctx.getBean("ActionService");
    authenticationContext = (AuthenticationContext) ctx.getBean("authenticationContext");
    EmailHelper emailHelper = (EmailHelper) ctx.getBean("emailHelper");
    
    AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser();
    // create some users
    transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
    {
        @SuppressWarnings("synthetic-access")
        public Void execute() throws Throwable
        {
            personNodeRef = createUser(userName1);
            failingPersonNodeRef = createUser(userName2);
            return null;
        }
    }, false, true);
    
    // use our own user notifier for testing purposes
    userNotifier = new RegisterErrorUserFeedNotifier();
    userNotifier.setNodeService(nodeService);
    userNotifier.setNamespaceService(namespaceService);
    userNotifier.setSiteService(siteService);
    userNotifier.setActivityService(activityService);
    userNotifier.setRepoAdminService(repoAdminService);
    userNotifier.setActionService(actionService);
    userNotifier.setActivitiesFeedModelBuilderFactory(feedModelBuilderFactory);
    userNotifier.setAuthenticationContext(authenticationContext);
    userNotifier.setExcludedEmailSuffixes(emailUserNotifier.getExcludedEmailSuffixes());
    userNotifier.setEmailHelper(emailHelper);
    feedNotifier.setUserNotifier(userNotifier);
    
    jobDetail = new JobDetail("feedNotifier", FeedNotifierJob.class);
    JobDataMap jobDataMap = jobDetail.getJobDataMap();
    jobDataMap.put("tenantAdminService", tenantAdminService);
    jobDataMap.put("feedNotifier", feedNotifier);
    feedNotifierJob = new FeedNotifierJob();
    
    when(jobCtx.getJobDetail()).thenReturn(jobDetail);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:61,代码来源:FeedNotifierJobTest.java


示例17: onSetUp

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * Called during the transaction setup
 */
protected void onSetUp() throws Exception
{
    super.onSetUp();
    System.out.println("java.io.tmpdir == " + System.getProperty("java.io.tmpdir"));

    // Get the required services
    this.nodeService = (NodeService) this.applicationContext.getBean("nodeService");
    this.contentService = (ContentService) this.applicationContext.getBean("contentService");
    this.authenticationService = (MutableAuthenticationService) this.applicationContext
            .getBean("authenticationService");
    this.actionService = (ActionService) this.applicationContext.getBean("actionService");
    this.transactionService = (TransactionService) this.applicationContext.getBean("transactionComponent");
    this.authenticationComponent = (AuthenticationComponent) this.applicationContext
            .getBean("authenticationComponent");
    this.receiver = (RepoTransferReceiverImpl) this.getApplicationContext().getBean("transferReceiver");
    this.policyComponent = (PolicyComponent) this.getApplicationContext().getBean("policyComponent");
    this.searchService = (SearchService) this.getApplicationContext().getBean("searchService");
    this.repositoryHelper = (Repository) this.getApplicationContext().getBean("repositoryHelper");
    this.namespaceService = (NamespaceService) this.getApplicationContext().getBean("namespaceService");
    this.dummyContent = "This is some dummy content.";        
    this.dummyContentBytes = dummyContent.getBytes("UTF-8");
    setTransactionDefinition(new DefaultTransactionDefinition(TransactionDefinition.PROPAGATION_REQUIRES_NEW));
    authenticationComponent.setSystemUserAsCurrentUser();

    startNewTransaction();
    guestHome = repositoryHelper.getGuestHome();
    endTransaction();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:32,代码来源:RepoTransferReceiverImplTest.java


示例18: onSetUp

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * Called during the transaction setup
 */
protected void onSetUp() throws Exception
{
    // Catch transactions left dangling by inadequate transaction handling during test failures
    if (AlfrescoTransactionSupport.getTransactionReadState() != TxnReadState.TXN_NONE)
    {
        fail("Dangling transaction at start of test.");
    }
    
    super.onSetUp();
    
    // Get the required services
    this.transferService = (TransferService)this.applicationContext.getBean("TransferService");
    this.contentService = (ContentService)this.applicationContext.getBean("ContentService");
    this.transferServiceImpl = (TransferServiceImpl2)this.applicationContext.getBean("transferService2");
    this.searchService = (SearchService)this.applicationContext.getBean("SearchService");
    this.transactionService = (TransactionService)this.applicationContext.getBean("TransactionService");
    this.nodeService = (NodeService) this.applicationContext.getBean("nodeService");
    this.contentService = (ContentService) this.applicationContext.getBean("contentService");
    this.authenticationService = (MutableAuthenticationService) this.applicationContext.getBean("authenticationService");
    this.actionService = (ActionService)this.applicationContext.getBean("actionService");
    this.permissionService = (PermissionService)this.applicationContext.getBean("permissionService");
    this.receiver = (TransferReceiver)this.applicationContext.getBean("transferReceiver");
    this.transferManifestNodeFactory = (TransferManifestNodeFactory)this.applicationContext.getBean("transferManifestNodeFactory");
    this.authenticationComponent = (AuthenticationComponent) this.applicationContext.getBean("authenticationComponent");
    this.lockService = (LockService) this.applicationContext.getBean("lockService");
    this.personService = (PersonService)this.applicationContext.getBean("PersonService");
    this.descriptorService = (DescriptorService)this.applicationContext.getBean("DescriptorService");
    this.copyService = (CopyService)this.applicationContext.getBean("CopyService");
    this.serverDescriptor = descriptorService.getServerDescriptor();
    this.repositoryHelper = (Repository) this.applicationContext.getBean("repositoryHelper");
    
    REPO_ID_B = descriptorService.getCurrentRepositoryDescriptor().getId();
    
    authenticationComponent.setSystemUserAsCurrentUser();
    setTransactionDefinition(new DefaultTransactionDefinition(TransactionDefinition.PROPAGATION_REQUIRES_NEW));
    assertNotNull("receiver is null", this.receiver);     
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:41,代码来源:TransferServiceToBeRefactoredTest.java


示例19: onSetUp

import org.alfresco.service.cmr.action.ActionService; //导入依赖的package包/类
/**
 * Called during the transaction setup
 */
protected void onSetUp() throws Exception
{
   
    super.onSetUp();
    
    // Get the required services
    this.transferService = (TransferService)this.applicationContext.getBean("TransferService");
    this.contentService = (ContentService)this.applicationContext.getBean("ContentService");
    this.transferServiceImpl = (TransferServiceImpl2)this.applicationContext.getBean("transferService2");
    this.searchService = (SearchService)this.applicationContext.getBean("SearchService");
    this.transactionService = (TransactionService)this.applicationContext.getBean("TransactionService");
    this.nodeService = (NodeService) this.applicationContext.getBean("nodeService");
    this.contentService = (ContentService) this.applicationContext.getBean("contentService");
    this.authenticationService = (MutableAuthenticationService) this.applicationContext.getBean("authenticationService");
    this.actionService = (ActionService)this.applicationContext.getBean("actionService");
    this.permissionService = (PermissionService)this.applicationContext.getBean("permissionService");
    this.receiver = (TransferReceiver)this.applicationContext.getBean("transferReceiver");
    this.transferManifestNodeFactory = (TransferManifestNodeFactory)this.applicationContext.getBean("transferManifestNodeFactory");
    this.authenticationComponent = (AuthenticationComponent) this.applicationContext.getBean("authenticationComponent");
    this.lockService = (LockService) this.applicationContext.getBean("lockService");
    this.personService = (PersonService)this.applicationContext.getBean("PersonService");
    this.descriptorService = (DescriptorService)this.applicationContext.getBean("DescriptorService");
    this.copyService = (CopyService)this.applicationContext.getBean("CopyService");
    this.taggingService = ((TaggingService)this.applicationContext.getBean("TaggingService"));
    this.categoryService = (CategoryService)this.applicationContext.getBean("CategoryService");
    this.repositoryHelper = (Repository) this.applicationContext.getBean("repositoryHelper");
    
    this.serverDescriptor = descriptorService.getServerDescriptor();
    
    REPO_ID_B = descriptorService.getCurrentRepositoryDescriptor().getId();
    
    authenticationComponent.setSystemUserAsCurrentUser();
    assertNotNull("receiver is null", this.receiver);     
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:38,代码来源:TransferServiceImplTest.java


示例20: initSpringBeans

import org.alfresco.service.cmr.action.ActionService; //导入依赖的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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java VimPortType类代码示例发布时间:2022-05-22
下一篇:
Java PropertyLayout类代码示例发布时间: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