diff --git a/src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserDAOImpl.java b/src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserDAOImpl.java index a4f57bc1..f372e990 100644 --- a/src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserDAOImpl.java +++ b/src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserDAOImpl.java @@ -91,6 +91,7 @@ public void setAttributesMapper(Map attributesMapper) { */ @Override public void persist(User... entities) { + throw new UnsupportedOperationException(); // NOT SUPPORTED } @@ -174,8 +175,7 @@ protected User doMapFromContext(DirContextOperations ctx) { */ @Override public User merge(User entity) { - // DO NOTHING: PERSITENCE IS NOT SUPPORTED - return entity; + throw new UnsupportedOperationException(); } /* @@ -185,8 +185,7 @@ public User merge(User entity) { */ @Override public boolean remove(User entity) { - // DO NOTHING: PERSITENCE IS NOT SUPPORTED - return true; + throw new UnsupportedOperationException(); } /* @@ -196,8 +195,7 @@ public boolean remove(User entity) { */ @Override public boolean removeById(Long id) { - // DO NOTHING: PERSITENCE IS NOT SUPPORTED - return true; + throw new UnsupportedOperationException(); } /* @@ -219,8 +217,7 @@ public User find(Long id) { */ @Override public User[] save(User... entities) { - // DO NOTHING: PERSITENCE IS NOT SUPPORTED - return entities; + throw new UnsupportedOperationException(); } @Override diff --git a/src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserGroupDAOImpl.java b/src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserGroupDAOImpl.java index 91306c92..6ab5e3b5 100644 --- a/src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserGroupDAOImpl.java +++ b/src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserGroupDAOImpl.java @@ -94,7 +94,7 @@ public void setAddEveryOneGroup(boolean addEveryOneGroup) { */ @Override public void persist(UserGroup... entities) { - // NOT SUPPORTED + throw new UnsupportedOperationException(); } /* @@ -216,8 +216,7 @@ protected boolean matchFilters(UserGroup group, ISearch search) { */ @Override public UserGroup merge(UserGroup entity) { - // DO NOTHING: PERSITENCE IS NOT SUPPORTED - return entity; + throw new UnsupportedOperationException(); } /* @@ -227,8 +226,7 @@ public UserGroup merge(UserGroup entity) { */ @Override public boolean remove(UserGroup entity) { - // DO NOTHING: PERSITENCE IS NOT SUPPORTED - return true; + throw new UnsupportedOperationException(); } /* @@ -238,14 +236,12 @@ public boolean remove(UserGroup entity) { */ @Override public boolean removeById(Long id) { - // DO NOTHING: PERSITENCE IS NOT SUPPORTED - return true; + throw new UnsupportedOperationException(); } @Override public UserGroup[] save(UserGroup... entities) { - // DO NOTHING: PERSITENCE IS NOT SUPPORTED - return entities; + throw new UnsupportedOperationException(); } @Override