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


Java IntermediateCatchEvent类代码示例

本文整理汇总了Java中org.eclipse.bpmn2.IntermediateCatchEvent的典型用法代码示例。如果您正苦于以下问题:Java IntermediateCatchEvent类的具体用法?Java IntermediateCatchEvent怎么用?Java IntermediateCatchEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: create

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
public Object[] create(ICreateContext context) {
	IntermediateCatchEvent catchEvent = Bpmn2Factory.eINSTANCE.createIntermediateCatchEvent();
	TimerEventDefinition eventDef = Bpmn2Factory.eINSTANCE.createTimerEventDefinition();
	catchEvent.getEventDefinitions().add(eventDef);
	
	catchEvent.setId(getNextId());
	catchEvent.setName("TimerCatchEvent");
	
	Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
	if (parentObject instanceof SubProcess) {
     ((SubProcess) parentObject).getFlowElements().add(catchEvent);
   } else {
     getDiagram().eResource().getContents().add(catchEvent);
   }

   addGraphicalContent(catchEvent, context);
	
	// return newly created business object(s)
	return new Object[] { catchEvent };
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:21,代码来源:CreateTimerCatchingEventFeature.java

示例2: intermediateTimerEventToSVG

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
private String intermediateTimerEventToSVG(BPMNShape bpmnShape) {
		
//SvgIntermediateTimerEventTo
		if (getBaseElement(bpmnShape.getBpmnElement()) instanceof IntermediateCatchEvent) {
			IntermediateCatchEvent intermediateCatchEvent=(IntermediateCatchEvent)getBaseElement(bpmnShape.getBpmnElement());
			
			for (EventDefinition eventDefinition : intermediateCatchEvent.getEventDefinitions()) {
				if(eventDefinition instanceof TimerEventDefinition){
					return CommonNodeToSVG(bpmnShape, new SvgIntermediateTimerEventTo());
				}
				if(eventDefinition instanceof ErrorEventDefinition){
					return CommonNodeToSVG(bpmnShape, new SvgIntermediateErrorEventTo());
				}
			}
			
			return CommonNodeToSVG(bpmnShape, new SvgIntermediateEventTo());
			
		}
		
		return CommonNodeToSVG(bpmnShape, new SvgIntermediateEventTo());
	}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:22,代码来源:GetFlowGraphicsSvgCmd.java

示例3: getStencilId

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的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;
  }
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:18,代码来源:CatchEventJsonConverter.java

示例4: refresh

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
@Override
public void refresh() {
  timeDurationText.removeFocusListener(listener);
  timeDateText.removeFocusListener(listener);
  timeCycleText.removeFocusListener(listener);
  
	PictogramElement pe = getSelectedPictogramElement();
	if (pe != null) {
		Object bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
		// the filter assured, that it is a EClass
		if (bo == null)
			return;
		
		IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) bo;
		
		if(catchEvent.getEventDefinitions().get(0) != null) {
		  TimerEventDefinition timerDefinition = (TimerEventDefinition) catchEvent.getEventDefinitions().get(0);
       if(timerDefinition.getTimeDuration() != null && ((FormalExpression) timerDefinition.getTimeDuration()).getBody() != null &&
               ((FormalExpression) timerDefinition.getTimeDuration()).getBody().length() > 0) {
         String timeDuration = ((FormalExpression) timerDefinition.getTimeDuration()).getBody();
         timeDurationText.setText(timeDuration == null ? "" : timeDuration);
         
       } else if(timerDefinition.getTimeDate() != null && ((FormalExpression) timerDefinition.getTimeDate()).getBody() != null &&
               ((FormalExpression) timerDefinition.getTimeDate()).getBody().length() > 0) {
         String timeDate = ((FormalExpression) timerDefinition.getTimeDate()).getBody();
         timeDateText.setText(timeDate == null ? "" : timeDate);
         
       } else if(timerDefinition.getTimeCycle() != null && ((FormalExpression) timerDefinition.getTimeCycle()).getBody() != null &&
               ((FormalExpression) timerDefinition.getTimeCycle()).getBody().length() > 0) {
         String timeCycle = ((FormalExpression) timerDefinition.getTimeCycle()).getBody();
         timeCycleText.setText(timeCycle == null ? "" : timeCycle);
       }
		}
	}
	timeDurationText.addFocusListener(listener);
	timeDateText.addFocusListener(listener);
	timeCycleText.addFocusListener(listener);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:39,代码来源:PropertyIntermediateCatchTimerSection.java

