1 package de.webman.acl; 2 3 import com.teamkonzept.lib.TKException; 4 import com.teamkonzept.lib.TKVector; 5 import de.webman.acl.db.ActionDBData; 6 7 14 public class Action 15 extends WMObject 16 { 17 18 20 22 25 private String name = null; 26 27 28 30 35 protected Action (ActionDBData data) 36 { 37 super(data); 38 39 this.name = data.getName(); 40 } 41 42 43 45 51 public final ObjectFactory getFactory () 52 throws TKException 53 { 54 return ActionFactory.getInstance(); 55 } 56 57 62 public final String getName () 63 { 64 return name; 65 } 66 67 72 public final void setName (String name) 73 { 74 super.modifyAttribute(this.name, name); 75 this.name = name; 76 } 77 78 84 public final TKVector getEvents () 85 throws TKException 86 { 87 return EventFactory.getInstance().getObjects(super.getAssociations()); 88 } 89 90 96 public final void addEvent (Event event) 97 throws TKException 98 { 99 super.addAssociation(event); 100 } 101 102 108 public final void removeEvent (Event event) 109 throws TKException 110 { 111 super.removeAssociation(event); 112 } 113 114 119 public final void removeEvents () 120 throws TKException 121 { 122 super.removeAssociations(); 123 } 124 125 133 public final boolean hasEvent (Event event) 134 throws TKException 135 { 136 return super.containsAssociation(event); 137 } 138 139 145 public final TKVector getTasks () 146 throws TKException 147 { 148 return TaskFactory.getInstance().getTasks(this); 149 } 150 151 } 152 | Popular Tags |