@Override public boolean storeSEC(DataSinkDescription sec) { boolean success = sesameStorage.storeSEC(sec); initializeSECStorage(); return success; }
@Override public boolean storeSEC(DataSinkDescription sec) { boolean success = sesameStorage.storeSEC(sec); initializeSECStorage(); return success; }
@Override protected StorageState store(String username, boolean publicElement) { StorageState storageState = StorageState.STORED; /* if (SecurityUtils.getSubject().isAuthenticated()) { String username = SecurityUtils.getSubject().getPrincipal().toString(); StorageManager.INSTANCE.getUserStorageAPI().addAction(username, elementDescription.getElementId()); } */ if (!storageApi.exists(elementDescription)) storageApi.storeSEC(elementDescription); else storageState = StorageState.ALREADY_IN_SESAME; if (!(userService.getOwnActionUris(username).contains(elementDescription.getUri()))) userService.addOwnAction(username, elementDescription.getUri(), publicElement); else storageState = StorageState.ALREADY_IN_SESAME_AND_USER_DB; return storageState; }
@Override protected StorageState store(String username, boolean publicElement) { StorageState storageState = StorageState.STORED; /* if (SecurityUtils.getSubject().isAuthenticated()) { String username = SecurityUtils.getSubject().getPrincipal().toString(); StorageManager.INSTANCE.getUserStorageAPI().addAction(username, elementDescription.getElementId()); } */ if (!storageApi.exists(elementDescription)) storageApi.storeSEC(elementDescription); else storageState = StorageState.ALREADY_IN_SESAME; if (!(userService.getOwnActionUris(username).contains(elementDescription.getUri()))) userService.addOwnAction(username, elementDescription.getUri(), publicElement); else storageState = StorageState.ALREADY_IN_SESAME_AND_USER_DB; return storageState; }