Exemplo n.º 1
0
 private byte[] get(Address address) throws Exception {
   if (ds().usesComponent(ISecurity.class)) {
     ISecurity security = ds().getComponent(ISecurity.class);
     SecureUser secureUser = (SecureUser) ds().getContext().getUser();
     return security.get(secureUser, address);
   }
   return map.get(address);
 }
Exemplo n.º 2
0
 private void put(Address address, byte[] value, IStructurable structurable) throws Exception {
   if (ds().usesComponent(ISecurity.class)) {
     ISecurity security = ds().getComponent(ISecurity.class);
     SecureUser secureUser = (SecureUser) ds().getContext().getUser();
     security.put(secureUser, address, value, structurable);
   } else {
     map.put(address, value);
   }
 }