public void deleteRepository( String id ) throws NoSuchRepositoryException, IOException, ConfigurationException, AccessDeniedException { deleteRepository( id, false ); }
/** * Logs a message indicating initialization of this component */ @VisibleForTesting protected void logInitialize(){ final StringBuilder sysInfoLog = new StringBuilder(); sysInfoLog.append( "\n-------------------------------------------------\n\n" ); sysInfoLog.append( "Initializing " ).append(getNexusNameForLogs()); sysInfoLog.append( "\n\n-------------------------------------------------" ); getLogger().info( sysInfoLog.toString() ); }
public StorageItem dereferenceLinkItem( StorageLinkItem item ) throws NoSuchResourceStoreException, ItemNotFoundException, AccessDeniedException, IllegalOperationException, StorageException { return getRootRouter().dereferenceLink( item ); }
public boolean setState( SystemState state ) SystemState currentState = getSystemStatus().getState(); start(); getLogger().error( "Could not start Nexus! (currentState=" + currentState.toString() + ")", e ); stop(); getLogger().error( "Could not stop STARTED Nexus! (currentState=" + currentState.toString() + ")", e );
getLogger().info( "This is 1st start of new Nexus instance." ); getLogger().info( "This is an upgraded instance of Nexus." ); synchronizeShadowsAtStartup(); if(getLogger().isInfoEnabled()) getLogger().info( "Nexus Work Directory : {}", workDirPath ); getLogger().info( "Started {}", getNexusNameForLogs() ); getLogger().error( "Could not start Nexus, bad IO exception!", e ); getLogger().error( "Could not start Nexus, user configuration exception!", e );
public void initialize() throws InitializationException { logInitialize(); artifactPackagingMapper.setPropertiesFile( new File( nexusConfiguration.getConfigurationDirectory(), MAPPING_PROPERTIES_FILE ) ); // load locally present plugins getLogger().info( "Activating locally installed plugins..." ); Collection<PluginManagerResponse> activationResponse = nexusPluginManager.activateInstalledPlugins(); for ( PluginManagerResponse response : activationResponse ) { if ( response.isSuccessful() ) { getLogger().info( response.formatAsString( getLogger().isDebugEnabled() ) ); } else { getLogger().warn( response.formatAsString( getLogger().isDebugEnabled() ) ); } } applicationStatusSource.setState( SystemState.STOPPED ); applicationStatusSource.getSystemStatus().setOperationMode( OperationMode.STANDALONE ); applicationStatusSource.getSystemStatus().setInitializedAt( new Date() ); eventBus.post( new NexusInitializedEvent( this ) ); }
/** * @return the full name of this Nexus to use in logs including App name, version and long edition if defined */ @VisibleForTesting protected final String getNexusNameForLogs(){ final StringBuilder msg = new StringBuilder(); msg.append(getSystemStatus().getAppName()); msg.append( " " ).append( getSystemStatus().getVersion() ); return msg.toString(); }
public void start() throws StartingException { try { startService(); } catch ( Exception e ) { throw new StartingException( "Could not start Nexus!", e ); } }
public void stop() throws StoppingException { try { stopService(); } catch ( Exception e ) { throw new StoppingException( "Could not stop Nexus!", e ); } }
protected void stopService() throws Exception { applicationStatusSource.getSystemStatus().setState( SystemState.STOPPING ); // Due to no dependency mechanism in NX for components, we need to fire off a hint about shutdown first eventBus.post( new NexusStoppingEvent( this ) ); nexusScheduler.shutdown(); eventBus.post( new NexusStoppedEvent( this ) ); nexusConfiguration.dropInternals(); securitySystem.stop(); applicationStatusSource.getSystemStatus().setState( SystemState.STOPPED ); // Now a cleanup, to kill dangling thread of HttpClients CustomMultiThreadedHttpConnectionManager.shutdownAll(); getLogger().info( "Stopped {}", getNexusNameForLogs()); }