/** * Create an instance of {@link WorkItemDelegationEventType } * */ public WorkItemDelegationEventType createWorkItemDelegationEventType() { return new WorkItemDelegationEventType(); }
/** * Creates a new {@code WorkItemDelegationEventType} instance by deeply copying a given {@code WorkItemDelegationEventType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public WorkItemDelegationEventType(final WorkItemDelegationEventType o) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 super(o); if (o == null) { throw new NullPointerException("Cannot create a copy of 'WorkItemDelegationEventType' from 'null'."); } // 'AssigneeBefore' collection. if (o.assigneeBefore!= null) { copyAssigneeBefore(o.getAssigneeBefore(), this.getAssigneeBefore()); } // 'DelegatedTo' collection. if (o.delegatedTo!= null) { copyDelegatedTo(o.getDelegatedTo(), this.getDelegatedTo()); } // CEnumLeafInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemDelegationMethodType this.delegationMethod = ((o.delegationMethod == null)?null:o.getDelegationMethod()); }
public WorkItemDelegationEventType attorneyRef(ObjectReferenceType value) { setAttorneyRef(value); return this; }
event.setTimestamp(now); event.setInitiatorRef(initiator); event.setAttorneyRef(attorney); event.setWorkItemId(workItem.getId()); event.setEscalationLevel(workItem.getEscalationLevel()); event.setStageNumber(campaign.getStageNumber()); event.setIteration(norm(campaign.getIteration())); addDeltasForNewAssigneesAndEvent(deltas, workItem, aCase, newAssignees, event);
public static WorkItemDelegationEventType createDelegationEvent(WorkItemEscalationLevelType newEscalation, List<ObjectReferenceType> assigneesBefore, List<ObjectReferenceType> delegatedTo, @NotNull WorkItemDelegationMethodType method, WorkItemEventCauseInformationType causeInformation) { WorkItemDelegationEventType event; if (newEscalation != null) { WorkItemEscalationEventType escEvent = new WorkItemEscalationEventType(); escEvent.setNewEscalationLevel(newEscalation); event = escEvent; } else { event = new WorkItemDelegationEventType(); } event.getAssigneeBefore().addAll(assigneesBefore); event.getDelegatedTo().addAll(delegatedTo); event.setDelegationMethod(method); event.setCause(causeInformation); return event; }
WorkItemDelegationEventType event = (WorkItemDelegationEventType) ceoCase.getEvent().get(2); assertFalse("Event is Escalation one, although it shouldn't", event instanceof WorkItemEscalationEventType); assertNotNull("No timestamp in event", event.getTimestamp()); assertEquals("Wrong initiatorRef OID", USER_ADMINISTRATOR_OID, event.getInitiatorRef().getOid()); assertEquals("Wrong workItemId", workItem.getId(), event.getWorkItemId()); assertObjectRefs("assigneeBefore", false, event.getAssigneeBefore(), USER_ELAINE_OID); assertObjectRefs("delegatedTo", false, event.getDelegatedTo(), USER_ADMINISTRATOR_OID, USER_JACK_OID); assertEquals("Wrong delegationMethod", WorkItemDelegationMethodType.REPLACE_ASSIGNEES, event.getDelegationMethod()); assertEquals("Wrong old escalation level", OLD_ESCALATION_LEVEL, event.getEscalationLevel());
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { List<ObjectReferenceType> theAssigneeBefore; theAssigneeBefore = (((this.assigneeBefore!= null)&&(!this.assigneeBefore.isEmpty()))?this.getAssigneeBefore():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "assigneeBefore", theAssigneeBefore), currentHashCode, theAssigneeBefore); } { List<ObjectReferenceType> theDelegatedTo; theDelegatedTo = (((this.delegatedTo!= null)&&(!this.delegatedTo.isEmpty()))?this.getDelegatedTo():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "delegatedTo", theDelegatedTo), currentHashCode, theDelegatedTo); } { WorkItemDelegationMethodType theDelegationMethod; theDelegationMethod = this.getDelegationMethod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "delegationMethod", theDelegationMethod), currentHashCode, theDelegationMethod); } return currentHashCode; }
public WorkItemDelegationEventType escalationLevel(WorkItemEscalationLevelType value) { setEscalationLevel(value); return this; }
public WorkItemDelegationEventType timestamp(XMLGregorianCalendar value) { setTimestamp(value); return this; }
public WorkItemDelegationEventType initiatorRef(ObjectReferenceType value) { setInitiatorRef(value); return this; }
public WorkItemDelegationEventType iteration(Integer value) { setIteration(value); return this; }
public WorkItemDelegationEventType stageNumber(Integer value) { setStageNumber(value); return this; }
public WorkItemDelegationEventType assigneeBefore(ObjectReferenceType value) { getAssigneeBefore().add(value); return this; }
public WorkItemDelegationEventType delegatedTo(ObjectReferenceType value) { getDelegatedTo().add(value); return this; }
WfContextUtil.computeAssignees(newAssignees, delegatedTo, delegates, method, workItem); WorkItemDelegationEventType event = WfContextUtil.createDelegationEvent(newEscalationLevel, assigneesBefore, delegatedTo, method, causeInformation); event.setTimestamp(now); event.setInitiatorRef(initiator); event.setAttorneyRef(attorney); event.setWorkItemId(workItem.getId()); event.setEscalationLevel(workItem.getEscalationLevel()); event.setStageNumber(campaign.getStageNumber()); event.setIteration(norm(campaign.getIteration())); List<ItemDelta<?, ?>> deltas = new ArrayList<>(); addDeltasForNewAssigneesAndEvent(deltas, workItem, aCase, newAssignees, event);
lhsAssigneeBefore = (((this.assigneeBefore!= null)&&(!this.assigneeBefore.isEmpty()))?this.getAssigneeBefore():null); List<ObjectReferenceType> rhsAssigneeBefore; rhsAssigneeBefore = (((that.assigneeBefore!= null)&&(!that.assigneeBefore.isEmpty()))?that.getAssigneeBefore():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "assigneeBefore", lhsAssigneeBefore), LocatorUtils.property(thatLocator, "assigneeBefore", rhsAssigneeBefore), lhsAssigneeBefore, rhsAssigneeBefore)) { return false; lhsDelegatedTo = (((this.delegatedTo!= null)&&(!this.delegatedTo.isEmpty()))?this.getDelegatedTo():null); List<ObjectReferenceType> rhsDelegatedTo; rhsDelegatedTo = (((that.delegatedTo!= null)&&(!that.delegatedTo.isEmpty()))?that.getDelegatedTo():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "delegatedTo", lhsDelegatedTo), LocatorUtils.property(thatLocator, "delegatedTo", rhsDelegatedTo), lhsDelegatedTo, rhsDelegatedTo)) { return false; lhsDelegationMethod = this.getDelegationMethod(); WorkItemDelegationMethodType rhsDelegationMethod; rhsDelegationMethod = that.getDelegationMethod(); if (!strategy.equals(LocatorUtils.property(thisLocator, "delegationMethod", lhsDelegationMethod), LocatorUtils.property(thatLocator, "delegationMethod", rhsDelegationMethod), lhsDelegationMethod, rhsDelegationMethod)) { return false;
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public WorkItemDelegationEventType clone() { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final WorkItemDelegationEventType clone = ((WorkItemDelegationEventType) super.clone()); // 'AssigneeBefore' collection. if (this.assigneeBefore!= null) { clone.assigneeBefore = null; copyAssigneeBefore(this.getAssigneeBefore(), clone.getAssigneeBefore()); } // 'DelegatedTo' collection. if (this.delegatedTo!= null) { clone.delegatedTo = null; copyDelegatedTo(this.getDelegatedTo(), clone.getDelegatedTo()); } // CEnumLeafInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemDelegationMethodType clone.delegationMethod = ((this.delegationMethod == null)?null:this.getDelegationMethod()); return clone; } }
/** * Create an instance of {@link WorkItemDelegationEventType } * */ public WorkItemDelegationEventType createWorkItemDelegationEventType() { return new WorkItemDelegationEventType(); }
/** * Create an instance of {@link WorkItemDelegationEventType } * */ public WorkItemDelegationEventType createWorkItemDelegationEventType() { return new WorkItemDelegationEventType(); }