示例5: accept

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
@Override
protected boolean accept(PictogramElement pe) {
	EObject bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
	if (bo instanceof IntermediateCatchEvent) {
	  if(((IntermediateCatchEvent) bo).getEventDefinitions() != null) {
	    for(EventDefinition eventDefinition : ((IntermediateCatchEvent) bo).getEventDefinitions()) {
	      if(eventDefinition instanceof TimerEventDefinition) {
	        return true;
	      }
	    }
	  }
	}
	return false;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:15,代码来源:PropertyIntermediateCatchTimerFilter.java

示例6: getText

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的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 = ((IntermediateCatchEvent) object).getName();
	return label == null || label.length() == 0 ? getString("_UI_IntermediateCatchEvent_type")
			: getString("_UI_IntermediateCatchEvent_type") + " " + label;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:13,代码来源:IntermediateCatchEventItemProvider.java

示例7: basicSetIntermediateCatchEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetIntermediateCatchEvent(
		IntermediateCatchEvent newIntermediateCatchEvent,
		NotificationChain msgs) {
	return ((FeatureMap.Internal) getMixed()).basicAdd(
			Bpmn2Package.Literals.DOCUMENT_ROOT__INTERMEDIATE_CATCH_EVENT,
			newIntermediateCatchEvent, msgs);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:13,代码来源:DocumentRootImpl.java

示例8: setIntermediateCatchEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setIntermediateCatchEvent(
		IntermediateCatchEvent newIntermediateCatchEvent) {
	((FeatureMap.Internal) getMixed()).set(
			Bpmn2Package.Literals.DOCUMENT_ROOT__INTERMEDIATE_CATCH_EVENT,
			newIntermediateCatchEvent);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:12,代码来源:DocumentRootImpl.java

示例9: basicSetIntermediateCatchEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetIntermediateCatchEvent(
        IntermediateCatchEvent newIntermediateCatchEvent, NotificationChain msgs) {
    return ((FeatureMap.Internal) getMixed()).basicAdd(
            Bpmn2Package.Literals.DOCUMENT_ROOT__INTERMEDIATE_CATCH_EVENT,
            newIntermediateCatchEvent, msgs);
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:12,代码来源:DocumentRootImpl.java

示例10: convertJsonToElement

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
  IntermediateCatchEvent catchEvent = Bpmn2Factory.eINSTANCE.createIntermediateCatchEvent();// IntermediateCatchEvent();
  String stencilId = BpmnJsonConverterUtil.getStencilId(elementNode);
  if (STENCIL_EVENT_CATCH_TIMER.equals(stencilId)) {
    convertJsonToTimerDefinition(elementNode, catchEvent);
  } else if (STENCIL_EVENT_CATCH_MESSAGE.equals(stencilId)) {
    convertJsonToMessageDefinition(elementNode, catchEvent);
  } else if (STENCIL_EVENT_CATCH_SIGNAL.equals(stencilId)) {
    convertJsonToSignalDefinition(elementNode, catchEvent);
  }
  return catchEvent;
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:13,代码来源:CatchEventJsonConverter.java

示例11: getAddFeature

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
@Override
	public IAddFeature getAddFeature(IAddContext context) {
		// is object for add request a EClass?
		if (context.getNewObject() instanceof StartEvent) {
		  if(context.getNewObject() instanceof AlfrescoStartEvent) {
		    return new AddAlfrescoStartEventFeature(this);
		  } else {
		  	if(((StartEvent) context.getNewObject()).getEventDefinitions().size() > 0) {
		  		return new AddTimerStartEventFeature(this);
		  	} else {
		  		return new AddStartEventFeature(this);
		  	}
		  }
// <SecureBPMN>
		} else if (context.getNewObject() instanceof BindingOfDuty) {
				return new AddSecurityBodFeature(this);			
		} else if (context.getNewObject() instanceof SeparationOfDuty) {
				return new AddSecuritySodFeature(this);
// </SecureBPMN>			
		} else if (context.getNewObject() instanceof EndEvent) {
		  if(((EndEvent) context.getNewObject()).getEventDefinitions().size() > 0) {
		    return new AddErrorEndEventFeature(this);
		  } else {
		    return new AddEndEventFeature(this);
		  }
		} else if (context.getNewObject() instanceof SequenceFlow) {
			return new AddSequenceFlowFeature(this);
// <SecureBPMN>
		} else if (context.getNewObject() instanceof SecurityFlow) {
			return new AddSecurityFlowFeature(this);
// </SecureBPMN>
		} else if (context.getNewObject() instanceof UserTask) {
		  if(context.getNewObject() instanceof AlfrescoUserTask) {
		    return new AddAlfrescoUserTaskFeature(this);
		  } else {
		    return new AddUserTaskFeature(this);
		  }
		} else if (context.getNewObject() instanceof ScriptTask) {
			return new AddScriptTaskFeature(this);
		} else if (context.getNewObject() instanceof ServiceTask) {
			return new AddServiceTaskFeature(this);
		} else if (context.getNewObject() instanceof MailTask) {
			if(context.getNewObject() instanceof AlfrescoMailTask) {
				return new AddAlfrescoMailTaskFeature(this);
			} else {
				return new AddMailTaskFeature(this);
			}
		} else if (context.getNewObject() instanceof ManualTask) {
			return new AddManualTaskFeature(this);
		} else if (context.getNewObject() instanceof ReceiveTask) {
			return new AddReceiveTaskFeature(this);
		} else if (context.getNewObject() instanceof BusinessRuleTask) {
      return new AddBusinessRuleTaskFeature(this);
		} else if (context.getNewObject() instanceof ExclusiveGateway) {
			return new AddExclusiveGatewayFeature(this);
		} else if (context.getNewObject() instanceof InclusiveGateway) {
      return new AddInclusiveGatewayFeature(this);
    } else if (context.getNewObject() instanceof ParallelGateway) {
			return new AddParallelGatewayFeature(this);
		} else if (context.getNewObject() instanceof BoundaryEvent) {
		  if(((BoundaryEvent) context.getNewObject()).getEventDefinitions().size() > 0) {
		    EventDefinition definition = ((BoundaryEvent) context.getNewObject()).getEventDefinitions().get(0);
		    if(definition instanceof ErrorEventDefinition) {
		      return new AddBoundaryErrorFeature(this);
		    } else {
		      return new AddBoundaryTimerFeature(this);
		    }
		  }
		} else if (context.getNewObject() instanceof IntermediateCatchEvent) {
			return new AddTimerCatchingEventFeature(this);
		} else if (context.getNewObject() instanceof SubProcess) {
      return new AddEmbeddedSubProcessFeature(this);
		} else if (context.getNewObject() instanceof CallActivity) {
			return new AddCallActivityFeature(this);
		} else if (context.getNewObject() instanceof AlfrescoScriptTask) {
      return new AddAlfrescoScriptTaskFeature(this);
    }
		return super.getAddFeature(context);
	}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:80,代码来源:ActivitiBPMNFeatureProvider.java

示例12: caseIntermediateCatchEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
@Override
public Adapter caseIntermediateCatchEvent(IntermediateCatchEvent object) {
	return createIntermediateCatchEventAdapter();
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:5,代码来源:Bpmn2AdapterFactory.java

示例13: getIntermediateCatchEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IntermediateCatchEvent getIntermediateCatchEvent() {
	return (IntermediateCatchEvent) getMixed().get(
			Bpmn2Package.Literals.DOCUMENT_ROOT__INTERMEDIATE_CATCH_EVENT,
			true);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:DocumentRootImpl.java

示例14: createIntermediateEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
public static void createIntermediateEvent(EObject object, XMLStreamWriter xtw) throws Exception {
	IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) object;
  List<EventDefinition> eventDefinitionList = catchEvent.getEventDefinitions();
  if(eventDefinitionList.size() == 1) {
    if(eventDefinitionList.get(0) instanceof TimerEventDefinition) {
      TimerEventDefinition timerDef = (TimerEventDefinition) eventDefinitionList.get(0);
      if(timerDef.getTimeDuration() != null && 
              ((((FormalExpression) timerDef.getTimeDuration()).getBody() != null && 
                      ((FormalExpression) timerDef.getTimeDuration()).getBody().length() > 0) ||
                      
                      (((FormalExpression) timerDef.getTimeDate()).getBody() != null && 
                              ((FormalExpression) timerDef.getTimeDate()).getBody().length() > 0) ||
                              
                              (((FormalExpression) timerDef.getTimeCycle()).getBody() != null && 
                                      ((FormalExpression) timerDef.getTimeCycle()).getBody().length() > 0))) {
        
        // start TimerBoundaryEvent element
        xtw.writeStartElement("intermediateCatchEvent");
        xtw.writeAttribute("id", catchEvent.getId());
        if (catchEvent.getName() != null) {
          xtw.writeAttribute("name", catchEvent.getName());
        }
        
        xtw.writeStartElement("timerEventDefinition");
        
        if(((FormalExpression) timerDef.getTimeDuration()).getBody() != null && 
                      ((FormalExpression) timerDef.getTimeDuration()).getBody().length() > 0) {
          
          xtw.writeStartElement("timeDuration");
          xtw.writeCharacters(((FormalExpression) timerDef.getTimeDuration()).getBody());
          xtw.writeEndElement();
        
        } else if(((FormalExpression) timerDef.getTimeDate()).getBody() != null && 
                      ((FormalExpression) timerDef.getTimeDate()).getBody().length() > 0) {
          
          xtw.writeStartElement("timeDate");
          xtw.writeCharacters(((FormalExpression) timerDef.getTimeDate()).getBody());
          xtw.writeEndElement();
        
        } else {
          
          xtw.writeStartElement("timeCycle");
          xtw.writeCharacters(((FormalExpression) timerDef.getTimeCycle()).getBody());
          xtw.writeEndElement();
        }
        
        xtw.writeEndElement();

        // end TimerIntermediateCatchEvent element
        xtw.writeEndElement();
      }
    }
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:55,代码来源:IntermediateCatchEventExport.java

示例15: caseIntermediateCatchEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //导入依赖的package包/类
@Override
public Adapter caseIntermediateCatchEvent(IntermediateCatchEvent object) {
    return createIntermediateCatchEventAdapter();
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:5,代码来源:Bpmn2AdapterFactory.java


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