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


Java KEWServiceLocator.getActionListService方法代码示例

本文整理汇总了Java中org.kuali.rice.kew.service.KEWServiceLocator.getActionListService方法的典型用法代码示例。如果您正苦于以下问题:Java KEWServiceLocator.getActionListService方法的具体用法?Java KEWServiceLocator.getActionListService怎么用?Java KEWServiceLocator.getActionListService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.kew.service.KEWServiceLocator的用法示例。


在下文中一共展示了KEWServiceLocator.getActionListService方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: recordAction

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
public void recordAction() throws InvalidActionTakenException {

        String errorMessage = validateActionRules();
        if (!org.apache.commons.lang.StringUtils.isEmpty(errorMessage)) {
            throw new InvalidActionTakenException(errorMessage);
        }
//        if (! workgroup.hasMember(getUser())) {
//            throw new InvalidActionTakenException(getUser().getPrincipalName() + " not a member of workgroup " + workgroup.getDisplayName());
//        }

        List<ActionRequestValue> documentRequests = getActionRequestService().findPendingByDoc(getDocumentId());
        List<ActionRequestValue> workgroupRequests = new ArrayList<ActionRequestValue>();
        for (ActionRequestValue actionRequest : documentRequests)
        {
            if (actionRequest.isGroupRequest() && actionRequest.getGroup().getId().equals(groupId))
            {
                workgroupRequests.add(actionRequest);
            }
        }

        ActionTakenValue actionTaken = saveActionTaken(findDelegatorForActionRequests(workgroupRequests));
        notifyActionTaken(actionTaken);

        ActionListService actionListService = KEWServiceLocator.getActionListService();
        Collection<ActionItem> actionItems = actionListService.findByDocumentId(getDocumentId());
        for (ActionItem actionItem : actionItems)
        {
            //delete all requests for this workgroup on this document not to this user
            if (actionItem.isWorkgroupItem() && actionItem.getGroupId().equals(groupId) &&
                    !actionItem.getPrincipalId().equals(getPrincipal().getPrincipalId()))
            {
                actionListService.deleteActionItem(actionItem);
            }
        }
    }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:36,代码来源:TakeWorkgroupAuthority.java

