@Override public boolean isDebugEnabled() { return logger.isDebugEnabled(); }
@Override public boolean isDebugEnabled() { return logger.isDebugEnabled(); }
@Override public boolean isDebugEnabled() { return logger.isDebugEnabled(); }
private void logDebug(String message, Object...args) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(message, args); } }
@Override public boolean exists( Connection connection, String id ) throws SQLException { if (logger.isDebugEnabled()) { logger.debug("Checking if the content with ID {0} exists in {1}", id, tableName()); } try (PreparedStatement ps = connection.prepareStatement(statements.get(CONTENT_EXISTS))) { ps.setString(1, id); ResultSet rs = ps.executeQuery(); return rs.next(); } }
@Override public void restore( String absPath, Version version, boolean removeExisting ) throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.restore('{0}',{1},{2})", absPath, version, removeExisting); restoreAtAbsPath(absPath, version, removeExisting, true); }
protected void logTableInfo( String message ) { if (logger.isDebugEnabled()) { logger.debug(message, tableName()); } }
@Override public void restore( String absPath, Version version, boolean removeExisting ) throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.restore('{0}',{1},{2})", absPath, version, removeExisting); restoreAtAbsPath(absPath, version, removeExisting, true); }
@Override public Version checkin( String absPath ) throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.checkin('{0}')", absPath); return checkin(session.getNode(absPath)); }
@Override public void checkout( String absPath ) throws LockException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.checkout('{0}')", absPath); checkout(session.getNode(absPath)); }
@Override public Version checkin( String absPath ) throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.checkin('{0}')", absPath); return checkin(session.getNode(absPath)); }
@Override public void checkout( String absPath ) throws LockException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.checkout('{0}')", absPath); checkout(session.getNode(absPath)); }
private DataSource createManagedDS(RelationalDbConfig config) { HikariConfig hikariCfg = new HikariConfig(config.datasourceConfig()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Attempting to connect to '{0}' with '{1}' for username '{2}' and password '{3}'", hikariCfg.getJdbcUrl(), hikariCfg.getDriverClassName(), hikariCfg.getUsername(), "*****"); } return new HikariDataSource(hikariCfg); }
protected void loadFromDocumentStore(Set<String> keys) { this.documentStore.load(keys).forEach(entry -> { String key = entry.id(); Document document = entry.content(); NodeKey nodeKey = new NodeKey(key); // in some cases (user transactions) we may be replacing a node, but it's important to do so this.nodesByKey.put(nodeKey, new LazyCachedNode(nodeKey, document)); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Read a fresh copy from the document store for '{0}' and stored it in the tx ws cache as '{1}'", key, document); } }); }
@Override public void doneMerge( String absPath, Version version ) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.doneMerge('{0}',{1})", absPath, version); // Create a new session in which we'll finish the merge, so this session remains thread-safe ... JcrSession mergeSession = session.spawnSession(false); doneMerge(mergeSession.getNode(absPath), version); }
@Override public void doneMerge( String absPath, Version version ) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.doneMerge('{0}',{1})", absPath, version); // Create a new session in which we'll finish the merge, so this session remains thread-safe ... JcrSession mergeSession = session.spawnSession(false); doneMerge(mergeSession.getNode(absPath), version); }
@Override public void remove( String absPath ) throws UnsupportedOperationException, PathNotFoundException, VersionException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.remove('{0}')", absPath); JcrSession removeSession = session.spawnSession(false); AbstractJcrNode node = removeSession.getNode(absPath); checkVersionable(node); SessionCache systemCache = session.createSystemCache(false); removeHistories(node, systemCache); node.remove(); removeSession.cache().save(systemCache, null); }
@Override public void remove( String absPath ) throws UnsupportedOperationException, PathNotFoundException, VersionException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.remove('{0}')", absPath); JcrSession removeSession = session.spawnSession(false); AbstractJcrNode node = removeSession.getNode(absPath); checkVersionable(node); SessionCache systemCache = session.createSystemCache(false); removeHistories(node, systemCache); node.remove(); removeSession.cache().save(systemCache, null); }
@Override public void put( String key, SchematicEntry entry ) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("putting at {0} document {1}", key, entry.source()); } TransactionStore.TransactionMap<String, Document> txContent = transactionalContent(true); Document source = entry.source(); Document content = entry.content(); if (content instanceof EditableDocument) { source = SchematicEntry.create(entry.id(), ((EditableDocument) content).unwrap()).source(); } txContent.put(key, source); }
@Test public void shouldSupportAskingWhetherLoggingLevelsAreEnabled() { logger.isErrorEnabled(); logger.isWarnEnabled(); logger.isInfoEnabled(); logger.isDebugEnabled(); logger.isTraceEnabled(); }