LogRepositoryCustomImpl implements LogRepositoryCustom { public XLog importFromInputStream(InputStream inputStream, XParser parser) throws Exception { Collection<XLog> logs; try { logs = parser.parse(inputStream); } catch (Exception e) { e.printStackTrace(); logs = null; } if (logs == null) { for (XParser p : XParserRegistry.instance().getAvailable()) { if (p == parser) { continue; } try { logs = p.parse(inputStream); if (logs.size() > 0) { break; } } catch (Exception e1) { logs = null; } } } if (logs == null || logs.size() == 0) { throw new Exception("No logs contained in log!"); } XLog log = logs.iterator().next(); if (XConceptExtension.instance().extractName(log) == null) { XConceptExtension.instance().assignName(log, "Anonymous log imported from "); } if (log.isEmpty()) { throw new Exception("No process instances contained in log!"); } return log; }  @Override @SuppressWarnings("unchecked") List<Log> findAllLogs(final String conditions); @Override @SuppressWarnings("unchecked") List<Log> findAllLogsByFolder(final Integer folderId, final String userRowGuid, final String conditions); @Override String storeProcessLog(final Integer folderId, final String logName, XLog log, final Integer userID,
                                  final String domain, final String created); void deleteProcessLog(Log log); XLog getProcessLog(Log log, String factoryName); APMLog getAggregatedLog(Log log); String getLayoutByLogId(Integer logId, Integer userId); XLog importFromFile(XFactory factory, String location); void exportToFile(String path, String name, XLog log); XLog importFromInputStream(InputStream inputStream, XParser parser); void exportToInputStream(XLog log, String path, String name, XSerializer serializer);  }
@Test public void importFromInputStream() { }