@Override public boolean storeSEP(String jsonld) { boolean success = sesameStorage.storeSEP(jsonld); initializeSEPStorage(); return success; }
@Override public boolean storeSEP(String jsonld) { boolean success = sesameStorage.storeSEP(jsonld); initializeSEPStorage(); return success; }
@Override public boolean storeSEP(DataSourceDescription sep) { boolean success = sesameStorage.storeSEP(sep); initializeSEPStorage(); return success; }
@Override public boolean storeSEPA(String jsonld) { boolean success = sesameStorage.storeSEP(jsonld); initializeSEPAStorage(); return success; }
@Override public boolean storeSEP(DataSourceDescription sep) { boolean success = sesameStorage.storeSEP(sep); initializeSEPStorage(); return success; }
@Override public boolean storeSEPA(String jsonld) { boolean success = sesameStorage.storeSEP(jsonld); initializeSEPAStorage(); 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().addSource(username, elementDescription.getElementId()); } */ if (!storageApi.exists(elementDescription)) storageApi.storeSEP(elementDescription); else storageState = StorageState.ALREADY_IN_SESAME; if (!(userService.getOwnSourceUris(username).contains(elementDescription.getUri()))) userService.addOwnSource(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().addSource(username, elementDescription.getElementId()); } */ if (!storageApi.exists(elementDescription)) storageApi.storeSEP(elementDescription); else storageState = StorageState.ALREADY_IN_SESAME; if (!(userService.getOwnSourceUris(username).contains(elementDescription.getUri()))) userService.addOwnSource(username, elementDescription.getUri(), publicElement); else storageState = StorageState.ALREADY_IN_SESAME_AND_USER_DB; return storageState; }