本文整理汇总了Java中org.kuali.rice.kew.api.action.ActionItemContract类的典型用法代码示例。如果您正苦于以下问题:Java ActionItemContract类的具体用法?Java ActionItemContract怎么用?Java ActionItemContract使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ActionItemContract类属于org.kuali.rice.kew.api.action包,在下文中一共展示了ActionItemContract类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: compare
import org.kuali.rice.kew.api.action.ActionItemContract; //导入依赖的package包/类
@Override
public int compare(ActionItemContract actionItem1, ActionItemContract actionItem2) throws ClassCastException {
int actionCodeValue = ActionRequestValue.compareActionCode(actionItem1.getActionRequestCd(), actionItem2.getActionRequestCd(), true);
if (actionCodeValue != 0) {
return actionCodeValue;
}
int recipientTypeValue = ActionRequestValue.compareRecipientType(getRecipientTypeCode(actionItem1), getRecipientTypeCode(actionItem2));
if (recipientTypeValue != 0) {
return recipientTypeValue;
}
return ActionRequestValue.compareDelegationType(actionItem1.getDelegationType(), actionItem2.getDelegationType());
}
示例2: getRecipientTypeCode
import org.kuali.rice.kew.api.action.ActionItemContract; //导入依赖的package包/类
private String getRecipientTypeCode(Object object) {
ActionItemContract actionItem = (ActionItemContract)object;
String recipientTypeCode = RecipientType.PRINCIPAL.getCode();
if (actionItem.getRoleName() != null) {
recipientTypeCode = RecipientType.ROLE.getCode();
}
if (actionItem.getGroupId() != null) {
recipientTypeCode = RecipientType.GROUP.getCode();
}
return recipientTypeCode;
}
示例3: compare
import org.kuali.rice.kew.api.action.ActionItemContract; //导入依赖的package包/类
@Override
public int compare(ActionItemContract actionItem1, ActionItemContract actionItem2) throws ClassCastException {
if (requiresComparison(actionItem1, actionItem2)) {
return itemComparator.compare(actionItem1, actionItem2);
}
return 0;
}
示例4: compare
import org.kuali.rice.kew.api.action.ActionItemContract; //导入依赖的package包/类
public int compare(Object object1, Object object2) throws ClassCastException {
ActionItemContract actionItem1 = (ActionItemContract)object1;
ActionItemContract actionItem2 = (ActionItemContract)object2;
int actionCodeValue = ActionRequestValue.compareActionCode(actionItem1.getActionRequestCd(), actionItem2.getActionRequestCd(), true);
if (actionCodeValue != 0) {
return actionCodeValue;
}
int recipientTypeValue = ActionRequestValue.compareRecipientType(getRecipientTypeCode(actionItem1), getRecipientTypeCode(actionItem2));
if (recipientTypeValue != 0) {
return recipientTypeValue;
}
return ActionRequestValue.compareDelegationType(actionItem1.getDelegationType(), actionItem2.getDelegationType());
}
示例5: requiresComparison
import org.kuali.rice.kew.api.action.ActionItemContract; //导入依赖的package包/类
/**
* Returns whether or not the two action items require comparison. The Action List only operates
* on Action Items for a single user and we only care about comparing the action items if they are
* on the same document and for the same user.
*/
protected boolean requiresComparison(ActionItemContract actionItem1, ActionItemContract actionItem2) {
return actionItem1.getDocumentId().equals(actionItem2.getDocumentId()) &&
actionItem1.getPrincipalId().equals(actionItem2.getPrincipalId());
}