1 24 25 package org.infoglue.cms.entities.mydesktop; 26 27 import java.util.Map ; 28 29 import org.infoglue.cms.entities.kernel.BaseEntityVO; 30 import org.infoglue.cms.util.ConstraintExceptionBuffer; 31 32 37 38 public class WorkflowActionVO implements BaseEntityVO 39 { 40 private static final long serialVersionUID = 1L; 41 42 private Integer id; 43 private Long workflowId; 44 private WorkflowStepVO step; 45 private String name; 46 private String view; 47 private boolean autoExecute; 48 private Map metaAttributes; 49 50 public WorkflowActionVO() {} 51 52 public WorkflowActionVO(Integer id) 53 { 54 setId(id); 55 } 56 57 public WorkflowActionVO(Integer id, Long workflowId, String name) 58 { 59 this(id); 60 setWorkflowId(workflowId); 61 setName(name); 62 } 63 64 public Integer getId() 65 { 66 return this.id; 67 } 68 69 public void setId(Integer id) 70 { 71 this.id = id; 72 } 73 74 public int getIdAsPrimitive() 75 { 76 return (id == null) ? 0 : id.intValue(); 77 } 78 79 public Long getWorkflowId() 80 { 81 return workflowId; 82 } 83 84 public void setWorkflowId(Long workflowId) 85 { 86 this.workflowId = workflowId; 87 } 88 89 public WorkflowStepVO getStep() 90 { 91 return step; 92 } 93 94 public void setStep(WorkflowStepVO step) 95 { 96 this.step = step; 97 } 98 99 103 public String getStepName() 104 { 105 return (step == null) ? null : step.getName(); 106 } 107 108 112 public String getStepOwner() 113 { 114 return (step == null) ? null : step.getOwner(); 115 } 116 117 public String getName() 118 { 119 return name; 120 } 121 122 public void setName(String name) 123 { 124 this.name = name; 125 } 126 127 public String getView() 128 { 129 return view; 130 } 131 132 public void setView(String view) 133 { 134 this.view = view; 135 } 136 137 public boolean isAutoExecute() 138 { 139 return autoExecute; 140 } 141 142 public void setAutoExecute(boolean autoExecute) 143 { 144 this.autoExecute = autoExecute; 145 } 146 147 public Map getMetaAttributes() 148 { 149 return metaAttributes; 150 } 151 152 public void setMetaAttributes(Map metaAttributes) 153 { 154 this.metaAttributes = metaAttributes; 155 } 156 157 public ConstraintExceptionBuffer validate() 158 { 159 return new ConstraintExceptionBuffer(); 160 } 161 162 public boolean hasView() 163 { 164 return view != null && view.length() > 0; 165 } 166 167 public String toString() 168 { 169 return new StringBuffer (getClass().getName()) 170 .append(" id=").append(id) 171 .append(" name=").append(name) 172 .append(" step=").append(getStepName()) 173 .append(" view=").append(view) 174 .append(" workflowId=").append(workflowId).toString(); 175 } 176 } 177 | Popular Tags |