示例2: initForm

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
public void initForm(HttpServletRequest request, ActionForm form) throws Exception {
    ActionListFilterForm filterForm = (ActionListFilterForm) form;
    filterForm.setUserWorkgroups(getUserWorkgroupsDropDownList(getUserSession().getPrincipalId()));
    PreferencesService prefSrv = KewApiServiceLocator.getPreferencesService();
    Preferences preferences = prefSrv.getPreferences(getUserSession().getPrincipalId());
    request.setAttribute("preferences", preferences);
    ActionListService actionListSrv = KEWServiceLocator.getActionListService();
    request.setAttribute("delegators", ActionListUtil.getWebFriendlyRecipients(actionListSrv.findUserSecondaryDelegators(getUserSession().getPrincipalId())));
    request.setAttribute("primaryDelegates", ActionListUtil.getWebFriendlyRecipients(actionListSrv.findUserPrimaryDelegations(getUserSession().getPrincipalId())));
    if (! filterForm.getMethodToCall().equalsIgnoreCase("clear")) {
        filterForm.validateDates();
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:ActionListFilterAction.java

示例3: testReleaseWorkgroupAuthority

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
@Test public void testReleaseWorkgroupAuthority() throws Exception {
    WorkflowDocument doc = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("user1"), TakeWorkgroupAuthorityTest.DOC_TYPE);
    doc.route("");

    String groupId = getGroupIdForName(KimConstants.KIM_GROUP_WORKFLOW_NAMESPACE_CODE, "TestWorkgroup");
    //have member rkirkend take authority
    doc = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), doc.getDocumentId());
    doc.takeGroupAuthority("", groupId);

    // verify there is only one action item and that it's to rkirkend
    ActionListService aiService = KEWServiceLocator.getActionListService();
    Collection<ActionItem> actionItems = aiService.findByDocumentId(doc.getDocumentId());
    assertEquals("There should be only one action item", 1, actionItems.size());
    ActionItem ai = (ActionItem)actionItems.iterator().next();
    assertEquals("action item should be to rkirkend", getPrincipalIdForName("rkirkend"), ai.getPrincipalId());
    assertEquals("action item should be to group", groupId, ai.getGroupId());
    
    //have rkirkend release authority
    doc = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), doc.getDocumentId());

    doc.releaseGroupAuthority("", groupId);

    //verify that all members have the action item
    actionItems = aiService.findByDocumentId(doc.getDocumentId());
    assertTrue("There should be more than one action item", actionItems.size() > 1);
    for (Iterator<ActionItem> iter = actionItems.iterator(); iter.hasNext();) {
        ActionItem actionItem = iter.next();
        assertTrue("Action Item not to workgroup member", TakeWorkgroupAuthorityTest.WORKGROUP_MEMBERS.contains(getPrincipalNameForId(actionItem.getPrincipalId())));
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:31,代码来源:ReleaseWorkgroupAuthorityTest.java

示例4: getActionListService

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
protected ActionListService getActionListService() {
    return (ActionListService) KEWServiceLocator.getActionListService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:ActionListEmailServiceImpl.java

示例5: getActionListService

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
public ActionListService getActionListService() {
    return KEWServiceLocator.getActionListService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:GroupMembershipChangeQueueImpl.java

示例6: saveBusinessObject

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
/**
 * This is a complete override which does not call into
 * {@link KualiMaintainableImpl}. This method calls
 * {@link DocumentTypeService#versionAndSave(DocumentType)}.
 *
 */
@Override
public void saveBusinessObject() {
    DocumentTypeService docTypeService = KEWServiceLocator.getDocumentTypeService();
    DocumentType newDocumentType = (DocumentType) getBusinessObject();
    String documentTypeName = newDocumentType.getName();
    DocumentType docTypeFromDatabase = docTypeService.findByName(documentTypeName);
    if (docTypeFromDatabase == null) {
        docTypeService.versionAndSave(newDocumentType);
    }
    else {
        Boolean applyRetroactively = newDocumentType.getApplyRetroactively();
    	DocumentType newDocumentTypeFromDatabase;
        DocumentTypeXmlParser parser = new DocumentTypeXmlParser();
        try {
            newDocumentTypeFromDatabase = parser.generateNewDocumentTypeFromExisting(documentTypeName);
        } catch (Exception e) {
            throw new WorkflowRuntimeException("Error while attempting to generate new document type from existing " +
            		"database document type with name '" + documentTypeName + "'", e);
        }
        newDocumentTypeFromDatabase.populateDataDictionaryEditableFields(constructUserInterfaceEditablePropertyNamesList(), newDocumentType);
        docTypeService.versionAndSave(newDocumentTypeFromDatabase);
        if (KRADUtils.isNotNull(applyRetroactively) && applyRetroactively.booleanValue()) {
            // save all previous instances of document type with the same name
            // fields: label, description, unresolvedHelpDefinitionUrl
            List<DocumentType> previousDocTypeInstances = docTypeService.findPreviousInstances(documentTypeName);
            for (DocumentType prevDocType : previousDocTypeInstances) {
                // set up fields
                prevDocType.setLabel(newDocumentType.getLabel());
                prevDocType.setDescription(newDocumentType.getDescription());
                prevDocType.setUnresolvedHelpDefinitionUrl(newDocumentType.getUnresolvedHelpDefinitionUrl());
                prevDocType.setUnresolvedDocSearchHelpUrl(newDocumentType.getUnresolvedDocSearchHelpUrl());
                docTypeService.save(prevDocType);
            }
            // save all former/current action items matching document type name
            // fields: docLabel
            ActionListService actionListService = KEWServiceLocator.getActionListService(); 
            Collection<ActionItem> items = actionListService.findByDocumentTypeName(documentTypeName);
            for (ActionItem actionItem : items) {
                actionItem.setDocLabel(newDocumentType.getLabel());
                actionListService.saveActionItem(actionItem);
            }
            // save all former/current outbox action items matching document type name
            // fields: docLabel
            Collection<OutboxItem> outboxItems = actionListService.getOutboxItemsByDocumentType(documentTypeName);
            for (OutboxItem outboxItem : outboxItems) {
                outboxItem.setDocLabel(newDocumentType.getLabel());
                actionListService.saveOutboxItem(outboxItem);
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:58,代码来源:DocumentTypeMaintainable.java

示例7: getActionListService

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
private ActionListService getActionListService() {
    return KEWServiceLocator.getActionListService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:ActionRequestServiceImpl.java

示例8: getActionListService

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
private ActionListService getActionListService() {
	return (ActionListService) KEWServiceLocator.getActionListService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:DocumentOperationAction.java

示例9: setUpAfterDataLoad

import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
protected void setUpAfterDataLoad() throws Exception {
	super.setUpAfterDataLoad();
	actionListService = KEWServiceLocator.getActionListService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:5,代码来源:ActionItemServiceTest.java


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