KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > designer > editor > StartPermissionEditor


1 package com.opensymphony.workflow.designer.editor;
2
3 import com.opensymphony.workflow.designer.InitialActionCell;
4 import com.opensymphony.workflow.designer.ResourceManager;
5 import com.opensymphony.workflow.designer.dialogs.DialogUtils;
6 import com.opensymphony.workflow.loader.*;
7
8 /**
9  * @author jackflit
10  * Date: 2003-11-24
11  */

12 public class StartPermissionEditor extends ConditionEditor
13 {
14
15   public StartPermissionEditor(InitialActionCell cell)
16   {
17     super(cell);
18   }
19
20   protected InitialActionCell getCell()
21   {
22     return (InitialActionCell)cell;
23   }
24
25   protected AbstractDescriptor getParent()
26   {
27     return getCell().getActionDescriptor();
28   }
29
30     protected ConfigConditionDescriptor getConfigDescriptor(ConditionDescriptor cond)
31     {
32         return getModel().getPalette().getPermissionCondition(cond.getName());
33     }
34
35     protected ConfigConditionDescriptor getCondition()
36     {
37         PermissionConditionDescriptor template = (PermissionConditionDescriptor)DialogUtils.getUserSelection(getModel().getPalette().getPermissionConditions(),
38           ResourceManager.getString("permission.select"),
39           ResourceManager.getString("permission.select"), null);
40         if(template!=null)
41           return new PermissionConditionDescriptor(template);
42         return null;
43     }
44 }
45
Popular Tags