ApplicationContext getBean= new ClassPathXmlApplicationContext("META-INF/Version.xml"); Version ver=(Version)getBean.getBean("Version"); return ver.getRelease();
public static String getRelease() { if( getVersionProperties().isEmpty() ) return null; if( getReleaseBuild() == null || getReleaseBuild().isEmpty() ) return String.format( "%s", getReleaseFull() ); else return String.format( "%s-%s", getReleaseFull(), getReleaseBuild() ); }
private static String buildURL() { String baseURL = System.getProperty( UPDATE_URL, "" ); if( baseURL.isEmpty() ) { String releaseBuild = Version.getReleaseBuild(); // if wip, only test if a newer wip version is available if( releaseBuild != null && releaseBuild.contains( "wip" ) ) baseURL = "http://files.concurrentinc.com/cascading/"; else baseURL = "http://files.cascading.org/cascading/"; } if( !baseURL.endsWith( "/" ) ) baseURL += "/"; baseURL = String.format( "%s%s/%s", baseURL, Version.getReleaseMajor(), UPDATE_PROPERTIES ); return baseURL; }
public static String getReleaseFull() { String releaseFull; if( getReleaseMinor() == null || getReleaseMinor().isEmpty() ) releaseFull = getReleaseMajor(); else releaseFull = String.format( "%s.%s", getReleaseMajor(), getReleaseMinor() ); return releaseFull; }
public static boolean hasAllVersionInfo() { return !Util.isEmpty( getReleaseBuild() ) && hasMajorMinorVersionInfo(); }
public static String getProductVersion() { return createReleaseVersion( cascading.util.Version.getReleaseFull(), cascading.util.Version.getReleaseBuild() ); }
public boolean checkForUpdate() if( !Version.hasMajorMinorVersionInfo() ) return true; boolean isCurrentWip = Version.getReleaseFull() != null && Version.getReleaseFull().contains( "wip" ); boolean isCurrentDev = Version.getReleaseFull() == null || Version.getReleaseFull().contains( "wip-dev" ); String latestMinor = latestProperties.getProperty( Version.CASCADING_RELEASE_MINOR ); boolean isSameMajorRelease = equals( Version.getReleaseMajor(), latestMajor ); boolean isSameMinorRelease = equals( Version.getReleaseMinor(), latestMinor );
sb.append( urlEncode( Version.CASCADING ) ); sb.append( "&version=" ); sb.append( urlEncode( Version.getReleaseFull() ) ); sb.append( "&version-build=" ); sb.append( urlEncode( Version.getReleaseBuild() ) ); sb.append( "&frameworks=" ); sb.append( urlEncode( getProperty( AppProps.APP_FRAMEWORKS ) ) );
public static boolean hasMajorMinorVersionInfo() { return !Util.isEmpty( getReleaseMinor() ) && !Util.isEmpty( getReleaseMajor() ); }
@Override public PlatformInfo getPlatformInfo() { return new PlatformInfo( "local", "Xplenty, Inc.", Version.getRelease() ); }
public static String getVersionString() { if( getVersionProperties().isEmpty() ) return null; String releaseVersion; if( getReleaseBuild() == null || getReleaseBuild().isEmpty() ) releaseVersion = String.format( "%s %s", CASCADING, getReleaseFull() ); else releaseVersion = String.format( "%s %s-%s", CASCADING, getReleaseFull(), getReleaseBuild() ); return releaseVersion; }
public void writeStats( PlannerContext plannerContext, RuleResult ruleResult ) { Path path = getPlanStatsPath(); if( path == null ) return; File file = path.resolve( String.format( "planner-stats-%s-%s.txt", ruleResult.getRegistry().getName(), ruleResult.getResultStatus() ) ).toFile(); processLogger.logInfo( "writing planner stats to: {}", file ); file.getParentFile().mkdirs(); try( PrintWriter writer = new PrintWriter( file ) ) { Flow flow = plannerContext.getFlow(); Map<Object, Object> configAsProperties = flow.getConfigAsProperties(); writer.format( "cascading version: %s, build: %s\n", emptyOrValue( Version.getReleaseFull() ), emptyOrValue( Version.getReleaseBuild() ) ); writer.format( "application id: %s\n", emptyOrValue( AppProps.getApplicationID( configAsProperties ) ) ); writer.format( "application name: %s\n", emptyOrValue( AppProps.getApplicationName( configAsProperties ) ) ); writer.format( "application version: %s\n", emptyOrValue( AppProps.getApplicationVersion( configAsProperties ) ) ); writer.format( "platform: %s\n", emptyOrValue( flow.getPlatformInfo() ) ); writer.format( "frameworks: %s\n", emptyOrValue( AppProps.getApplicationFrameworks( configAsProperties ) ) ); writer.println(); ruleResult.writeStats( writer ); } catch( IOException exception ) { processLogger.logError( "could not write stats", exception ); } }
String versionString = Version.getRelease();
/** * Constructor ProcessFlow creates a new ProcessFlow instance. * * @param properties of type Map * @param name of type String * @param process of type P * @param flowDescriptor pf type LinkedHashMap */ @ConstructorProperties({"properties", "name", "process", "flowDescriptor"}) public ProcessFlow( Map<Object, Object> properties, String name, Process process, Map<String, String> flowDescriptor ) { super( new PlatformInfo( "process", "Xplenty, Inc.", Version.getRelease() ), properties, null, name, flowDescriptor ); this.process = process; this.processWrapper = new ProcessWrapper( this.process ); this.properties = properties; setName( name ); setTapFromProcess(); initProcessConfig(); initStats(); }
String versionString = Version.getRelease();
String versionString = Version.getRelease();
String versionString = Version.getRelease();
String versionString = Version.getRelease();