protected String getSenderId() { SystemStatus status = applicationStatusSource.getSystemStatus(); if ( platformEditionShort == null || !platformEditionShort.equals( status.getEditionShort() ) || userAgentPlatformInfo == null ) { // make it "remember" to be able to detect license changes later platformEditionShort = status.getEditionShort(); userAgentPlatformInfo = new StringBuilder( "Nexus/" ).append( status.getVersion() ).append( " (" ) .append( status.getEditionShort() ).append( "; " ).append( System.getProperty( "os.name" ) ) .append( "; " ).append( System.getProperty( "os.version" ) ).append( "; " ) .append( System.getProperty( "os.arch" ) ).append( "; " ) .append( System.getProperty( "java.version" ) ).append( ") " ).toString(); } return userAgentPlatformInfo; }
protected synchronized String getUserAgentPlatformInfo() { // TODO: this is a workaround, see NXCM-363 SystemStatus status = applicationStatusSource.getSystemStatus(); if ( platformEditionShort == null || !platformEditionShort.equals( status.getEditionShort() ) || userAgentPlatformInfo == null ) { platformEditionShort = status.getEditionShort(); userAgentPlatformInfo = new StringBuilder( "Nexus/" ).append( status.getVersion() ).append( " (" ).append( status.getEditionShort() ).append( "; " ).append( System.getProperty( "os.name" ) ).append( "; " ).append( System.getProperty( "os.version" ) ).append( "; " ).append( System.getProperty( "os.arch" ) ).append( "; " ).append( System.getProperty( "java.version" ) ).append( ")" ).toString(); } return userAgentPlatformInfo; }
protected void inspect(Event<?> evt) { if (evt instanceof NexusStartedEvent) { getFeedRecorder().addSystemEvent( FeedRecorder.SYSTEM_BOOT_ACTION, "Started Nexus (version " + getApplicationStatusSource().getSystemStatus().getVersion() + " " + getApplicationStatusSource().getSystemStatus().getEditionShort() + ")"); } else if (evt instanceof NexusStoppedEvent) { getFeedRecorder().addSystemEvent( FeedRecorder.SYSTEM_BOOT_ACTION, "Stopping Nexus (version " + getApplicationStatusSource().getSystemStatus().getVersion() + " " + getApplicationStatusSource().getSystemStatus().getEditionShort() + ")"); getFeedRecorder().shutdown(); } }
resource.setEditionShort(status.getEditionShort());
resource.setEditionShort( status.getEditionShort() );