當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。