1 17 package org.alfresco.repo.action; 18 19 import java.io.Serializable ; 20 import java.util.ArrayList ; 21 import java.util.Date ; 22 import java.util.List ; 23 import java.util.Map ; 24 import java.util.Set ; 25 26 import org.alfresco.service.cmr.action.Action; 27 import org.alfresco.service.cmr.action.ActionCondition; 28 import org.alfresco.service.cmr.repository.NodeRef; 29 30 35 public class ActionImpl extends ParameterizedItemImpl 36 implements Serializable , Action 37 { 38 41 private static final long serialVersionUID = 3258135760426186548L; 42 43 46 private String title; 47 48 51 private String description; 52 53 56 private boolean executeAsynchronously = false; 57 58 61 private Action compensatingAction; 62 63 66 private Date createdDate; 67 68 71 private String creator; 72 73 76 private Date modifiedDate; 77 78 81 private String modifier; 82 83 86 private String actionDefinitionName; 87 88 91 private String runAsUserName; 92 93 96 private NodeRef owningNodeRef; 97 98 101 private Set <String > actionChain; 102 103 106 private List <ActionCondition> actionConditions = new ArrayList <ActionCondition>(); 107 108 114 public ActionImpl(String id, String actionDefinitionName, NodeRef owningNodeRef) 115 { 116 this(id, actionDefinitionName, owningNodeRef, null); 117 } 118 119 126 public ActionImpl( 127 String id, 128 String actionDefinitionName, 129 NodeRef owningNodeRef, 130 Map <String , Serializable > parameterValues) 131 { 132 super(id, parameterValues); 133 this.actionDefinitionName = actionDefinitionName; 134 this.owningNodeRef = owningNodeRef; 135 } 136 137 140 public String getTitle() 141 { 142 return this.title; 143 } 144 145 148 public void setTitle(String title) 149 { 150 this.title = title; 151 } 152 153 156 public String getDescription() 157 { 158 return this.description; 159 } 160 161 164 public void setDescription(String description) 165 { 166 this.description = description; 167 } 168 169 172 public NodeRef getOwningNodeRef() 173 { 174 return this.owningNodeRef; 175 } 176 177 public void setOwningNodeRef(NodeRef owningNodeRef) 178 { 179 this.owningNodeRef = owningNodeRef; 180 } 181 182 185 public boolean getExecuteAsychronously() 186 { 187 return this.executeAsynchronously ; 188 } 189 190 193 public void setExecuteAsynchronously(boolean executeAsynchronously) 194 { 195 this.executeAsynchronously = executeAsynchronously; 196 } 197 198 201 public Action getCompensatingAction() 202 { 203 return this.compensatingAction; 204 } 205 206 209 public void setCompensatingAction(Action action) 210 { 211 this.compensatingAction = action; 212 } 213 214 217 public Date getCreatedDate() 218 { 219 return this.createdDate; 220 } 221 222 227 public void setCreatedDate(Date createdDate) 228 { 229 this.createdDate = createdDate; 230 } 231 232 235 public String getCreator() 236 { 237 return this.creator; 238 } 239 240 245 public void setCreator(String creator) 246 { 247 this.creator = creator; 248 } 249 250 253 public Date getModifiedDate() 254 { 255 return this.modifiedDate; 256 } 257 258 263 public void setModifiedDate(Date modifiedDate) 264 { 265 this.modifiedDate = modifiedDate; 266 } 267 268 271 public String getModifier() 272 { 273 return this.modifier; 274 } 275 276 281 public void setModifier(String modifier) 282 { 283 this.modifier = modifier; 284 } 285 286 289 public String getActionDefinitionName() 290 { 291 return this.actionDefinitionName; 292 } 293 294 297 public boolean hasActionConditions() 298 { 299 return (this.actionConditions.isEmpty() == false); 300 } 301 302 305 public int indexOfActionCondition(ActionCondition actionCondition) 306 { 307 return this.actionConditions.indexOf(actionCondition); 308 } 309 310 313 public List <ActionCondition> getActionConditions() 314 { 315 return this.actionConditions; 316 } 317 318 321 public ActionCondition getActionCondition(int index) 322 { 323 return this.actionConditions.get(index); 324 } 325 326 329 public void addActionCondition(ActionCondition actionCondition) 330 { 331 this.actionConditions.add(actionCondition); 332 } 333 334 337 public void addActionCondition(int index, ActionCondition actionCondition) 338 { 339 this.actionConditions.add(index, actionCondition); 340 } 341 342 345 public void setActionCondition(int index, ActionCondition actionCondition) 346 { 347 this.actionConditions.set(index, actionCondition); 348 } 349 350 353 public void removeActionCondition(ActionCondition actionCondition) 354 { 355 this.actionConditions.remove(actionCondition); 356 } 357 358 361 public void removeAllActionConditions() 362 { 363 this.actionConditions.clear(); 364 } 365 366 371 public void setActionChain(Set <String > actionChain) 372 { 373 this.actionChain = actionChain; 374 } 375 376 381 public Set <String > getActionChain() 382 { 383 return actionChain; 384 } 385 386 public String getRunAsUser() 387 { 388 return this.runAsUserName; 389 } 390 391 public void setRunAsUser(String runAsUserName) 392 { 393 this.runAsUserName = runAsUserName; 394 } 395 } 396 | Popular Tags |