/** * Returns the version of Speedment that was used to generate the code. If * this does not correspond with the version of the runtime, then a warning * will be shown when Speedment is started. * <p> * The version has the following structure: * <pre>{@code speedment:3.0.21-SNAPSHOT}</pre> * First comes the name of the edition (simply {@code speedment} for the * open-source edition) followed by a comma and the Maven version. * <p> * If this value is not present, it should be read as the generated version * being unknown. This probably means that it was generated with an older * version of Speedment than {@code 3.0.21} in the case of the open-source * edition. * * @return the speedment version * @since 3.0.21 */ default Optional<String> getSpeedmentVersion() { return getAsString(SPEEDMENT_VERSION); }
/** * Returns the name of the company that should be used in generated code. * * @return the name of the company generating code */ default String getCompanyName() { return getAsString(COMPANY_NAME).orElse(DEFAULT_COMPANY_NAME); }
/** * Returns the path to the configuration file for this project. The * path may not be set at the time of the calling and the result may * therefore be {@code empty}. * * @return the path to the configuration file */ default Optional<Path> getConfigPath() { return getAsString(CONFIG_PATH).map(Paths::get); }
/** * Returns where the code generated for this project will be located. * * @return the package location */ default String getPackageLocation() { return getAsString(PACKAGE_LOCATION).orElse(DEFAULT_PACKAGE_LOCATION); }
/** * Returns the unique id for this application. This is usually generated on * application launch. The value should be formatted as a * {@link java.util.UUID}. * * @return the app id */ default String getAppId() { return getAsString(APP_ID).orElseThrow( () -> new SpeedmentConfigException( "All applications must have an 'appId' property." ) ); }