import org.opendaylight.aaa.api.model.User;
import org.opendaylight.aaa.api.model.Users;
import org.opendaylight.aaa.h2.config.IdmLightConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class H2Store implements IIDMStore{
+
+ private static Logger LOG = LoggerFactory.getLogger(H2Store.class);
+
private static IdmLightConfig config = new IdmLightConfig();
private DomainStore domainStore = new DomainStore();
private UserStore userStore = new UserStore();
try {
return domainStore.createDomain(domain);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while writing domain", e);
+ throw new IDMStoreException(e);
}
}
try {
return domainStore.getDomain(domainid);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while reading domain", e);
+ throw new IDMStoreException(e);
}
}
try {
return domainStore.deleteDomain(domainid);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while deleting domain", e);
+ throw new IDMStoreException(e);
}
}
try {
return domainStore.putDomain(domain);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while updating domain", e);
+ throw new IDMStoreException(e);
}
}
try {
return domainStore.getDomains();
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while reading domains", e);
+ throw new IDMStoreException(e);
}
}
try{
return roleStore.createRole(role);
}catch(StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while writing role", e);
+ throw new IDMStoreException(e);
}
}
try{
return roleStore.getRole(roleid);
}catch(StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while reading role", e);
+ throw new IDMStoreException(e);
}
}
try{
return roleStore.deleteRole(roleid);
}catch(StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while deleting role", e);
+ throw new IDMStoreException(e);
}
}
try{
return roleStore.putRole(role);
}catch(StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while updating role", e);
+ throw new IDMStoreException(e);
}
}
try {
return roleStore.getRoles();
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while getting roles", e);
+ throw new IDMStoreException(e);
}
}
try {
return userStore.createUser(user);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while writing user", e);
+ throw new IDMStoreException(e);
}
}
try {
return userStore.getUser(userid);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while reading user", e);
+ throw new IDMStoreException(e);
}
}
try {
return userStore.deleteUser(userid);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while deleting user", e);
+ throw new IDMStoreException(e);
}
}
try {
return userStore.putUser(user);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while updating user", e);
+ throw new IDMStoreException(e);
}
}
try {
return userStore.getUsers(username, domain);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while reading users", e);
+ throw new IDMStoreException(e);
}
}
try {
return userStore.getUsers();
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while reading users", e);
+ throw new IDMStoreException(e);
}
}
try {
return grantStore.createGrant(grant);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while writing grant", e);
+ throw new IDMStoreException(e);
}
}
try {
return grantStore.getGrant(grantid);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while reading grant", e);
+ throw new IDMStoreException(e);
}
}
try {
return grantStore.deleteGrant(grantid);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while deleting grant", e);
+ throw new IDMStoreException(e);
}
}
try {
return grantStore.getGrants(domainid, userid);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while getting grants", e);
+ throw new IDMStoreException(e);
}
}
try {
return grantStore.getGrants(userid);
} catch (StoreException e) {
- throw new IDMStoreException(e.getMessage());
+ LOG.error("StoreException encountered while getting grants", e);
+ throw new IDMStoreException(e);
}
}