| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
package org.kuali.rice.kew.rule; |
| 18 |
|
|
| 19 |
|
import org.hibernate.annotations.Fetch; |
| 20 |
|
import org.hibernate.annotations.FetchMode; |
| 21 |
|
import org.hibernate.annotations.GenericGenerator; |
| 22 |
|
import org.hibernate.annotations.Parameter; |
| 23 |
|
import org.kuali.rice.core.util.RiceConstants; |
| 24 |
|
import org.kuali.rice.kew.doctype.bo.DocumentType; |
| 25 |
|
import org.kuali.rice.kew.lookupable.MyColumns; |
| 26 |
|
import org.kuali.rice.kew.routeheader.DocumentContent; |
| 27 |
|
import org.kuali.rice.kew.rule.bo.RuleAttribute; |
| 28 |
|
import org.kuali.rice.kew.rule.bo.RuleTemplate; |
| 29 |
|
import org.kuali.rice.kew.rule.bo.RuleTemplateAttribute; |
| 30 |
|
import org.kuali.rice.kew.rule.service.RuleService; |
| 31 |
|
import org.kuali.rice.kew.rule.xmlrouting.GenericXMLRuleAttribute; |
| 32 |
|
import org.kuali.rice.kew.service.KEWServiceLocator; |
| 33 |
|
import org.kuali.rice.kew.util.CodeTranslator; |
| 34 |
|
import org.kuali.rice.kew.util.KEWConstants; |
| 35 |
|
import org.kuali.rice.kim.bo.impl.GroupImpl; |
| 36 |
|
import org.kuali.rice.kim.bo.impl.PersonImpl; |
| 37 |
|
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; |
| 38 |
|
import org.kuali.rice.kns.web.ui.Field; |
| 39 |
|
import org.kuali.rice.kns.web.ui.Row; |
| 40 |
|
import org.springframework.util.AutoPopulatingList; |
| 41 |
|
|
| 42 |
|
import javax.persistence.*; |
| 43 |
|
import java.sql.Timestamp; |
| 44 |
|
import java.util.*; |
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
@author |
| 51 |
|
|
| 52 |
|
@Entity |
| 53 |
|
@Table(name="KREW_RULE_T") |
| 54 |
|
|
|
|
|
| 0% |
Uncovered Elements: 333 (333) |
Complexity: 123 |
Complexity Density: 0.69 |
|
| 55 |
|
public class RuleBaseValues extends PersistableBusinessObjectBase { |
| 56 |
|
|
| 57 |
|
private static final long serialVersionUID = 6137765574728530156L; |
| 58 |
|
@Id |
| 59 |
|
@GeneratedValue(generator="KREW_RTE_TMPL_S") |
| 60 |
|
@GenericGenerator(name="KREW_RTE_TMPL_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={ |
| 61 |
|
@Parameter(name="sequence_name",value="KREW_RTE_TMPL_S"), |
| 62 |
|
@Parameter(name="value_column",value="id") |
| 63 |
|
}) |
| 64 |
|
@Column(name="RULE_ID") |
| 65 |
|
private Long ruleBaseValuesId; |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
@Column(name="NM") |
| 70 |
|
private String name; |
| 71 |
|
@Column(name="RULE_TMPL_ID", insertable=false, updatable=false) |
| 72 |
|
private Long ruleTemplateId; |
| 73 |
|
@Column(name="PREV_RULE_VER_NBR") |
| 74 |
|
private Long previousVersionId; |
| 75 |
|
@Column(name="ACTV_IND") |
| 76 |
|
private Boolean activeInd; |
| 77 |
|
@Column(name="RULE_BASE_VAL_DESC") |
| 78 |
|
private String description; |
| 79 |
|
@Column(name="DOC_TYP_NM") |
| 80 |
|
private String docTypeName; |
| 81 |
|
@Column(name="DOC_HDR_ID") |
| 82 |
|
private Long routeHeaderId; |
| 83 |
|
@Column(name="FRM_DT") |
| 84 |
|
private Timestamp fromDate; |
| 85 |
|
@Column(name="TO_DT") |
| 86 |
|
private Timestamp toDate; |
| 87 |
|
@Column(name="DACTVN_DT") |
| 88 |
|
private Timestamp deactivationDate; |
| 89 |
|
@Column(name="CUR_IND") |
| 90 |
|
private Boolean currentInd; |
| 91 |
|
@Column(name="RULE_VER_NBR") |
| 92 |
|
private Integer versionNbr; |
| 93 |
|
@Column(name="FRC_ACTN") |
| 94 |
|
private Boolean forceAction; |
| 95 |
|
@Fetch(value = FetchMode.SELECT) |
| 96 |
|
@OneToMany(fetch=FetchType.EAGER,cascade={CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE},mappedBy="ruleBaseValues") |
| 97 |
|
private List<RuleResponsibility> responsibilities; |
| 98 |
|
@Fetch(value = FetchMode.SELECT) |
| 99 |
|
@OneToMany(fetch=FetchType.EAGER,cascade={CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE},mappedBy="ruleBaseValues") |
| 100 |
|
private List<RuleExtension> ruleExtensions; |
| 101 |
|
@ManyToOne(fetch=FetchType.EAGER) |
| 102 |
|
@JoinColumn(name="RULE_TMPL_ID") |
| 103 |
|
private RuleTemplate ruleTemplate; |
| 104 |
|
@OneToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE}) |
| 105 |
|
@JoinColumn(name="RULE_EXPR_ID") |
| 106 |
|
private RuleExpressionDef ruleExpressionDef; |
| 107 |
|
@Transient |
| 108 |
|
private RuleBaseValues previousVersion; |
| 109 |
|
@Column(name="ACTVN_DT") |
| 110 |
|
private Timestamp activationDate; |
| 111 |
|
@Column(name="DLGN_IND") |
| 112 |
|
private Boolean delegateRule = Boolean.FALSE; |
| 113 |
|
|
| 114 |
|
|
| 115 |
|
|
| 116 |
|
|
| 117 |
|
@Column(name="TMPL_RULE_IND") |
| 118 |
|
private Boolean templateRuleInd = Boolean.FALSE; |
| 119 |
|
|
| 120 |
|
|
| 121 |
|
@Transient |
| 122 |
|
private String returnUrl; |
| 123 |
|
@Transient |
| 124 |
|
private String destinationUrl; |
| 125 |
|
@Transient |
| 126 |
|
private MyColumns myColumns; |
| 127 |
|
@Transient |
| 128 |
|
private List<PersonRuleResponsibility> personResponsibilities; |
| 129 |
|
@Transient |
| 130 |
|
private List<GroupRuleResponsibility> groupResponsibilities; |
| 131 |
|
@Transient |
| 132 |
|
private List<RoleRuleResponsibility> roleResponsibilities; |
| 133 |
|
@Transient |
| 134 |
|
private Map<String, String> fieldValues; |
| 135 |
|
@Transient |
| 136 |
|
private String groupReviewerName; |
| 137 |
|
@Transient |
| 138 |
|
private String groupReviewerNamespace; |
| 139 |
|
@Transient |
| 140 |
|
private String personReviewer; |
| 141 |
|
@Transient |
| 142 |
|
private String personReviewerType; |
| 143 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 144 |
0
|
public RuleBaseValues() {... |
| 145 |
0
|
responsibilities = new ArrayList<RuleResponsibility>(); |
| 146 |
0
|
ruleExtensions = new ArrayList<RuleExtension>(); |
| 147 |
0
|
personResponsibilities = new AutoPopulatingList(PersonRuleResponsibility.class); |
| 148 |
0
|
groupResponsibilities = new AutoPopulatingList(GroupRuleResponsibility.class); |
| 149 |
0
|
roleResponsibilities = new AutoPopulatingList(RoleRuleResponsibility.class); |
| 150 |
0
|
fieldValues = new HashMap<String, String>(); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
|
| 154 |
|
@return |
| 155 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 156 |
0
|
public RuleExpressionDef getRuleExpressionDef() {... |
| 157 |
0
|
return ruleExpressionDef; |
| 158 |
|
} |
| 159 |
|
|
| 160 |
|
|
| 161 |
|
@param |
| 162 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 163 |
0
|
public void setRuleExpressionDef(RuleExpressionDef ruleExpressionDef) {... |
| 164 |
0
|
this.ruleExpressionDef = ruleExpressionDef; |
| 165 |
|
} |
| 166 |
|
|
|
|
|
| 0% |
Uncovered Elements: 29 (29) |
Complexity: 7 |
Complexity Density: 0.41 |
|
| 167 |
0
|
public Map getRuleExtensionValueLabels() {... |
| 168 |
0
|
Map extensionLabels = new HashMap(); |
| 169 |
0
|
for (Iterator iterator2 = getRuleExtensions().iterator(); iterator2.hasNext();) { |
| 170 |
0
|
RuleExtension ruleExtension = (RuleExtension) iterator2.next(); |
| 171 |
0
|
if (!ruleExtension.getRuleTemplateAttribute().isWorkflowAttribute()) { |
| 172 |
0
|
continue; |
| 173 |
|
} |
| 174 |
0
|
WorkflowAttribute workflowAttribute = ruleExtension.getRuleTemplateAttribute().getWorkflowAttribute(); |
| 175 |
|
|
| 176 |
0
|
RuleAttribute ruleAttribute = ruleExtension.getRuleTemplateAttribute().getRuleAttribute(); |
| 177 |
0
|
if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) { |
| 178 |
0
|
((GenericXMLRuleAttribute) workflowAttribute).setRuleAttribute(ruleAttribute); |
| 179 |
|
} |
| 180 |
0
|
for (Iterator iterator = workflowAttribute.getRuleRows().iterator(); iterator.hasNext();) { |
| 181 |
0
|
Row row = (Row) iterator.next(); |
| 182 |
0
|
for (Iterator iterator3 = row.getFields().iterator(); iterator3.hasNext();) { |
| 183 |
0
|
Field field = (Field) iterator3.next(); |
| 184 |
0
|
if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) { |
| 185 |
0
|
extensionLabels.put(field.getPropertyName(), field.getFieldLabel()); |
| 186 |
|
|
| 187 |
|
|
| 188 |
|
} else { |
| 189 |
0
|
extensionLabels.put(field.getPropertyName(), field.getFieldLabel()); |
| 190 |
|
} |
| 191 |
|
} |
| 192 |
|
} |
| 193 |
|
} |
| 194 |
0
|
return extensionLabels; |
| 195 |
|
} |
| 196 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 197 |
0
|
public String getRuleTemplateName() {... |
| 198 |
0
|
if (ruleTemplate != null) { |
| 199 |
0
|
return ruleTemplate.getName(); |
| 200 |
|
} |
| 201 |
0
|
return null; |
| 202 |
|
} |
| 203 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 204 |
0
|
public RuleBaseValues getPreviousVersion() {... |
| 205 |
0
|
if (previousVersion == null && previousVersionId != null) { |
| 206 |
0
|
RuleService ruleService = (RuleService) KEWServiceLocator.getService(KEWServiceLocator.RULE_SERVICE); |
| 207 |
0
|
return ruleService.findRuleBaseValuesById(previousVersionId); |
| 208 |
|
} |
| 209 |
0
|
return previousVersion; |
| 210 |
|
} |
| 211 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 212 |
0
|
public void setPreviousVersion(RuleBaseValues previousVersion) {... |
| 213 |
0
|
this.previousVersion = previousVersion; |
| 214 |
|
} |
| 215 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
| 216 |
0
|
public RuleResponsibility getResponsibility(int index) {... |
| 217 |
0
|
while (getResponsibilities().size() <= index) { |
| 218 |
0
|
RuleResponsibility ruleResponsibility = new RuleResponsibility(); |
| 219 |
0
|
ruleResponsibility.setRuleBaseValues(this); |
| 220 |
0
|
getResponsibilities().add(ruleResponsibility); |
| 221 |
|
} |
| 222 |
0
|
return (RuleResponsibility) getResponsibilities().get(index); |
| 223 |
|
} |
| 224 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 225 |
0
|
public RuleExtension getRuleExtension(int index) {... |
| 226 |
0
|
while (getRuleExtensions().size() <= index) { |
| 227 |
0
|
getRuleExtensions().add(new RuleExtension()); |
| 228 |
|
} |
| 229 |
0
|
return (RuleExtension) getRuleExtensions().get(index); |
| 230 |
|
} |
| 231 |
|
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 4 |
Complexity Density: 0.57 |
|
| 232 |
0
|
public RuleExtensionValue getRuleExtensionValue(String key) {... |
| 233 |
0
|
for (Iterator iter = getRuleExtensions().iterator(); iter.hasNext();) { |
| 234 |
0
|
RuleExtension ruleExtension = (RuleExtension) iter.next(); |
| 235 |
0
|
for (Iterator iterator = ruleExtension.getExtensionValues().iterator(); iterator.hasNext();) { |
| 236 |
0
|
RuleExtensionValue ruleExtensionValue = (RuleExtensionValue) iterator.next(); |
| 237 |
0
|
if (ruleExtensionValue.getKey().equals(key)) { |
| 238 |
0
|
return ruleExtensionValue; |
| 239 |
|
} |
| 240 |
|
} |
| 241 |
|
} |
| 242 |
0
|
return null; |
| 243 |
|
} |
| 244 |
|
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 5 |
Complexity Density: 0.62 |
|
| 245 |
0
|
public RuleExtensionValue getRuleExtensionValue(Long ruleTemplateAttributeId, String key) {... |
| 246 |
0
|
for (Iterator iter = getRuleExtensions().iterator(); iter.hasNext();) { |
| 247 |
0
|
RuleExtension ruleExtension = (RuleExtension) iter.next(); |
| 248 |
0
|
if (ruleExtension.getRuleTemplateAttributeId().equals(ruleTemplateAttributeId)) { |
| 249 |
0
|
for (Iterator iterator = ruleExtension.getExtensionValues().iterator(); iterator.hasNext();) { |
| 250 |
0
|
RuleExtensionValue ruleExtensionValue = (RuleExtensionValue) iterator.next(); |
| 251 |
0
|
if (ruleExtensionValue.getKey().equals(key)) { |
| 252 |
0
|
return ruleExtensionValue; |
| 253 |
|
} |
| 254 |
|
} |
| 255 |
|
} |
| 256 |
|
} |
| 257 |
0
|
return null; |
| 258 |
|
} |
| 259 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 260 |
0
|
public Long getPreviousVersionId() {... |
| 261 |
0
|
return previousVersionId; |
| 262 |
|
} |
| 263 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 264 |
0
|
public void setPreviousVersionId(Long previousVersion) {... |
| 265 |
0
|
this.previousVersionId = previousVersion; |
| 266 |
|
} |
| 267 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 268 |
0
|
public void addRuleResponsibility(RuleResponsibility ruleResponsibility) {... |
| 269 |
0
|
addRuleResponsibility(ruleResponsibility, new Integer(getResponsibilities().size())); |
| 270 |
|
} |
| 271 |
|
|
|
|
|
| 0% |
Uncovered Elements: 25 (25) |
Complexity: 5 |
Complexity Density: 0.29 |
|
| 272 |
0
|
public void addRuleResponsibility(RuleResponsibility ruleResponsibility, Integer counter) {... |
| 273 |
0
|
boolean alreadyAdded = false; |
| 274 |
0
|
int location = 0; |
| 275 |
0
|
if (counter != null) { |
| 276 |
0
|
for (Iterator responsibilitiesIter = getResponsibilities().iterator(); responsibilitiesIter.hasNext();) { |
| 277 |
0
|
RuleResponsibility ruleResponsibilityRow = (RuleResponsibility) responsibilitiesIter.next(); |
| 278 |
0
|
if (counter.intValue() == location) { |
| 279 |
0
|
ruleResponsibilityRow.setPriority(ruleResponsibility.getPriority()); |
| 280 |
0
|
ruleResponsibilityRow.setActionRequestedCd(ruleResponsibility.getActionRequestedCd()); |
| 281 |
0
|
ruleResponsibilityRow.setVersionNumber(ruleResponsibility.getVersionNumber()); |
| 282 |
0
|
ruleResponsibilityRow.setRuleBaseValuesId(ruleResponsibility.getRuleBaseValuesId()); |
| 283 |
0
|
ruleResponsibilityRow.setRuleResponsibilityName(ruleResponsibility.getRuleResponsibilityName()); |
| 284 |
0
|
ruleResponsibilityRow.setRuleResponsibilityType(ruleResponsibility.getRuleResponsibilityType()); |
| 285 |
|
|
| 286 |
0
|
ruleResponsibilityRow.setApprovePolicy(ruleResponsibility.getApprovePolicy()); |
| 287 |
0
|
alreadyAdded = true; |
| 288 |
|
} |
| 289 |
0
|
location++; |
| 290 |
|
} |
| 291 |
|
} |
| 292 |
0
|
if (!alreadyAdded) { |
| 293 |
0
|
getResponsibilities().add(ruleResponsibility); |
| 294 |
|
} |
| 295 |
|
} |
| 296 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 297 |
0
|
public RuleTemplate getRuleTemplate() {... |
| 298 |
0
|
return ruleTemplate; |
| 299 |
|
} |
| 300 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 301 |
0
|
public void setRuleTemplate(RuleTemplate ruleTemplate) {... |
| 302 |
0
|
this.ruleTemplate = ruleTemplate; |
| 303 |
|
} |
| 304 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 305 |
0
|
public Long getRuleTemplateId() {... |
| 306 |
0
|
return ruleTemplateId; |
| 307 |
|
} |
| 308 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 309 |
0
|
public void setRuleTemplateId(Long ruleTemplateId) {... |
| 310 |
0
|
this.ruleTemplateId = ruleTemplateId; |
| 311 |
|
} |
| 312 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 313 |
0
|
public DocumentType getDocumentType() {... |
| 314 |
0
|
return KEWServiceLocator.getDocumentTypeService().findByName(getDocTypeName()); |
| 315 |
|
} |
| 316 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 317 |
0
|
public String getDocTypeName() {... |
| 318 |
0
|
return docTypeName; |
| 319 |
|
} |
| 320 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 321 |
0
|
public void setDocTypeName(String docTypeName) {... |
| 322 |
0
|
this.docTypeName = docTypeName; |
| 323 |
|
} |
| 324 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 325 |
0
|
public List<RuleExtension> getRuleExtensions() {... |
| 326 |
0
|
return ruleExtensions; |
| 327 |
|
} |
| 328 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 329 |
0
|
public void setRuleExtensions(List<RuleExtension> ruleExtensions) {... |
| 330 |
0
|
this.ruleExtensions = ruleExtensions; |
| 331 |
|
} |
| 332 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 333 |
0
|
public List<RuleResponsibility> getResponsibilities() {... |
| 334 |
0
|
return responsibilities; |
| 335 |
|
} |
| 336 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 337 |
0
|
public void setResponsibilities(List<RuleResponsibility> responsibilities) {... |
| 338 |
0
|
this.responsibilities = responsibilities; |
| 339 |
|
} |
| 340 |
|
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 4 |
Complexity Density: 0.8 |
|
| 341 |
0
|
public RuleResponsibility getResponsibility(Long ruleResponsibilityKey) {... |
| 342 |
0
|
for (Iterator iterator = getResponsibilities().iterator(); iterator.hasNext();) { |
| 343 |
0
|
RuleResponsibility responsibility = (RuleResponsibility) iterator.next(); |
| 344 |
0
|
if (responsibility.getRuleResponsibilityKey() != null |
| 345 |
|
&& responsibility.getRuleResponsibilityKey().equals(ruleResponsibilityKey)) { |
| 346 |
0
|
return responsibility; |
| 347 |
|
} |
| 348 |
|
} |
| 349 |
0
|
return null; |
| 350 |
|
} |
| 351 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 352 |
0
|
public void removeResponsibility(int index) {... |
| 353 |
0
|
getResponsibilities().remove(index); |
| 354 |
|
} |
| 355 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 356 |
0
|
public Boolean getActiveInd() {... |
| 357 |
0
|
return activeInd; |
| 358 |
|
} |
| 359 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 360 |
0
|
public void setActiveInd(Boolean activeInd) {... |
| 361 |
0
|
this.activeInd = activeInd; |
| 362 |
|
} |
| 363 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 364 |
0
|
public String getActiveIndDisplay() {... |
| 365 |
0
|
if (getActiveInd() == null) { |
| 366 |
0
|
return KEWConstants.INACTIVE_LABEL_LOWER; |
| 367 |
|
} |
| 368 |
0
|
return CodeTranslator.getActiveIndicatorLabel(getActiveInd()); |
| 369 |
|
} |
| 370 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 371 |
0
|
public Boolean getCurrentInd() {... |
| 372 |
0
|
return currentInd; |
| 373 |
|
} |
| 374 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 375 |
0
|
public void setCurrentInd(Boolean currentInd) {... |
| 376 |
0
|
this.currentInd = currentInd; |
| 377 |
|
} |
| 378 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 379 |
0
|
public Timestamp getFromDate() {... |
| 380 |
0
|
return fromDate; |
| 381 |
|
} |
| 382 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 383 |
0
|
public void setFromDate(Timestamp fromDate) {... |
| 384 |
0
|
this.fromDate = fromDate; |
| 385 |
|
} |
| 386 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 387 |
0
|
public String getDescription() {... |
| 388 |
0
|
return description; |
| 389 |
|
} |
| 390 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 391 |
0
|
public void setDescription(String description) {... |
| 392 |
0
|
this.description = description; |
| 393 |
|
} |
| 394 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 395 |
0
|
public Long getRuleBaseValuesId() {... |
| 396 |
0
|
return ruleBaseValuesId; |
| 397 |
|
} |
| 398 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 399 |
0
|
public void setRuleBaseValuesId(Long ruleBaseValuesId) {... |
| 400 |
0
|
this.ruleBaseValuesId = ruleBaseValuesId; |
| 401 |
|
} |
| 402 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 403 |
0
|
public Timestamp getToDate() {... |
| 404 |
0
|
return toDate; |
| 405 |
|
} |
| 406 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 407 |
0
|
public void setToDate(Timestamp toDate) {... |
| 408 |
0
|
this.toDate = toDate; |
| 409 |
|
} |
| 410 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 411 |
0
|
public Integer getVersionNbr() {... |
| 412 |
0
|
return versionNbr; |
| 413 |
|
} |
| 414 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 415 |
0
|
public void setVersionNbr(Integer versionNbr) {... |
| 416 |
0
|
this.versionNbr = versionNbr; |
| 417 |
|
} |
| 418 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 419 |
0
|
public String getReturnUrl() {... |
| 420 |
0
|
return returnUrl; |
| 421 |
|
} |
| 422 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 423 |
0
|
public void setReturnUrl(String returnUrl) {... |
| 424 |
0
|
this.returnUrl = returnUrl; |
| 425 |
|
} |
| 426 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 427 |
0
|
public String getFromDateString() {... |
| 428 |
0
|
if (this.fromDate != null) { |
| 429 |
0
|
return RiceConstants.getDefaultDateFormat().format(this.fromDate); |
| 430 |
|
} |
| 431 |
0
|
return null; |
| 432 |
|
} |
| 433 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 434 |
0
|
public String getToDateString() {... |
| 435 |
0
|
if (this.toDate != null) { |
| 436 |
0
|
return RiceConstants.getDefaultDateFormat().format(this.toDate); |
| 437 |
|
} |
| 438 |
0
|
return null; |
| 439 |
|
} |
| 440 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 441 |
0
|
public Boolean getForceAction() {... |
| 442 |
0
|
return forceAction; |
| 443 |
|
} |
| 444 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 445 |
0
|
public void setForceAction(Boolean forceAction) {... |
| 446 |
0
|
this.forceAction = forceAction; |
| 447 |
|
} |
| 448 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 449 |
0
|
public boolean isActive(Date date) {... |
| 450 |
0
|
boolean isAfterFromDate = getFromDate() == null || date.after(getFromDate()); |
| 451 |
0
|
boolean isBeforeToDate = getToDate() == null || date.before(getToDate()); |
| 452 |
0
|
return getActiveInd() && isAfterFromDate && isBeforeToDate; |
| 453 |
|
} |
| 454 |
|
|
|
|
|
| 0% |
Uncovered Elements: 29 (29) |
Complexity: 7 |
Complexity Density: 0.41 |
|
| 455 |
0
|
public boolean isMatch(DocumentContent docContent) {... |
| 456 |
0
|
for (Iterator iter = getRuleTemplate().getActiveRuleTemplateAttributes().iterator(); iter.hasNext();) { |
| 457 |
0
|
RuleTemplateAttribute ruleTemplateAttribute = (RuleTemplateAttribute) iter.next(); |
| 458 |
0
|
if (!ruleTemplateAttribute.isWorkflowAttribute()) { |
| 459 |
0
|
continue; |
| 460 |
|
} |
| 461 |
0
|
WorkflowAttribute routingAttribute = (WorkflowAttribute) ruleTemplateAttribute.getWorkflowAttribute(); |
| 462 |
|
|
| 463 |
0
|
RuleAttribute ruleAttribute = ruleTemplateAttribute.getRuleAttribute(); |
| 464 |
0
|
if (ruleAttribute.getType().equals(KEWConstants.RULE_XML_ATTRIBUTE_TYPE)) { |
| 465 |
0
|
((GenericXMLRuleAttribute) routingAttribute).setRuleAttribute(ruleAttribute); |
| 466 |
|
} |
| 467 |
0
|
String className = ruleAttribute.getClassName(); |
| 468 |
0
|
List<RuleExtension> editedRuleExtensions = new ArrayList<RuleExtension>(); |
| 469 |
0
|
for (Iterator iter2 = getRuleExtensions().iterator(); iter2.hasNext();) { |
| 470 |
0
|
RuleExtension extension = (RuleExtension) iter2.next(); |
| 471 |
0
|
if (extension.getRuleTemplateAttribute().getRuleAttribute().getClassName().equals(className)) { |
| 472 |
0
|
editedRuleExtensions.add(extension); |
| 473 |
|
} |
| 474 |
|
} |
| 475 |
0
|
if (!routingAttribute.isMatch(docContent, editedRuleExtensions)) { |
| 476 |
0
|
return false; |
| 477 |
|
} |
| 478 |
|
} |
| 479 |
0
|
return true; |
| 480 |
|
} |
| 481 |
|
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 4 |
Complexity Density: 0.8 |
|
| 482 |
0
|
public RuleResponsibility findResponsibility(String roleName) {... |
| 483 |
0
|
for (Iterator iter = getResponsibilities().iterator(); iter.hasNext();) { |
| 484 |
0
|
RuleResponsibility resp = (RuleResponsibility) iter.next(); |
| 485 |
0
|
if (KEWConstants.RULE_RESPONSIBILITY_ROLE_ID.equals(resp.getRuleResponsibilityType()) |
| 486 |
|
&& roleName.equals(resp.getRuleResponsibilityName())) { |
| 487 |
0
|
return resp; |
| 488 |
|
} |
| 489 |
|
} |
| 490 |
0
|
return null; |
| 491 |
|
} |
| 492 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 493 |
0
|
public Long getRouteHeaderId() {... |
| 494 |
0
|
return routeHeaderId; |
| 495 |
|
} |
| 496 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 497 |
0
|
public void setRouteHeaderId(Long routeHeaderId) {... |
| 498 |
0
|
this.routeHeaderId = routeHeaderId; |
| 499 |
|
} |
| 500 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 501 |
0
|
public Boolean getDelegateRule() {... |
| 502 |
0
|
return delegateRule; |
| 503 |
|
} |
| 504 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 505 |
0
|
public void setDelegateRule(Boolean isDelegateRule) {... |
| 506 |
0
|
this.delegateRule = isDelegateRule; |
| 507 |
|
} |
| 508 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 509 |
0
|
public Timestamp getActivationDate() {... |
| 510 |
0
|
return activationDate; |
| 511 |
|
} |
| 512 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 513 |
0
|
public void setActivationDate(Timestamp activationDate) {... |
| 514 |
0
|
this.activationDate = activationDate; |
| 515 |
|
} |
| 516 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 517 |
0
|
public MyColumns getMyColumns() {... |
| 518 |
0
|
return myColumns; |
| 519 |
|
} |
| 520 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 521 |
0
|
public void setMyColumns(MyColumns additionalColumns) {... |
| 522 |
0
|
this.myColumns = additionalColumns; |
| 523 |
|
} |
| 524 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 525 |
0
|
public String getDestinationUrl() {... |
| 526 |
0
|
return destinationUrl; |
| 527 |
|
} |
| 528 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 529 |
0
|
public void setDestinationUrl(String destinationUrl) {... |
| 530 |
0
|
this.destinationUrl = destinationUrl; |
| 531 |
|
} |
| 532 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 533 |
0
|
public Timestamp getDeactivationDate() {... |
| 534 |
0
|
return deactivationDate; |
| 535 |
|
} |
| 536 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 537 |
0
|
public void setDeactivationDate(Timestamp deactivationDate) {... |
| 538 |
0
|
this.deactivationDate = deactivationDate; |
| 539 |
|
} |
| 540 |
|
|
| 541 |
|
|
| 542 |
|
@return |
| 543 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 544 |
0
|
public Boolean getTemplateRuleInd() {... |
| 545 |
0
|
return templateRuleInd; |
| 546 |
|
} |
| 547 |
|
|
| 548 |
|
|
| 549 |
|
@param |
| 550 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 551 |
0
|
public void setTemplateRuleInd(Boolean templateRuleInd) {... |
| 552 |
0
|
this.templateRuleInd = templateRuleInd; |
| 553 |
|
} |
| 554 |
|
|
| 555 |
|
|
| 556 |
|
|
| 557 |
|
@return |
| 558 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 559 |
0
|
public String getName() {... |
| 560 |
0
|
return name; |
| 561 |
|
} |
| 562 |
|
|
| 563 |
|
|
| 564 |
|
|
| 565 |
|
@param |
| 566 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 567 |
0
|
public void setName(String name) {... |
| 568 |
0
|
this.name = name; |
| 569 |
|
} |
| 570 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 571 |
0
|
public List<PersonRuleResponsibility> getPersonResponsibilities() {... |
| 572 |
0
|
return this.personResponsibilities; |
| 573 |
|
} |
| 574 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 575 |
0
|
public void setPersonResponsibilities(List<PersonRuleResponsibility> personResponsibilities) {... |
| 576 |
0
|
this.personResponsibilities = personResponsibilities; |
| 577 |
|
} |
| 578 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 579 |
0
|
public List<GroupRuleResponsibility> getGroupResponsibilities() {... |
| 580 |
0
|
return this.groupResponsibilities; |
| 581 |
|
} |
| 582 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 583 |
0
|
public void setGroupResponsibilities(List<GroupRuleResponsibility> groupResponsibilities) {... |
| 584 |
0
|
this.groupResponsibilities = groupResponsibilities; |
| 585 |
|
} |
| 586 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 587 |
0
|
public List<RoleRuleResponsibility> getRoleResponsibilities() {... |
| 588 |
0
|
return this.roleResponsibilities; |
| 589 |
|
} |
| 590 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 591 |
0
|
public void setRoleResponsibilities(List<RoleRuleResponsibility> roleResponsibilities) {... |
| 592 |
0
|
this.roleResponsibilities = roleResponsibilities; |
| 593 |
|
} |
| 594 |
|
|
| 595 |
|
|
| 596 |
|
@return |
| 597 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 598 |
0
|
public Map<String, String> getFieldValues() {... |
| 599 |
0
|
return this.fieldValues; |
| 600 |
|
} |
| 601 |
|
|
| 602 |
|
|
| 603 |
|
@param |
| 604 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 605 |
0
|
public void setFieldValues(Map<String, String> fieldValues) {... |
| 606 |
0
|
this.fieldValues = fieldValues; |
| 607 |
|
} |
| 608 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 609 |
0
|
public String getGroupReviewerName() {... |
| 610 |
0
|
return this.groupReviewerName; |
| 611 |
|
} |
| 612 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 613 |
0
|
public String getGroupReviewerNamespace() {... |
| 614 |
0
|
return this.groupReviewerNamespace; |
| 615 |
|
} |
| 616 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 617 |
0
|
public String getPersonReviewer() {... |
| 618 |
0
|
return this.personReviewer; |
| 619 |
|
} |
| 620 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 621 |
0
|
public void setGroupReviewerName(String groupReviewerName) {... |
| 622 |
0
|
this.groupReviewerName = groupReviewerName; |
| 623 |
|
} |
| 624 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 625 |
0
|
public void setGroupReviewerNamespace(String groupReviewerNamespace) {... |
| 626 |
0
|
this.groupReviewerNamespace = groupReviewerNamespace; |
| 627 |
|
} |
| 628 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 629 |
0
|
public void setPersonReviewer(String personReviewer) {... |
| 630 |
0
|
this.personReviewer = personReviewer; |
| 631 |
|
} |
| 632 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 633 |
0
|
public GroupImpl getKimGroupImpl() {... |
| 634 |
0
|
return new GroupImpl(); |
| 635 |
|
} |
| 636 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 637 |
0
|
public PersonImpl getPersonImpl() {... |
| 638 |
0
|
return new PersonImpl(); |
| 639 |
|
} |
| 640 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 641 |
0
|
public String getPersonReviewerType() {... |
| 642 |
0
|
return this.personReviewerType; |
| 643 |
|
} |
| 644 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 645 |
0
|
public void setPersonReviewerType(String personReviewerType) {... |
| 646 |
0
|
this.personReviewerType = personReviewerType; |
| 647 |
|
} |
| 648 |
|
} |