|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.property.Props cascading.property.AppProps
public class AppProps
Class AppProps is a fluent helper for setting various application level properties that every
Flow
may or may not be required to have set. These properties are typically passed to a Flow
via a FlowConnector
.
Field Summary | |
---|---|
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 Summary | |
---|---|
AppProps()
|
|
AppProps(String name,
String version)
Sets the name and version of this application. |
Method Summary | |
---|---|
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)
Adds a new framework name to the list of frameworks used. |
AppProps |
addFramework(String framework,
String version)
Adds a new framework name and its version to the list of frameworks used. |
AppProps |
addFrameworks(String... frameworks)
Adds new framework names to the list of frameworks used. |
protected void |
addPropertiesTo(Properties properties)
|
AppProps |
addTag(String tag)
|
AppProps |
addTags(String... tags)
|
static AppProps |
appProps()
|
static String |
getApplicationFrameworks(Map<Object,Object> properties)
|
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()
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)
|
AppProps |
setVersion(String version)
|
Methods inherited from class cascading.property.Props |
---|
buildProperties, buildProperties, buildProperties, buildProperties, setProperties, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 String name
protected String version
protected Set<String> tags
protected Class jarClass
protected String jarPath
protected Set<String> frameworks
Constructor Detail |
---|
public AppProps()
public AppProps(String name, String version)
name
- of type Stringversion
- of type StringMethod Detail |
---|
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 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)
public AppProps setVersion(String version)
public String getTags()
public AppProps addTag(String tag)
public AppProps addTags(String... tags)
public String getFrameworks()
public AppProps addFramework(String framework)
foo-flow-builder:1.2.3
.
See addFramework(String, String)
.
framework
- A String
public AppProps addFramework(String framework, String version)
foo-flow-builder:1.2.3
.
framework
- A String
public AppProps addFrameworks(String... frameworks)
foo-flow-builder:1.2.3
.
frameworks
- Strings
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |