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


Java ProcessContext类代码示例

本文整理汇总了Java中de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext的典型用法代码示例。如果您正苦于以下问题:Java ProcessContext类的具体用法?Java ProcessContext怎么用?Java ProcessContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: showDialog

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
public static AbstractACModel showDialog(Window owner) throws Exception{
	if(!SwatComponents.getInstance().containsProcessContexts()){
		int result = JOptionPane.showConfirmDialog(owner, "Working directory does not contain any contexts so far.\nCreate new context now?", "No process contexts found", JOptionPane.YES_NO_OPTION);
		if(result != JOptionPane.YES_OPTION)
			return null;

		ProcessContext newContext = ProcessContextDialog.showDialog(owner);
		if(newContext == null)
			return null;
		
		SwatComponents.getInstance().getContainerProcessContexts().addComponent(newContext, true);
	}
	SwatACModelChooserDialog dialog = new SwatACModelChooserDialog(owner);
	dialog.setUpGUI();
	return dialog.getDialogObject();
}
 
开发者ID:iig-uni-freiburg,项目名称:SWAT20,代码行数:17,代码来源:SwatACModelChooserDialog.java

示例2: addComponents

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
@Override
	protected void addComponents() throws Exception {
		mainPanel().setLayout(new BorderLayout());
		
		JPanel topPanel = new JPanel();
		BoxLayout topPanelLayout = new BoxLayout(topPanel, BoxLayout.LINE_AXIS);
		topPanel.setLayout(topPanelLayout);
		topPanel.add(getViewBox());
		if(aclModel.getContext() instanceof ProcessContext)
			topPanel.add(getDeriveBox());
		topPanel.add(Box.createHorizontalGlue());
		mainPanel().add(topPanel, BorderLayout.NORTH);
		
		JScrollPane scrollPane = new JScrollPane(getPermissionTable());
		mainPanel().add(scrollPane, BorderLayout.CENTER);
		
//		aclModel = aclTable.getACLModel();
	}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:19,代码来源:PermissionDialog.java

示例3: DataUsageTableModel

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
public DataUsageTableModel(ProcessContext context) {
    Validate.notNull(context);
    if (!context.containsActivities()) {
        throw new ParameterException(ErrorCode.EMPTY, "Context does not contain any activities");
    }
    this.context = context;
}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:8,代码来源:DataUsageTableModel.java

示例4: DataUsageDialog

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
public DataUsageDialog(Window owner, ProcessContext context) {
    super(owner, ButtonPanelLayout.CENTERED);
    if (!context.containsActivities()) {
        throw new ParameterException("Context does not contain any " + context.getActivityDescriptorPlural().toLowerCase());
    }
    if (!context.containsObjects()) {
        throw new ParameterException("Context does not contain any " + context.getObjectDescriptorPlural().toLowerCase());
    }
    this.context = context;
    setIncludeCancelButton(false);
}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:12,代码来源:DataUsageDialog.java

示例5: DataUsageListRenderer

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
public DataUsageListRenderer(ProcessContext context) {
    this.context = context;
    setOpaque(true);
    setHorizontalAlignment(LEFT);
    setVerticalAlignment(CENTER);
    this.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:8,代码来源:DataUsageListRenderer.java

示例6: itemStateChanged

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
@Override
public void itemStateChanged(ItemEvent e) {
	if (currentView == VIEW.TRANSACTION) {
		if (getSelectedRow() >= 0 && getSelectedColumn() >= 0) {
			JCheckBox checkBox = (JCheckBox) e.getSource();
			boolean permissionActivated = checkBox.isSelected();
			String subject = ((ActivityPermissionTableModel) getModel()).getRowName(getSelectedRow());
			String transaction = getModel().getColumnName(getSelectedColumn());
			try {
				if (permissionActivated) {
					aclModel.addActivityPermission(subject, transaction);
					if (deriveAttributePermissions && aclModel.getContext() instanceof ProcessContext) {
						Map<String, Set<DataUsage>> transactionDataUsage = ((ProcessContext) aclModel.getContext()).getDataUsageFor(transaction);
						for (String object : transactionDataUsage.keySet()) {
							aclModel.addObjectPermission(subject, object, transactionDataUsage.get(object));
						}
					}
				} else {
					aclModel.removeActivityPermission(subject, transaction);
					if (deriveAttributePermissions) {
						deriveObjectPermission(subject);
					}
				}
			} catch (ParameterException ex) {
				ex.printStackTrace();
			}
		}
	}
}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:30,代码来源:PermissionTable.java

示例7: deriveObjectPermission

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
private void deriveObjectPermission(String subject){
	if(!(aclModel.getContext() instanceof ProcessContext))
		return;
	try{
		aclModel.removeObjectPermissions(subject);
		for(String authorizedTransaction: aclModel.getAuthorizedTransactionsForSubject(subject)){
			Map<String, Set<DataUsage>> transactionDataUsage = ((ProcessContext) aclModel.getContext()).getDataUsageFor(authorizedTransaction);
			for(String object: transactionDataUsage.keySet()){
				aclModel.addObjectPermission(subject, object, transactionDataUsage.get(object));
			}
		}
	} catch(ParameterException e){
		e.printStackTrace();
	}
}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:16,代码来源:PermissionTable.java

示例8: TimedNet

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
public TimedNet() {
	super();
	clock = 0.0;
	setAccessControl(new ProcessContext());
}
 
开发者ID:iig-uni-freiburg,项目名称:SEPIA,代码行数:6,代码来源:TimedNet.java

示例9: getProcessContext

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
private static ProcessContext getProcessContext(){
	ProcessContext bla = new ProcessContext("Test Process-Context");
	bla.setACModel(new RBACModel("RBAC"));
	return bla;
}
 
开发者ID:iig-uni-freiburg,项目名称:SEPIA,代码行数:6,代码来源:AllTimedNetTests.java

示例10: showDialog

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
public static void showDialog(Window owner, ProcessContext context) throws Exception {
    DataUsageDialog dialog = new DataUsageDialog(owner, context);
    dialog.setUpGUI();
}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:5,代码来源:DataUsageDialog.java

示例11: DataUsageTable

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
public DataUsageTable(ProcessContext context) {
    super(new DataUsageTableModel(context));
    Validate.notNull(context);
    this.context = context;
    initialize();
}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:7,代码来源:DataUsageTable.java

示例12: createRandomContext

import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext; //导入依赖的package包/类
/**
 * Creates a new context using an RBAC access control model.<br>
 * Users and permissions to execute transactions are randomly assigned to the given roles.<br>
 * Each person is assigned to exactly one role.
 * @param transitions A collection of Petri net transitions.
 * @param originatorCount The number of desired originators.
 * @param roles The roles to use.
 * @return A new randomly generated Context.
 * @throws ParameterException 
 */
public static ConstraintContext createRandomContext(Collection<AbstractTransition<?,?>> transitions, int originatorCount, List<String> roles){
	ProcessContext duContext = ProcessContext.createRandomContext(PNUtils.getLabelSetFromTransitions(transitions, false), originatorCount, roles);
	try {
		return ConstraintContext.newInstance(duContext);
	} catch (Exception e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:iig-uni-freiburg,项目名称:SEPIA,代码行数:19,代码来源:PNProcessUtils.java


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