public class AppProps extends Props
Flow
may or may not be required to have set. These properties are typically passed to a Flow
via a FlowConnector
.
New property settings that may be set in Cascading 2 are application name, version, and any tags.
See addTag(String)
for examples of using tags to help manage an application.
In prior releases, the FlowConnector was responsible for setting the "application jar" class or path. Those
methods have been deprecated and moved to AppProps.Modifier and Type | Field and Description |
---|---|
static String |
APP_FRAMEWORKS |
static String |
APP_ID |
static String |
APP_JAR_CLASS |
static String |
APP_JAR_PATH |
static String |
APP_NAME |
static String |
APP_TAGS |
static String |
APP_VERSION |
protected Set<String> |
frameworks |
protected Class |
jarClass |
protected String |
jarPath |
protected String |
name |
protected Set<String> |
tags |
protected String |
version |
Constructor and Description |
---|
AppProps() |
AppProps(String name,
String version)
Sets the name and version of this application.
|
Modifier and Type | Method and Description |
---|---|
static void |
addApplicationFramework(Map<Object,Object> properties,
String framework)
Adds a framework "name:version" string to the property set and to the System properties.
|
static void |
addApplicationTag(Map<Object,Object> properties,
String tag) |
AppProps |
addFramework(String framework)
Method addFramework adds a new framework name to the list of frameworks used.
|
AppProps |
addFramework(String framework,
String version)
Method addFramework adds a new framework name and its version to the list of frameworks used.
|
AppProps |
addFrameworks(String... frameworks)
Method addFrameworks adds new framework names to the list of frameworks used.
|
protected void |
addPropertiesTo(Properties properties) |
AppProps |
addTag(String tag)
Method addTag will associate a "tag" with this application.
|
AppProps |
addTags(String... tags)
Method addTags will associate the given "tags" with this application.
|
static AppProps |
appProps()
Creates a new AppProps instance.
|
static String |
getApplicationFrameworks(Map<Object,Object> properties) |
static String |
getApplicationID() |
static String |
getApplicationID(Map<Object,Object> properties) |
static Class |
getApplicationJarClass(Map<Object,Object> properties)
Method getApplicationJarClass returns the Class set by the setApplicationJarClass method.
|
static String |
getApplicationJarPath(Map<Object,Object> properties)
Method getApplicationJarPath return the path set by the setApplicationJarPath method.
|
static String |
getApplicationName(Map<Object,Object> properties) |
static String |
getApplicationTags(Map<Object,Object> properties) |
static String |
getApplicationVersion(Map<Object,Object> properties) |
String |
getFrameworks()
Method getFrameworks returns a list of frameworks used to build this App.
|
String |
getTags() |
static void |
resetAppID()
Sets the static appID value to null.
|
static void |
setApplicationID(Map<Object,Object> properties) |
static void |
setApplicationJarClass(Map<Object,Object> properties,
Class type)
Method setApplicationJarClass is used to set the application jar file.
|
static void |
setApplicationJarPath(Map<Object,Object> properties,
String path)
Method setApplicationJarPath is used to set the application jar file.
|
static void |
setApplicationName(Map<Object,Object> properties,
String name) |
static void |
setApplicationVersion(Map<Object,Object> properties,
String version) |
AppProps |
setJarClass(Class jarClass)
Method setJarClass is used to set the application jar file.
|
AppProps |
setJarPath(String jarPath)
Method setJarPath is used to set the application jar file.
|
AppProps |
setName(String name)
Method setName sets the application name.
|
AppProps |
setVersion(String version)
Method setVersion sets the application version.
|
buildProperties, buildProperties, buildProperties, buildProperties, setProperties, setProperties
public static final String APP_ID
public static final String APP_NAME
public static final String APP_VERSION
public static final String APP_TAGS
public static final String APP_FRAMEWORKS
public static final String APP_JAR_CLASS
public static final String APP_JAR_PATH
protected Set<String> frameworks
public AppProps()
public static AppProps appProps()
public static void setApplicationJarClass(Map<Object,Object> properties, Class type)
setApplicationJarPath(java.util.Map, String)
, otherwise ClassNotFound exceptions are likely.properties
- of type Maptype
- of type Classpublic static Class getApplicationJarClass(Map<Object,Object> properties)
properties
- of type Mappublic static void setApplicationJarPath(Map<Object,Object> properties, String path)
setApplicationJarClass(java.util.Map, Class)
or
setApplicationJarPath(java.util.Map, String), otherwise ClassNotFound exceptions are likely.properties
- of type Mappath
- of type Stringpublic static String getApplicationJarPath(Map<Object,Object> properties)
properties
- of type Mappublic static void setApplicationID(Map<Object,Object> properties)
public static String getApplicationID(Map<Object,Object> properties)
public static String getApplicationID()
public static void resetAppID()
public static void setApplicationName(Map<Object,Object> properties, String name)
public static String getApplicationName(Map<Object,Object> properties)
public static void setApplicationVersion(Map<Object,Object> properties, String version)
public static String getApplicationVersion(Map<Object,Object> properties)
public static void addApplicationTag(Map<Object,Object> properties, String tag)
public static String getApplicationTags(Map<Object,Object> properties)
public static void addApplicationFramework(Map<Object,Object> properties, String framework)
properties
- may be null, additionally adds to System propertiesframework
- "name:version" Stringpublic static String getApplicationFrameworks(Map<Object,Object> properties)
public AppProps setName(String name)
name
- type Stringpublic AppProps setVersion(String version)
version
- type Stringpublic AppProps addTag(String tag)
tag
- type Stringpublic AppProps addTags(String... tags)
tags
- type Stringpublic String getFrameworks()
public AppProps addFramework(String framework)
foo-flow-builder:1.2.3
.
See addFramework(String, String)
.framework
- A Stringpublic AppProps addFramework(String framework, String version)
foo-flow-builder:1.2.3
.framework
- A Stringpublic AppProps addFrameworks(String... frameworks)
foo-flow-builder:1.2.3
.frameworks
- Stringspublic AppProps setJarClass(Class jarClass)
setApplicationJarPath(java.util.Map, String)
, otherwise ClassNotFound exceptions are likely.jarClass
- of type Classpublic AppProps setJarPath(String jarPath)
setJarClass(Class)
or
setJarPath(java.util.Map, String), otherwise ClassNotFound exceptions are likely.jarPath
- of type Stringprotected void addPropertiesTo(Properties properties)
addPropertiesTo
in class Props
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.