@Test public void getNameWithMissingTitle() { when(this.uiExtension.getId()).thenReturn("org.phenotips.patientSheet.section.patient-info"); RecordSection s = new UIXRecordSection(this.uiExtension, this.uixManager, this.orderFilter); Assert.assertEquals("Patient info", s.getName()); }
@Override public String getName() { String result = this.extension.getParameters().get(TITLE_LABEL); if (StringUtils.isBlank(result)) { result = StringUtils.capitalize(StringUtils.replaceChars( StringUtils.substringAfterLast(this.extension.getId(), "."), "_-", " ")); } return result; }
UIXRecordSection implements RecordSection { @Override public String getName() { String result = this.extension.getParameters().get(TITLE_LABEL); if (StringUtils.isBlank(result)) { result = StringUtils.capitalize(StringUtils.replaceChars( StringUtils.substringAfterLast(this.extension.getId(), "."), "_-", " ")); } return result; } }
UIXRecordSection implements RecordSection { @Override public String getName() { String result = this.extension.getParameters().get(TITLE_LABEL); if (StringUtils.isBlank(result)) { result = StringUtils.capitalize(StringUtils.replaceChars( StringUtils.substringAfterLast(this.extension.getId(), "."), "_-", " ")); } return result; } UIXRecordSection(UIExtension extension, UIExtensionManager uixManager, UIExtensionFilter orderFilter); }
UIXRecordSection implements RecordSection { @Override public String getName() { String result = this.extension.getParameters().get(TITLE_LABEL); if (StringUtils.isBlank(result)) { result = StringUtils.capitalize(StringUtils.replaceChars( StringUtils.substringAfterLast(this.extension.getId(), "."), "_-", " ")); } return result; } UIXRecordSection(UIExtension extension, UIExtensionManager uixManager, UIExtensionFilter orderFilter); @Override UIExtension getExtension(); @Override String getName(); @Override boolean isEnabled(); @Override void setEnabled(boolean enabled); @Override boolean isExpandedByDefault(); @Override void setExpandedByDefault(boolean expanded); @Override List<RecordElement> getAllElements(); @Override List<RecordElement> getEnabledElements(); @Override void setElements(List<RecordElement> elements); @Override String toString(); }
UIXRecordSection implements RecordSection { @Override public String getName() { String result = this.extension.getParameters().get(TITLE_LABEL); if (StringUtils.isBlank(result)) { result = StringUtils.capitalize(StringUtils.replaceChars( StringUtils.substringAfterLast(this.extension.getId(), "."), "_-", " ")); } return result; } UIXRecordSection(UIExtension extension, UIExtensionManager uixManager, UIExtensionFilter orderFilter); @Override UIExtension getExtension(); @Override String getName(); @Override boolean isEnabled(); @Override void setEnabled(boolean enabled); @Override boolean isExpandedByDefault(); @Override void setExpandedByDefault(boolean expanded); @Override List<RecordElement> getAllElements(); @Override List<RecordElement> getEnabledElements(); @Override void setElements(List<RecordElement> elements); @Override String toString();  }