diff --git a/api/pom.xml b/api/pom.xml
index 344a1286..ae533421 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -18,7 +18,7 @@
org.openmrs.module
adminui
- 1.7.0-SNAPSHOT
+ 2.0.0-SNAPSHOT
adminui-api
@@ -33,12 +33,14 @@
org.openmrs.api
openmrs-api
jar
+ provided
org.openmrs.web
openmrs-web
jar
+ provided
@@ -64,11 +66,6 @@
-
- org.openmrs.module
- providermanagement-api
-
-
org.openmrs.module
uiframework-api
@@ -78,6 +75,18 @@
org.openmrs.module
legacyui-omod
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
+
+
+ org.mockito
+ mockito-inline
+ test
+
diff --git a/api/src/test/java/org/openmrs/module/adminui/TestUtils.java b/api/src/test/java/org/openmrs/module/adminui/TestUtils.java
index ec2459ef..88bfc8e6 100644
--- a/api/src/test/java/org/openmrs/module/adminui/TestUtils.java
+++ b/api/src/test/java/org/openmrs/module/adminui/TestUtils.java
@@ -10,16 +10,13 @@
package org.openmrs.module.adminui;
import org.apache.commons.beanutils.PropertyUtils;
-import org.hamcrest.Matcher;
-import org.junit.Assert;
-import org.mockito.ArgumentMatcher;
import org.openmrs.util.OpenmrsUtil;
import java.util.Collection;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
/**
* Various utils to help with testing
@@ -29,9 +26,10 @@ public class TestUtils {
/**
* To test things like: assertContainsElementWithProperty(listOfPatients, "patientId", 2)
*
- * @param collection
- * @param property
- * @param value
+ * @param collection the collection to search
+ * @param property the name of the bean property to evaluate
+ * @param value the expected value of the property
+ * @throws AssertionError if no matching element is found
*/
public static void assertContainsElementWithProperty(Collection> collection, String property, Object value) {
for (Object o : collection) {
@@ -40,50 +38,30 @@ public static void assertContainsElementWithProperty(Collection> collection, S
return;
}
} catch (Exception ex) {
- // pass
+ // Skip this element
}
}
- Assert.fail("Collection does not contain an element with " + property + " = " + value + ". Collection: "
- + collection);
- }
-
- public static ArgumentMatcher isCollectionOfExactlyElementsWithProperties(final String property,
- final Object... expectedPropertyValues) {
- return new ArgumentMatcher() {
-
- @Override
- public boolean matches(Object o) {
- assertTrue(o instanceof Collection);
- Collection actual = (Collection) o;
- assertThat(actual.size(), is(expectedPropertyValues.length));
- for (Object expectedPropertyValue : expectedPropertyValues) {
- assertContainsElementWithProperty(actual, property, expectedPropertyValue);
- }
- return true;
- }
- };
+ fail("Collection does not contain an element with " + property + " = " + value + ". Collection: " + collection);
}
/**
- * Creates an argument matcher that tests equality based on the equals method, the developer
- * doesn't have to type cast the returned argument when pass it to
- * {@link org.mockito.Mockito#argThat(org.hamcrest.Matcher)} as it would be the case if we used
- * {@link org.mockito.internal.matchers.Equals} matcher
+ * Asserts that the given collection contains exactly the expected property values, with no extra or missing values.
+ * The assertion passes if the collection contains the same number of elements as the number of expected values,
+ * and each expected property value is found in at least one element of the collection.
+ * This does not consider order or duplicates; it treats both actual and expected values as sets.
*
- * @param object
- * @return Matcher
+ * @param collection the collection to check
+ * @param property the bean property to evaluate for each element
+ * @param expectedPropertyValues the expected values of the property across the collection
+ * @throws AssertionError if the size does not match or any expected value is missing
*/
- @SuppressWarnings("unchecked")
- public static Matcher equalsMatcher(final T object) {
- return new ArgumentMatcher() {
+ public static void assertCollectionHasExactlyElementsWithProperty(Collection> collection, String property, Object... expectedPropertyValues) {
+ assertNotNull(collection, "Collection is null");
+ assertEquals(expectedPropertyValues.length, collection.size(), "Collection size does not match expected");
- /**
- * @see org.mockito.ArgumentMatcher#matches(Object)
- */
- @Override
- public boolean matches(Object arg) {
- return OpenmrsUtil.nullSafeEquals(object, (T) arg);
- }
- };
+ for (Object expectedValue : expectedPropertyValues) {
+ assertContainsElementWithProperty(collection, property, expectedValue);
+ }
}
+
}
diff --git a/api/src/test/java/org/openmrs/module/adminui/account/AccountServiceComponentTest.java b/api/src/test/java/org/openmrs/module/adminui/account/AccountServiceComponentTest.java
index 66a68d4e..fe66f9f3 100644
--- a/api/src/test/java/org/openmrs/module/adminui/account/AccountServiceComponentTest.java
+++ b/api/src/test/java/org/openmrs/module/adminui/account/AccountServiceComponentTest.java
@@ -9,30 +9,30 @@
*/
package org.openmrs.module.adminui.account;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.openmrs.Provider;
import org.openmrs.User;
+import org.openmrs.api.ProviderService;
import org.openmrs.api.UserService;
import org.openmrs.api.context.Context;
-import org.openmrs.module.providermanagement.Provider;
-import org.openmrs.module.providermanagement.api.ProviderManagementService;
-import org.openmrs.test.BaseModuleContextSensitiveTest;
+import org.openmrs.test.jupiter.BaseModuleContextSensitiveTest;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
-public class AccountServiceComponentTest extends BaseModuleContextSensitiveTest {
+public class AccountServiceComponentTest extends BaseModuleContextSensitiveTest{
private AccountService accountService;
private UserService userService;
+
+ private ProviderService providerService;
- private ProviderManagementService providerManagementService;
-
- @Before
+ @BeforeEach
public void setup() {
userService = Context.getUserService();
accountService = Context.getService(AccountService.class);
- providerManagementService = Context.getService(ProviderManagementService.class);
+ providerService = Context.getProviderService();
}
/**
@@ -48,7 +48,7 @@ public void saveAccount_shouldSaveNewAccountWithAProviderAndUserAccount() throws
user.addRole(userService.getRole("Application Role: Archives"));//capability
Provider provider = new Provider();
- provider.setProviderRole(providerManagementService.getProviderRole(1001));
+ provider.setProviderRole(providerService.getProviderRole(1001));
Account account = new Account(null);
account.setFamilyName("some");
account.setGivenName("tester");
diff --git a/api/src/test/java/org/openmrs/module/adminui/account/AccountServiceTest.java b/api/src/test/java/org/openmrs/module/adminui/account/AccountServiceTest.java
index c8e98b6c..0cb91de7 100644
--- a/api/src/test/java/org/openmrs/module/adminui/account/AccountServiceTest.java
+++ b/api/src/test/java/org/openmrs/module/adminui/account/AccountServiceTest.java
@@ -9,17 +9,17 @@
*/
package org.openmrs.module.adminui.account;
-import static org.junit.Assert.assertThat;
+import org.junit.jupiter.api.Test;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.extension.ExtendWith;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import java.util.List;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
import org.openmrs.Person;
import org.openmrs.Provider;
import org.openmrs.Role;
@@ -28,18 +28,10 @@
import org.openmrs.api.PersonService;
import org.openmrs.api.ProviderService;
import org.openmrs.api.UserService;
-import org.openmrs.api.context.Context;
import org.openmrs.module.adminui.AdminUiConstants;
import org.openmrs.module.adminui.TestUtils;
-import org.openmrs.module.providermanagement.api.ProviderManagementService;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PowerMockIgnore;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-@RunWith(PowerMockRunner.class)
-@PrepareForTest(Context.class)
-@PowerMockIgnore("jdk.internal.reflect.*")
+@ExtendWith(MockitoExtension.class)
public class AccountServiceTest {
private AccountServiceImpl accountService;
@@ -50,26 +42,20 @@ public class AccountServiceTest {
private ProviderService providerService;
- private ProviderManagementService providerManagementService;
-
private AdministrationService adminService;
-
- @Before
+
+ @BeforeEach
public void setup() {
- PowerMockito.mockStatic(Context.class);
userService = mock(UserService.class);
personService = mock(PersonService.class);
providerService = mock(ProviderService.class);
- providerManagementService = mock(ProviderManagementService.class);
adminService = mock(AdministrationService.class);
-
+
accountService = new AccountServiceImpl();
accountService.setUserService(userService);
accountService.setPersonService(personService);
accountService.setProviderService(providerService);
accountService.setAdminService(adminService);
- when(Context.getUserService()).thenReturn(userService);
- when(Context.getProviderService()).thenReturn(providerService);
}
/**
@@ -107,7 +93,7 @@ public void getAllAccounts_shouldGetAllUniqueAccounts() throws Exception {
when(userService.getAllUsers()).thenReturn(Arrays.asList(user1, user2, user3, daemonUser));
when(providerService.getAllProviders()).thenReturn(Arrays.asList(provider1, provider2, unknownProvider));
- Assert.assertEquals(3, accountService.getAllAccounts().size());
+ assertEquals(3, accountService.getAllAccounts().size());
}
/**
@@ -122,28 +108,29 @@ public void getAllCapabilities_shouldReturnAllRolesWithTheCapabilityPrefix() thr
when(userService.getAllRoles()).thenReturn(Arrays.asList(role1, role2, role3));
List capabilities = accountService.getAllCapabilities();
- Assert.assertEquals(2, capabilities.size());
- assertThat(capabilities, TestUtils.isCollectionOfExactlyElementsWithProperties("role",
- AdminUiConstants.ROLE_PREFIX_CAPABILITY + "role1", AdminUiConstants.ROLE_PREFIX_CAPABILITY + "role3"));
+ assertEquals(2, capabilities.size());
+ TestUtils.assertCollectionHasExactlyElementsWithProperty(
+ capabilities, "role", AdminUiConstants.ROLE_PREFIX_CAPABILITY + "role1",
+ AdminUiConstants.ROLE_PREFIX_CAPABILITY + "role3"
+ );
}
-
+
/**
* @verifies return all roles with the privilege level prefix
* @see AccountService#getAllPrivilegeLevels()
*/
@Test
- public void getAllPrivilegeLevels_shouldReturnAllRolesWithThePrivilegeLevelPrefix() throws Exception {
+ public void getAllPrivilegeLevels_shouldReturnAllRolesWithThePrivilegeLevelPrefix() {
Role role1 = new Role(AdminUiConstants.ROLE_PREFIX_PRIVILEGE_LEVEL + "role1");
Role role3 = new Role("role2");
Role role2 = new Role(AdminUiConstants.ROLE_PREFIX_PRIVILEGE_LEVEL + "role3");
-
+
when(userService.getAllRoles()).thenReturn(Arrays.asList(role1, role2, role3));
List privilegeLevels = accountService.getAllPrivilegeLevels();
- Assert.assertEquals(2, privilegeLevels.size());
- assertThat(
- privilegeLevels,
- TestUtils.isCollectionOfExactlyElementsWithProperties("role", AdminUiConstants.ROLE_PREFIX_PRIVILEGE_LEVEL
- + "role1", AdminUiConstants.ROLE_PREFIX_PRIVILEGE_LEVEL + "role3"));
+ assertEquals(2, privilegeLevels.size());
+ TestUtils.assertCollectionHasExactlyElementsWithProperty(
+ privilegeLevels, "role", AdminUiConstants.ROLE_PREFIX_PRIVILEGE_LEVEL + "role1",
+ AdminUiConstants.ROLE_PREFIX_PRIVILEGE_LEVEL + "role3"
+ );
}
-
}
diff --git a/api/src/test/java/org/openmrs/module/adminui/account/AdminUiAccountValidatorTest.java b/api/src/test/java/org/openmrs/module/adminui/account/AdminUiAccountValidatorTest.java
index d01e9194..be96f962 100644
--- a/api/src/test/java/org/openmrs/module/adminui/account/AdminUiAccountValidatorTest.java
+++ b/api/src/test/java/org/openmrs/module/adminui/account/AdminUiAccountValidatorTest.java
@@ -9,51 +9,53 @@
*/
package org.openmrs.module.adminui.account;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
import org.mockito.Mockito;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.mockito.MockedStatic;
import org.openmrs.api.AdministrationService;
import org.openmrs.api.context.Context;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PowerMockIgnore;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
-@RunWith(PowerMockRunner.class)
-@PrepareForTest(Context.class)
-@PowerMockIgnore("jdk.internal.reflect.*")
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+@ExtendWith(MockitoExtension.class)
public class AdminUiAccountValidatorTest {
-
- private AdminUiAccountValidator validator;
-
+
+ private Account account;
+ private Errors errors;
+
+ @Mock
private AdministrationService adminService;
-
- @Before
- public void setValidator() {
- PowerMockito.mockStatic(Context.class);
- adminService = Mockito.mock(AdministrationService.class);
- when(Context.getAdministrationService()).thenReturn(adminService);
-
+
+ private AdminUiAccountValidator validator;
+
+ @BeforeEach
+ public void setUp() {
+ account = new Account(null);
+ errors = new BindException(account, "account");
validator = new AdminUiAccountValidator();
}
-
+
/**
* @see AdminUiAccountValidator#validate(Object,org.springframework.validation.Errors)
* @verifies reject an account with no user or provider account
*/
@Test
public void validate_shouldRejectAnAccountWithNoUserOrProviderAccount() throws Exception {
- Account account = new Account(null);
- Errors errors = new BindException(account, "account");
- validator.validate(account, errors);
- Assert.assertTrue(errors.hasErrors());
- Assert.assertEquals(1, errors.getAllErrors().size());
- Assert.assertEquals("adminui.account.userOrProvider.required", errors.getAllErrors().get(0).getCode());
+ try (MockedStatic mockedContext = Mockito.mockStatic(Context.class)) {
+ mockedContext.when(Context::getAdministrationService).thenReturn(adminService);
+
+ validator.validate(account, errors);
+
+ assertTrue(errors.hasErrors());
+ assertEquals(1, errors.getAllErrors().size());
+ assertEquals("adminui.account.userOrProvider.required", errors.getAllErrors().get(0).getCode());
+ }
}
}
diff --git a/api/src/test/resources/TestingApplicationContext.xml b/api/src/test/resources/TestingApplicationContext.xml
index 1acfa5ec..67d32a13 100644
--- a/api/src/test/resources/TestingApplicationContext.xml
+++ b/api/src/test/resources/TestingApplicationContext.xml
@@ -21,12 +21,16 @@
classpath:hibernate.cfg.xml
- classpath:test-hibernate.cfg.xml
+
+
+ org.openmrs
+
+
\ No newline at end of file
diff --git a/api/src/test/resources/accountComponentTestDataset.xml b/api/src/test/resources/accountComponentTestDataset.xml
index f8a95663..0af49352 100644
--- a/api/src/test/resources/accountComponentTestDataset.xml
+++ b/api/src/test/resources/accountComponentTestDataset.xml
@@ -19,10 +19,10 @@
-
-
diff --git a/api/src/test/resources/test-hibernate.cfg.xml b/api/src/test/resources/test-hibernate.cfg.xml
deleted file mode 100644
index c646bc77..00000000
--- a/api/src/test/resources/test-hibernate.cfg.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/omod/pom.xml b/omod/pom.xml
index db5265a6..29f89345 100644
--- a/omod/pom.xml
+++ b/omod/pom.xml
@@ -18,7 +18,7 @@
org.openmrs.module
adminui
- 1.7.0-SNAPSHOT
+ 2.0.0-SNAPSHOT
adminui-omod
@@ -106,11 +106,6 @@
uiframework-api
-
- org.openmrs.module
- providermanagement-api
-
-
org.openmrs.module
uicommons-omod
@@ -133,6 +128,12 @@
${appuiVersion}
provided
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
@@ -151,8 +152,8 @@
gem
provided
-
-
+
+
${project.parent.artifactId}-${project.parent.version}
diff --git a/omod/src/main/java/org/openmrs/module/adminui/fragment/controller/systemadmin/accounts/ProviderTabContentPaneFragmentController.java b/omod/src/main/java/org/openmrs/module/adminui/fragment/controller/systemadmin/accounts/ProviderTabContentPaneFragmentController.java
index 01b96558..d326e05d 100644
--- a/omod/src/main/java/org/openmrs/module/adminui/fragment/controller/systemadmin/accounts/ProviderTabContentPaneFragmentController.java
+++ b/omod/src/main/java/org/openmrs/module/adminui/fragment/controller/systemadmin/accounts/ProviderTabContentPaneFragmentController.java
@@ -12,10 +12,9 @@
import javax.servlet.http.HttpServletRequest;
import org.openmrs.OpenmrsObject;
+import org.openmrs.Provider;
import org.openmrs.api.PersonService;
import org.openmrs.api.ProviderService;
-import org.openmrs.module.providermanagement.Provider;
-import org.openmrs.module.providermanagement.api.ProviderManagementService;
import org.openmrs.ui.framework.UiUtils;
import org.openmrs.ui.framework.annotation.BindParams;
import org.openmrs.ui.framework.annotation.SpringBean;
@@ -39,7 +38,6 @@ public FragmentActionResult process(@RequestParam(value = "uuid", required = fal
@RequestParam(value = "reason", required = false) String reason,
@SpringBean("personService") PersonService personService,
@SpringBean("providerService") ProviderService providerService,
- @SpringBean("providerManagementService") ProviderManagementService providerManagementService,
HttpServletRequest request, UiUtils ui) {
try {
diff --git a/omod/src/main/java/org/openmrs/module/adminui/page/controller/systemadmin/accounts/AccountPageController.java b/omod/src/main/java/org/openmrs/module/adminui/page/controller/systemadmin/accounts/AccountPageController.java
index 831c5324..4924dba6 100644
--- a/omod/src/main/java/org/openmrs/module/adminui/page/controller/systemadmin/accounts/AccountPageController.java
+++ b/omod/src/main/java/org/openmrs/module/adminui/page/controller/systemadmin/accounts/AccountPageController.java
@@ -24,10 +24,13 @@
import org.openmrs.OpenmrsObject;
import org.openmrs.Person;
import org.openmrs.PersonName;
+import org.openmrs.Provider;
+import org.openmrs.ProviderRole;
import org.openmrs.Role;
import org.openmrs.User;
import org.openmrs.api.APIException;
import org.openmrs.api.AdministrationService;
+import org.openmrs.api.ProviderService;
import org.openmrs.api.UserService;
import org.openmrs.api.context.Context;
import org.openmrs.messagesource.MessageSourceService;
@@ -37,9 +40,6 @@
import org.openmrs.module.adminui.account.AdminUiAccountValidator;
import org.openmrs.module.appframework.domain.Extension;
import org.openmrs.module.appframework.service.AppFrameworkService;
-import org.openmrs.module.providermanagement.Provider;
-import org.openmrs.module.providermanagement.ProviderRole;
-import org.openmrs.module.providermanagement.api.ProviderManagementService;
import org.openmrs.module.uicommons.UiCommonsConstants;
import org.openmrs.module.uicommons.util.InfoErrorMessageUtil;
import org.openmrs.ui.framework.SimpleObject;
@@ -83,17 +83,17 @@ public Account getAccount(@RequestParam(value = "personId", required = false) Pe
* @param model
* @param account
* @param accountService
- * @param providerManagementService
+ * @param providerService
*/
public void get(PageModel model, @MethodParam("getAccount") Account account,
@SpringBean("adminAccountService") AccountService accountService,
@SpringBean("adminService") AdministrationService administrationService,
- @SpringBean("providerManagementService") ProviderManagementService providerManagementService,
+ @SpringBean("providerService") ProviderService providerService,
UiUtils uu,
@SpringBean("appFrameworkService") AppFrameworkService appFrameworkService)
throws IOException {
- setModelAttributes(model, account, null, accountService, administrationService, providerManagementService, uu, appFrameworkService);
+ setModelAttributes(model, account, null, accountService, administrationService, providerService, uu, appFrameworkService);
if (account.getPerson().getPersonId() == null) {
setJsonFormData(model, account, null, uu);
}
@@ -104,7 +104,7 @@ public void get(PageModel model, @MethodParam("getAccount") Account account,
* @param messageSourceService
* @param accountService
* @param administrationService
- * @param providerManagementService
+ * @param providerService
* @param accountValidator
* @param model
* @param request
@@ -116,7 +116,7 @@ public String post(PageModel model, @MethodParam("getAccount") @BindParams Accou
@SpringBean("adminAccountService") AccountService accountService,
@SpringBean("adminService") AdministrationService administrationService,
@SpringBean("adminUiAccountValidator") AdminUiAccountValidator accountValidator,
- @SpringBean("providerManagementService") ProviderManagementService providerManagementService,
+ @SpringBean("providerService") ProviderService providerService,
@SpringBean("appFrameworkService") AppFrameworkService appFrameworkService,
HttpServletRequest request, UiUtils uu) throws IOException {
@@ -188,7 +188,7 @@ public String post(PageModel model, @MethodParam("getAccount") @BindParams Accou
if (otherAccountData.getAddProviderAccount()) {
Provider provider = new Provider();
provider.setIdentifier(request.getParameter("identifier"));
- provider.setProviderRole(providerManagementService.getProviderRoleByUuid(request.getParameter("providerRole")));
+ provider.setProviderRole(providerService.getProviderRoleByUuid(request.getParameter("providerRole")));
account.addProviderAccount(provider);
}
@@ -217,7 +217,7 @@ public String post(PageModel model, @MethodParam("getAccount") @BindParams Accou
}
setModelAttributes(model, account, otherAccountData, accountService, administrationService,
- providerManagementService, uu, appFrameworkService);
+ providerService, uu, appFrameworkService);
sendErrorMessage(errors, model, messageSourceService, request);
@@ -231,7 +231,7 @@ public String post(PageModel model, @MethodParam("getAccount") @BindParams Accou
public void setModelAttributes(PageModel model, Account account, OtherAccountData otherAccountData,
AccountService accountService, AdministrationService administrationService,
- ProviderManagementService providerManagementService, UiUtils uu,
+ ProviderService providerService, UiUtils uu,
AppFrameworkService appFrameworkService) throws IOException {
model.addAttribute("account", account);
@@ -259,7 +259,7 @@ public void setModelAttributes(PageModel model, Account account, OtherAccountDat
model.addAttribute("privilegeLevelPrefix", privilegeLevelPrefix);
model.addAttribute("rolePrefix", rolePrefix);
model.addAttribute("allowedLocales", administrationService.getAllowedLocales());
- List providerRoles = providerManagementService.getAllProviderRoles(false);
+ List providerRoles = providerService.getAllProviderRoles(false);
model.addAttribute("providerRoles", providerRoles);
List customPersonAttributeEditFragments =
@@ -280,7 +280,7 @@ public void setModelAttributes(PageModel model, Account account, OtherAccountDat
Collections.sort(customUserPropertyViewFragments);
model.addAttribute("customUserPropertyViewFragments", customUserPropertyViewFragments);
- Map propertyMaxLengthMap = new HashMap();
+ Map propertyMaxLengthMap = new HashMap<>();
propertyMaxLengthMap.put("familyName",
administrationService.getMaximumPropertyLength(PersonName.class, "family_name"));
propertyMaxLengthMap
diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml
index 4a9a9f29..c17763a2 100644
--- a/omod/src/main/resources/config.xml
+++ b/omod/src/main/resources/config.xml
@@ -32,7 +32,6 @@
org.openmrs.module.appframework
org.openmrs.module.uicommons
org.openmrs.module.appui
- org.openmrs.module.providermanagement
org.openmrs.module.webservices.rest
diff --git a/pom.xml b/pom.xml
index 233a8b1c..35a500f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
org.openmrs.module
adminui
- 1.7.0-SNAPSHOT
+ 2.0.0-SNAPSHOT
pom
Admin UI Module
Administration Tools for the Reference Application
@@ -49,15 +49,16 @@
- 2.0.0
+ 2.8.1-SNAPSHOT
UTF-8
- 2.1
- 1.7
- 3.9
- 2.9
- 2.5.0
- 2.16
- 1.16.0
+ 2.27.0-SNAPSHOT
+ 1.19.0-SNAPSHOT
+ 4.0.1-SNAPSHOT
+ 2.19.0-SNAPSHOT
+ 2.50.0-SNAPSHOT
+ 2.0.0-SNAPSHOT
+ 4.0.1
+ 4.8.0
@@ -79,6 +80,12 @@
${openMRSVersion}
jar
provided
+
+
+ javax.servlet
+ servlet-api
+
+
@@ -103,10 +110,18 @@
${openMRSVersion}
pom
test
+
+
+ org.powermock
+ powermock-module-junit4
+
+
+ org.powermock
+ powermock-api-mockito2
+
+
-
-
-
+
@@ -125,14 +140,6 @@
${appframeworkVersion}
-
- org.openmrs.module
- providermanagement-api
- ${providermanagementVersion}
- jar
- provided
-
-
org.openmrs.module
legacyui-omod
@@ -149,7 +156,19 @@
provided
+
+ javax.servlet
+ javax.servlet-api
+ ${javaxServletApiVersion}
+ provided
+
+
+ org.mockito
+ mockito-inline
+ ${mockitoInlineVersion}
+ test
+
@@ -161,8 +180,8 @@
org.apache.maven.plugins
maven-compiler-plugin
- 1.7
- 1.7
+ 1.8
+ 1.8
@@ -275,20 +294,6 @@ graphic logo is a trademark of OpenMRS Inc.
test
-
- org.powermock
- powermock-core
- 1.6.1
- test
-
-
-
- org.powermock
- powermock-module-junit4
- 1.6.1
- test
-
-
com.thoughtworks.xstream
xstream