本文整理汇总了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);
}
}
}
示例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();
}
}
示例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())));
}
}
示例4: getActionListService
import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
protected ActionListService getActionListService() {
return (ActionListService) KEWServiceLocator.getActionListService();
}
示例5: getActionListService
import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
public ActionListService getActionListService() {
return KEWServiceLocator.getActionListService();
}
示例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);
}
}
}
}
示例7: getActionListService
import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
private ActionListService getActionListService() {
return KEWServiceLocator.getActionListService();
}
示例8: getActionListService
import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
private ActionListService getActionListService() {
return (ActionListService) KEWServiceLocator.getActionListService();
}
示例9: setUpAfterDataLoad
import org.kuali.rice.kew.service.KEWServiceLocator; //导入方法依赖的package包/类
protected void setUpAfterDataLoad() throws Exception {
super.setUpAfterDataLoad();
actionListService = KEWServiceLocator.getActionListService();
}