public void setDefaultRepositoryMaxInstanceCount( int count ) { if ( count < 0 ) { getLogger().info( "Default repository maximal instance limit set to UNLIMITED." ); this.defaultRepositoryMaxInstanceCountLimit = Integer.MAX_VALUE; } else { getLogger().info( "Default repository maximal instance limit set to " + count + "." ); this.defaultRepositoryMaxInstanceCountLimit = count; } }
private File canonicalize( final File file ) { try { return file.getCanonicalFile(); } catch ( IOException e ) { final String message = "\r\n******************************************************************************\r\n" + "* Could not canonicalize file [ " + file + "]!!!! *\r\n" + "* Nexus cannot function properly until the process has read+write permissions to this folder *\r\n" + "******************************************************************************"; getLogger().error( message ); throw Throwables.propagate( e ); } }
private File forceMkdir( final File directory ) { try { FileUtils.forceMkdir( directory ); return directory; } catch ( IOException e ) { final String message = "\r\n******************************************************************************\r\n" + "* Could not create directory [ " + directory + "]!!!! *\r\n" + "* Nexus cannot function properly until the process has read+write permissions to this folder *\r\n" + "******************************************************************************"; getLogger().error( message ); throw Throwables.propagate( e ); } }
public void setRepositoryMaxInstanceCount( RepositoryTypeDescriptor rtd, int count ) { if ( count < 0 ) { getLogger().info( "Repository type " + rtd.toString() + " maximal instance limit set to UNLIMITED." ); getRepositoryMaxInstanceCountLimits().remove( rtd ); } else { getLogger().info( "Repository type " + rtd.toString() + " maximal instance limit set to " + count + "." ); getRepositoryMaxInstanceCountLimits().put( rtd, count ); } }
getLogger().info( "Applying Nexus Configuration due to changes in {}...", changesToString( changes ) ); getLogger().info( "Applying Nexus Configuration due to changes in {} made by {}...", changesToString( changes ), userId ); getLogger().info( "Applying Nexus Configuration..." ); getLogger().info( "Applying Nexus Configuration made by {}...", userId );
getLogger().debug( "Anonymous user not found while trying to disable it (as part of disabling anonymous access)!", e ); return false; getLogger().debug( "XML Realm not found while trying to disable Anonymous user (as part of disabling anonymous access)!", e ); getLogger().warn( "XML Realm reported invalid configuration while trying to disable Anonymous user (as part of disabling anonymous access)!", e );
public synchronized void saveConfiguration() throws IOException { if ( applyConfiguration() ) { // TODO: when NEXUS-2215 is fixed, this should be remove/moved/cleaned // START <<< // validate before we do anything ValidationRequest request = new ValidationRequest( configurationSource.getConfiguration() ); ValidationResponse response = configurationValidator.validateModel( request ); if ( !response.isValid() ) { this.getLogger().error( "Saving nexus configuration caused unexpected error:\n" + response.toString() ); throw new IOException( "Saving nexus configuration caused unexpected error:\n" + response.toString() ); } // END <<< configurationSource.storeConfiguration(); // we successfully saved config eventBus.post( new ConfigurationSaveEvent( this ) ); } }
public synchronized boolean applyConfiguration() { getLogger().debug( "Applying Nexus Configuration..." ); ConfigurationPrepareForSaveEvent prepare = new ConfigurationPrepareForSaveEvent( this ); eventBus.post( prepare ); if ( !prepare.isVetoed() ) { logApplyConfiguration( prepare.getChanges() ); eventBus.post( new ConfigurationCommitEvent( this ) ); eventBus.post( new ConfigurationChangeEvent( this, prepare.getChanges(), getCurrentUserId() ) ); return true; } else { getLogger().info( vetoFormatter.format( new VetoFormatterRequest( prepare, getLogger().isDebugEnabled() ) ) ); eventBus.post( new ConfigurationRollbackEvent( this ) ); return false; } }