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


Java CallActivity类代码示例

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


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

示例1: canResizeShape

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
@Override
public boolean canResizeShape(IResizeShapeContext context) {
  boolean canResize = super.canResizeShape(context);

  // perform further check only if move allowed by default feature
  if (canResize == true) {
    // don't allow resize if the class name has the length of 1
    Shape shape = context.getShape();
    Object bo = getBusinessObjectForPictogramElement(shape);
    if (bo instanceof Task || bo instanceof CallActivity) {
      canResize = true;
    } else {
      canResize = false;
    }
  }
  return canResize;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:18,代码来源:TaskResizeFeature.java

示例2: refresh

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
@Override
public void refresh() {
  
  PictogramElement pe = getSelectedPictogramElement();
  if (pe != null) {
    Object bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
    if (bo == null)
      return;
    
    List<IOParameter> inParameterList = ((CallActivity) bo).getInParameters();
    
    inParameterEditor.pictogramElement = pe;
    inParameterEditor.diagramEditor = getDiagramEditor();
    inParameterEditor.diagram = getDiagram();
    inParameterEditor.isInputParameters = true;
    inParameterEditor.initialize(inParameterList);
    
    List<IOParameter> outParameterList = ((CallActivity) bo).getOutParameters();
    
    outParameterEditor.pictogramElement = pe;
    outParameterEditor.diagramEditor = getDiagramEditor();
    outParameterEditor.diagram = getDiagram();
    outParameterEditor.isInputParameters = false;
    outParameterEditor.initialize(outParameterList);
 }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:27,代码来源:PropertyIOParameterSection.java

示例3: refresh

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
@Override
public void refresh() {
  callElementText.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;

    CallActivity callActivity = (CallActivity) bo;
    String calledElement = callActivity.getCalledElement();
    callElementText.setText(calledElement == null ? "" : calledElement);
  }
  callElementText.addFocusListener(listener);
  evaluateCallElementButtonEnabled();
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:PropertyCallActivitySection.java

示例4: create

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
@Override
public Object[] create(ICreateContext context) {
	CallActivity callActivity = Bpmn2Factory.eINSTANCE.createCallActivity();
	callActivity.setId(getNextId());
	setName("Call activity", callActivity, context);

	Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
   if (parentObject instanceof SubProcess) {
     ((SubProcess) parentObject).getFlowElements().add(callActivity);
   } else {
     getDiagram().eResource().getContents().add(callActivity);
   }

	// do the add
   addGraphicalContent(callActivity, context);

	// return newly created business object(s)
	return new Object[] { callActivity };

}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:21,代码来源:CreateCallActivityFeature.java

示例5: getUnsupportedElementTypes

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
/**
 * Returns a list with the names of the BPMN 2.0 elements that are currently
 * not supported by the analysis.
 *
 * @return A List with the names of the unsupported elements as Strings.
 */
private List<String> getUnsupportedElementTypes() {
    List<String> res = new ArrayList<String>();

    for (EObject object : getDiagram().eResource().getContents()) {

        if (object instanceof SubProcess || object instanceof CallActivity
                || object instanceof InclusiveGateway
                || object instanceof BoundaryEvent) {
            res.add(object.getClass().getSimpleName());
        }

    }

    // remove duplicates
    HashSet<String> h = new HashSet<String>(res);
    res.clear();
    res.addAll(h);

    return res;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:27,代码来源:ValidateAslanFeature.java

示例6: notifyChanged

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
	updateChildren(notification);

	switch (notification.getFeatureID(CallActivity.class)) {
	case Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT:
		fireNotifyChanged(new ViewerNotification(notification,
				notification.getNotifier(), false, true));
		return;
	case Bpmn2Package.CALL_ACTIVITY__IN_PARAMETERS:
	case Bpmn2Package.CALL_ACTIVITY__OUT_PARAMETERS:
		fireNotifyChanged(new ViewerNotification(notification,
				notification.getNotifier(), true, false));
		return;
	}
	super.notifyChanged(notification);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:25,代码来源:CallActivityItemProvider.java

示例7: parseCallActivity

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
private CallActivity parseCallActivity(XMLStreamReader xtr) {
	CallActivity callActivity = Bpmn2Factory.eINSTANCE.createCallActivity();
	callActivity.setName(xtr.getAttributeValue(null, "name"));
	callActivity.setAsynchronous(parseAsync(xtr));
	if (xtr.getAttributeValue(null, "calledElement") != null
	    && xtr.getAttributeValue(null, "calledElement").length() > 0) {
		callActivity.setCalledElement(xtr
		    .getAttributeValue(null, "calledElement"));
	}
	if (xtr.getAttributeValue(null, "default") != null) {
		defaultFlowMap.put(callActivity, xtr.getAttributeValue(null, "default"));
	}
	boolean readyWithTask = false;
	try {
		while (readyWithTask == false && xtr.hasNext()) {
			xtr.next();
			if (xtr.isStartElement()
			    && "extensionElements".equalsIgnoreCase(xtr.getLocalName())) {
				
				fillExtensionsForCallActivity(xtr, callActivity);

			} else if (xtr.isStartElement()
			    && "multiInstanceLoopCharacteristics".equalsIgnoreCase(xtr
			        .getLocalName())) {
				MultiInstanceLoopCharacteristics multiInstanceDef = Bpmn2Factory.eINSTANCE
				    .createMultiInstanceLoopCharacteristics();
				callActivity.setLoopCharacteristics(multiInstanceDef);
				parseMultiInstanceDef(multiInstanceDef, xtr);

			} else if (xtr.isEndElement()
			    && "callActivity".equalsIgnoreCase(xtr.getLocalName())) {
				readyWithTask = true;
			}
		}
	} catch (Exception e) {
		e.printStackTrace();
	}
	return callActivity;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:40,代码来源:BpmnParser.java

示例8: create

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
/**
 * Creates the HTML properties string for a given FlowElement.
 *
 * @param flowElement
 *            The FlowElement for which the properties should be written to
 *            a string.
 * @return The properties of the given FlowElement represented as a String.
 */
public static String create(FlowElement flowElement) {
    if (flowElement instanceof SequenceFlow) {
        return createSequenceFlowString((SequenceFlow) flowElement);
    } else if (flowElement instanceof StartEvent) {
        return createStartEventString((StartEvent) flowElement);
    } else if (flowElement instanceof EndEvent) {
        return createEndEventString((EndEvent) flowElement);
    } else if (flowElement instanceof UserTask) {
        return createUserTaskString((UserTask) flowElement);
    } else if (flowElement instanceof ScriptTask) {
        return createScriptTaskString((ScriptTask) flowElement);
    } else if (flowElement instanceof ServiceTask) {
        return createServiceTaskString((ServiceTask) flowElement);
    } else if (flowElement instanceof MailTask) {
        return createMailTaskString((MailTask) flowElement);
    } else if (flowElement instanceof ExclusiveGateway) {
        return createExclusiveGatewayString((ExclusiveGateway) flowElement);
    } else if (flowElement instanceof BusinessRuleTask) {
        return createBusinessRuleTaskString((BusinessRuleTask) flowElement);
    } else if (flowElement instanceof CallActivity) {
        return createCallActivityString((CallActivity) flowElement);
    } else if (flowElement instanceof BoundaryEvent) {
        return createBoundaryEventString((BoundaryEvent) flowElement);
    } else {
        return "&nbsp;";
    }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:36,代码来源:PropertiesStringBuilder.java

示例9: accept

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

示例10: setLocation

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
private void setLocation(BaseElement targetElement, CreateContext context) {
	if(context.getProperty(CONNECTION_ATTRIBUTE) != null) {
		
		CreateConnectionContext connectionContext = (CreateConnectionContext) 
			context.getProperty(CONNECTION_ATTRIBUTE);
		PictogramElement sourceElement = connectionContext.getSourcePictogramElement();
		EObject sourceObject = sourceElement.getLink().getBusinessObjects().get(0);
		if(sourceObject instanceof Event && (targetElement instanceof Task || targetElement instanceof CallActivity)) {
			context.setLocation(sourceElement.getGraphicsAlgorithm().getX() + 80, 
					sourceElement.getGraphicsAlgorithm().getY() - 10);
		
		} else if(sourceObject instanceof Event && targetElement instanceof Gateway) {
			context.setLocation(sourceElement.getGraphicsAlgorithm().getX() + 80, 
					sourceElement.getGraphicsAlgorithm().getY() - 3);
			
		} else if(sourceObject instanceof Gateway && targetElement instanceof Event) {
			context.setLocation(sourceElement.getGraphicsAlgorithm().getX() + 85, 
					sourceElement.getGraphicsAlgorithm().getY() + 3);
		
		} else if(sourceObject instanceof Gateway && (targetElement instanceof Task || targetElement instanceof CallActivity)) {
			context.setLocation(sourceElement.getGraphicsAlgorithm().getX() + 85, 
					sourceElement.getGraphicsAlgorithm().getY() - 7);
		
		} else if((sourceObject instanceof Task || sourceObject instanceof CallActivity) && targetElement instanceof Gateway) {
			context.setLocation(sourceElement.getGraphicsAlgorithm().getX() + 160, 
					sourceElement.getGraphicsAlgorithm().getY() + 7);
		
		} else if((sourceObject instanceof Task || sourceObject instanceof CallActivity) && targetElement instanceof Event) {
			context.setLocation(sourceElement.getGraphicsAlgorithm().getX() + 160, 
					sourceElement.getGraphicsAlgorithm().getY() + 10);
		
		} else if((sourceObject instanceof Task || sourceObject instanceof CallActivity) && (targetElement instanceof Task || targetElement instanceof CallActivity)) {
			context.setLocation(sourceElement.getGraphicsAlgorithm().getX() + 160, 
					sourceElement.getGraphicsAlgorithm().getY());
		}
	}
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:38,代码来源:AbstractCreateFastBPMNFeature.java

示例11: canCreate

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
public boolean canCreate(ICreateContext context) {
  Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
   if (parentObject instanceof SubProcess == true ||
       parentObject instanceof CallActivity == true) {
     return true;
   }
   return false;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:9,代码来源:CreateBoundaryErrorFeature.java

示例12: canAdd

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
@Override
public boolean canAdd(IAddContext context) {
	if (context.getNewObject() instanceof CallActivity) {
		
	  Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
     
     if (context.getTargetContainer() instanceof Diagram || parentObject instanceof SubProcess) {
       return true;
     }
	}
	return false;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:13,代码来源:AddCallActivityFeature.java

示例13: canAdd

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
@Override
public boolean canAdd(IAddContext context) {
  Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
  if (parentObject instanceof SubProcess == false && parentObject instanceof CallActivity == false) {
    return false;
  }
  if (context.getNewObject() instanceof BoundaryEvent == false) {
    return false;
  }
  return true;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:12,代码来源:AddBoundaryErrorFeature.java

示例14: getResizeShapeFeature

import org.eclipse.bpmn2.CallActivity; //导入依赖的package包/类
@Override
public IResizeShapeFeature getResizeShapeFeature(IResizeShapeContext context) {
 Shape shape = context.getShape();
  Object bo = getBusinessObjectForPictogramElement(shape);
  if (bo instanceof SubProcess) {
  	return new SubProcessResizeFeature(this);
  } else if (bo instanceof Task || bo instanceof CallActivity) {
  	return new TaskResizeFeature(this);
  }
  return super.getResizeShapeFeature(context);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:12,代码来源:ActivitiBPMNFeatureProvider.java

示例15: getText

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


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