@Test public void getDefaultVisibilityChecksPatientTemplate() throws ComponentLookupException { when(this.dab.getProperty(new ObjectPropertyReference("visibility", new BaseObjectReference(this.visibilityClassReference, 0, this.patientTemplateReference)))) .thenReturn("public"); Assert.assertEquals("public", this.mocker.getComponentUnderTest().getDefaultVisibility()); }
@Override public String getDefaultVisibility() { DocumentReference preferencesDocument = this.resolver.resolve(TEMPLATE_DOCUMENT); DocumentReference configurationClassDocument = this.resolver.resolve(Visibility.CLASS_REFERENCE); String visibilityName = (String) this.dab.getProperty(new ObjectPropertyReference("visibility", new BaseObjectReference(configurationClassDocument, 0, preferencesDocument))); return StringUtils.defaultIfBlank(visibilityName, null); }
DefaultPermissionsConfiguration implements PermissionsConfiguration { @Override public String getDefaultVisibility() { DocumentReference preferencesDocument = this.resolver.resolve(TEMPLATE_DOCUMENT); DocumentReference configurationClassDocument = this.resolver.resolve(Visibility.CLASS_REFERENCE); String visibilityName = (String) this.dab.getProperty(new ObjectPropertyReference("visibility", new BaseObjectReference(configurationClassDocument, 0, preferencesDocument))); return StringUtils.defaultIfBlank(visibilityName, null); } }
DefaultPermissionsConfiguration implements PermissionsConfiguration { @Override public String getDefaultVisibility() { DocumentReference preferencesDocument = this.resolver.resolve(TEMPLATE_DOCUMENT); DocumentReference configurationClassDocument = this.resolver.resolve(Visibility.CLASS_REFERENCE); String visibilityName = (String) this.dab.getProperty(new ObjectPropertyReference("visibility", new BaseObjectReference(configurationClassDocument, 0, preferencesDocument))); return StringUtils.defaultIfBlank(visibilityName, null); }  }
DefaultPermissionsConfiguration implements PermissionsConfiguration { @Override public String getDefaultVisibility() { DocumentReference preferencesDocument = this.resolver.resolve(TEMPLATE_DOCUMENT); DocumentReference configurationClassDocument = this.resolver.resolve(Visibility.CLASS_REFERENCE); String visibilityName = (String) this.dab.getProperty(new ObjectPropertyReference("visibility", new BaseObjectReference(configurationClassDocument, 0, preferencesDocument))); return StringUtils.defaultIfBlank(visibilityName, null); }  @Override String getDefaultVisibility(); @Override boolean isVisibilityDisabled(String visibilityName); }
DefaultPermissionsConfiguration implements PermissionsConfiguration { @Override public String getDefaultVisibility() { DocumentReference preferencesDocument = this.resolver.resolve(TEMPLATE_DOCUMENT); DocumentReference configurationClassDocument = this.resolver.resolve(Visibility.CLASS_REFERENCE); String visibilityName = (String) this.dab.getProperty(new ObjectPropertyReference("visibility", new BaseObjectReference(configurationClassDocument, 0, preferencesDocument))); return StringUtils.defaultIfBlank(visibilityName, null); }  @Override String getDefaultVisibility(); @Override boolean isVisibilityDisabled(String visibilityName);  }