本文整理汇总了Java中org.eclipse.bpmn2.SignalEventDefinition类的典型用法代码示例。如果您正苦于以下问题:Java SignalEventDefinition类的具体用法?Java SignalEventDefinition怎么用?Java SignalEventDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SignalEventDefinition类属于org.eclipse.bpmn2包,在下文中一共展示了SignalEventDefinition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStencilId
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
protected String getStencilId(FlowElement flowElement) {
CatchEvent event = (CatchEvent) flowElement;
if (event.getEventDefinitions().size() > 0) {
EventDefinition eventDefinition = event.getEventDefinitions().get(0);
if(eventDefinition instanceof TimerEventDefinition) {
return STENCIL_EVENT_START_TIMER;
}else if(eventDefinition instanceof ErrorEventDefinition) {
return STENCIL_EVENT_START_ERROR;
}else if(eventDefinition instanceof MessageEventDefinition) {
return STENCIL_EVENT_START_MESSAGE;
}else if(eventDefinition instanceof SignalEventDefinition) {
return STENCIL_EVENT_START_SIGNAL;
}
}
return STENCIL_EVENT_START_NONE;
}
示例2: getStencilId
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
protected String getStencilId(FlowElement flowElement) {
IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
List<EventDefinition> eventDefinitions = catchEvent.getEventDefinitions();
if (eventDefinitions.size() != 1) {
// return timer event as default;
return STENCIL_EVENT_CATCH_TIMER;
}
EventDefinition eventDefinition = eventDefinitions.get(0);
if (eventDefinition instanceof MessageEventDefinition) {
return STENCIL_EVENT_CATCH_MESSAGE;
} else if (eventDefinition instanceof SignalEventDefinition) {
return STENCIL_EVENT_CATCH_SIGNAL;
} else {
return STENCIL_EVENT_CATCH_TIMER;
}
}
示例3: getStencilId
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
protected String getStencilId(FlowElement flowElement) {
BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
List<EventDefinition> eventDefinitions = boundaryEvent.getEventDefinitions();
if (eventDefinitions.size() != 1) {
// return timer event as default;
return STENCIL_EVENT_BOUNDARY_TIMER;
}
EventDefinition eventDefinition = eventDefinitions.get(0);
if (eventDefinition instanceof ErrorEventDefinition) {
return STENCIL_EVENT_BOUNDARY_ERROR;
} else if (eventDefinition instanceof SignalEventDefinition) {
return STENCIL_EVENT_BOUNDARY_SIGNAL;
} else {
return STENCIL_EVENT_BOUNDARY_TIMER;
}
}
示例4: setSignalRefForCatchEvents
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
public void setSignalRefForCatchEvents(FlowElementsContainer container,
Definitions def) {
List<FlowElement> flowElements = container.getFlowElements();
for (FlowElement fe : flowElements) {
if (fe instanceof CatchEvent) {
if (((CatchEvent) fe).getEventDefinitions().size() > 0) {
EventDefinition ed = ((CatchEvent) fe).getEventDefinitions().get(0);
if (ed instanceof SignalEventDefinition) {
SignalEventDefinition sed = (SignalEventDefinition) ed;
if (sed.getSignalRef() != null) {
Signal signal = findSignalWithName(sed.getSignalRef(),
def);
if (signal != null) {
sed.setSignalRef(signal.getId());
}
}
}
}
} else if (fe instanceof FlowElementsContainer) {
setSignalRefForCatchEvents((FlowElementsContainer) fe,
def);
}
}
}
示例5: setSignalRefForThrowEvents
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
public void setSignalRefForThrowEvents(FlowElementsContainer container,
Definitions def) {
List<FlowElement> flowElements = container.getFlowElements();
for (FlowElement fe : flowElements) {
if (fe instanceof ThrowEvent) {
if (((ThrowEvent) fe).getEventDefinitions().size() > 0) {
EventDefinition ed = ((ThrowEvent) fe).getEventDefinitions().get(0);
if (ed instanceof SignalEventDefinition) {
SignalEventDefinition sed = (SignalEventDefinition) ed;
if (sed.getSignalRef() != null) {
Signal signal = findSignalWithName(sed.getSignalRef(),
def);
if (signal != null) {
sed.setSignalRef(signal.getId());
}
}
}
}
} else if (fe instanceof FlowElementsContainer) {
setSignalRefForThrowEvents((FlowElementsContainer) fe,
def);
}
}
}
示例6: setSignalRefForBoundaryEvents
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
public void setSignalRefForBoundaryEvents(FlowElementsContainer container,
Definitions def) {
List<FlowElement> flowElements = container.getFlowElements();
for (FlowElement fe : flowElements) {
if (fe instanceof BoundaryEvent) {
if (((BoundaryEvent) fe).getEventDefinitions().size() > 0) {
EventDefinition ed = ((BoundaryEvent) fe).getEventDefinitions().get(0);
if (ed instanceof SignalEventDefinition) {
SignalEventDefinition sed = (SignalEventDefinition) ed;
if (sed.getSignalRef() != null) {
Signal signal = findSignalWithName(sed.getSignalRef(),
def);
if (signal != null) {
sed.setSignalRef(signal.getId());
}
}
}
}
} else if (fe instanceof FlowElementsContainer) {
setSignalRefForBoundaryEvents((FlowElementsContainer) fe,
def);
}
}
}
示例7: getText
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((SignalEventDefinition) object).getId();
return label == null || label.length() == 0 ? getString("_UI_SignalEventDefinition_type")
: getString("_UI_SignalEventDefinition_type") + " " + label;
}
示例8: basicSetSignalEventDefinition
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSignalEventDefinition(
SignalEventDefinition newSignalEventDefinition,
NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(
Bpmn2Package.Literals.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION,
newSignalEventDefinition, msgs);
}
示例9: setSignalEventDefinition
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSignalEventDefinition(
SignalEventDefinition newSignalEventDefinition) {
((FeatureMap.Internal) getMixed()).set(
Bpmn2Package.Literals.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION,
newSignalEventDefinition);
}
示例10: basicSetSignalEventDefinition
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSignalEventDefinition(
SignalEventDefinition newSignalEventDefinition, NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(
Bpmn2Package.Literals.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION,
newSignalEventDefinition, msgs);
}
示例11: addEventProperties
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
protected void addEventProperties(Event event, ObjectNode propertiesNode) {
List<EventDefinition> eventDefinitions=null;
if(event instanceof CatchEvent){
eventDefinitions=((CatchEvent)event).getEventDefinitions();
}
if(event instanceof ThrowEvent){
eventDefinitions=((ThrowEvent)event).getEventDefinitions();
}
if (eventDefinitions.size() == 1) {
EventDefinition eventDefinition = eventDefinitions.get(0);
if (eventDefinition instanceof ErrorEventDefinition) {
ErrorEventDefinition errorDefinition = (ErrorEventDefinition) eventDefinition;
if (StringUtils.isNotEmpty(errorDefinition.getErrorRef().getErrorCode())) {
propertiesNode.put(PROPERTY_ERRORREF, errorDefinition.getErrorRef().getErrorCode());
}
} else if (eventDefinition instanceof SignalEventDefinition) {
SignalEventDefinition signalDefinition = (SignalEventDefinition) eventDefinition;
if (StringUtils.isNotEmpty(signalDefinition.getSignalRef().getId())) {
propertiesNode.put(PROPERTY_SIGNALREF, signalDefinition.getSignalRef().getId());
}
} else if (eventDefinition instanceof TimerEventDefinition) {
TimerEventDefinition timerDefinition = (TimerEventDefinition) eventDefinition;
if (StringUtils.isNotEmpty(BpmnModelUtil.getExpression(timerDefinition.getTimeDuration()))) {
propertiesNode.put(PROPERTY_TIMER_DURATON, BpmnModelUtil.getExpression(timerDefinition.getTimeDuration()));
}
if (StringUtils.isNotEmpty(BpmnModelUtil.getExpression(timerDefinition.getTimeCycle()))) {
propertiesNode.put(PROPERTY_TIMER_CYCLE, BpmnModelUtil.getExpression(timerDefinition.getTimeCycle()));
}
if (StringUtils.isNotEmpty(BpmnModelUtil.getExpression(timerDefinition.getTimeDate()))) {
propertiesNode.put(PROPERTY_TIMER_DATE,BpmnModelUtil.getExpression( timerDefinition.getTimeDate()));
}
}
}
}
示例12: convertJsonToSignalDefinition
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
protected void convertJsonToSignalDefinition(JsonNode objectNode, Event event) {
String signalRef = getPropertyValueAsString(PROPERTY_SIGNALREF, objectNode);
if (StringUtils.isNotEmpty(signalRef)) {
SignalEventDefinition eventDefinition = Bpmn2Factory.eINSTANCE.createSignalEventDefinition();// SignalEventDefinition();
//eventDefinition.setSignalRef(signalRef);
//event.getEventDefinitions().add(eventDefinition);
}
}
示例13: getStencilId
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
protected String getStencilId(FlowElement flowElement) {
ThrowEvent throwEvent = (ThrowEvent) flowElement;
List<EventDefinition> eventDefinitions = throwEvent.getEventDefinitions();
if (eventDefinitions.size() != 1) {
// return none event as default;
return STENCIL_EVENT_THROW_NONE;
}
EventDefinition eventDefinition = eventDefinitions.get(0);
if (eventDefinition instanceof SignalEventDefinition) {
return STENCIL_EVENT_THROW_SIGNAL;
} else {
return STENCIL_EVENT_THROW_NONE;
}
}
示例14: caseSignalEventDefinition
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
@Override
public Adapter caseSignalEventDefinition(SignalEventDefinition object) {
return createSignalEventDefinitionAdapter();
}
示例15: getSignalEventDefinition
import org.eclipse.bpmn2.SignalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SignalEventDefinition getSignalEventDefinition() {
return (SignalEventDefinition) getMixed().get(
Bpmn2Package.Literals.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION,
true);
}