cascading.property

## Class AppProps

- java.lang.Object
- - cascading.property.Props
  - - cascading.property.AppProps

    public class AppProps
    extends Props

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`.

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.

### Field Summary

Fields
`static java.lang.String` `APP_FRAMEWORKS`
`static java.lang.String` `APP_ID`
`static java.lang.String` `APP_JAR_CLASS`
`static java.lang.String` `APP_JAR_PATH`
`static java.lang.String` `APP_NAME`
`static java.lang.String` `APP_TAGS`
`static java.lang.String` `APP_VERSION`
`protected java.util.Set<java.lang.String>` `frameworks`
`protected java.lang.Class` `jarClass`
`protected java.lang.String` `jarPath`
`protected java.lang.String` `name`
`protected java.util.Set<java.lang.String>` `tags`
`protected java.lang.String` `version`

### Constructor Summary

Constructors
Constructor and Description
`AppProps()`
`AppProps(java.lang.String name, java.lang.String version)` Sets the name and version of this application.

### Method Summary

Methods
`static void` `addApplicationFramework(java.util.Map<java.lang.Object,java.lang.Object> properties, java.lang.String framework)` Adds a framework "name:version" string to the property set and to the System properties.
`static void` `addApplicationTag(java.util.Map<java.lang.Object,java.lang.Object> properties, java.lang.String tag)`
`AppProps` `addFramework(java.lang.String framework)` Method addFramework adds a new framework name to the list of frameworks used.
`AppProps` `addFramework(java.lang.String framework, java.lang.String version)` Method addFramework adds a new framework name and its version to the list of frameworks used.
`AppProps` `addFrameworks(java.lang.String... frameworks)` Method addFrameworks adds new framework names to the list of frameworks used.
`protected void` `addPropertiesTo(java.util.Properties properties)`
`AppProps` `addTag(java.lang.String tag)` Method addTag will associate a "tag" with this application.
`AppProps` `addTags(java.lang.String... tags)` Method addTags will associate the given "tags" with this application.
`static AppProps` `appProps()` Creates a new AppProps instance.
`static java.lang.String` `getApplicationFrameworks(java.util.Map<java.lang.Object,java.lang.Object> properties)`
`static java.lang.String` `getApplicationID()`
`static java.lang.String` `getApplicationID(java.util.Map<java.lang.Object,java.lang.Object> properties)`
`static java.lang.Class` `getApplicationJarClass(java.util.Map<java.lang.Object,java.lang.Object> properties)` Method getApplicationJarClass returns the Class set by the setApplicationJarClass method.
`static java.lang.String` `getApplicationJarPath(java.util.Map<java.lang.Object,java.lang.Object> properties)` Method getApplicationJarPath return the path set by the setApplicationJarPath method.
`static java.lang.String` `getApplicationName(java.util.Map<java.lang.Object,java.lang.Object> properties)`
`static java.lang.String` `getApplicationTags(java.util.Map<java.lang.Object,java.lang.Object> properties)`
`static java.lang.String` `getApplicationVersion(java.util.Map<java.lang.Object,java.lang.Object> properties)`
`java.lang.String` `getFrameworks()` Method getFrameworks returns a list of frameworks used to build this App.
`java.lang.String` `getTags()`
`static void` `resetAppID()` Sets the static appID value to null.
`static void` `setApplicationID(java.util.Map<java.lang.Object,java.lang.Object> properties)`
`static void` `setApplicationJarClass(java.util.Map<java.lang.Object,java.lang.Object> properties, java.lang.Class type)` Method setApplicationJarClass is used to set the application jar file.
`static void` `setApplicationJarPath(java.util.Map<java.lang.Object,java.lang.Object> properties, java.lang.String path)` Method setApplicationJarPath is used to set the application jar file.
`static void` `setApplicationName(java.util.Map<java.lang.Object,java.lang.Object> properties, java.lang.String name)`
`static void` `setApplicationVersion(java.util.Map<java.lang.Object,java.lang.Object> properties, java.lang.String version)`
`AppProps` `setJarClass(java.lang.Class jarClass)` Method setJarClass is used to set the application jar file.
`AppProps` `setJarPath(java.lang.String jarPath)` Method setJarPath is used to set the application jar file.
`AppProps` `setName(java.lang.String name)` Method setName sets the application name.
`AppProps` `setVersion(java.lang.String version)` Method setVersion sets the application 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

#### APP_ID

    public static final java.lang.String APP_ID

See Also:
  Constant Field Values

#### APP_NAME

    public static final java.lang.String APP_NAME

See Also:
  Constant Field Values

#### APP_VERSION

    public static final java.lang.String APP_VERSION

See Also:
  Constant Field Values

#### APP_TAGS

    public static final java.lang.String APP_TAGS

See Also:
  Constant Field Values

#### APP_FRAMEWORKS

    public static final java.lang.String APP_FRAMEWORKS

See Also:
  Constant Field Values

#### APP_JAR_CLASS

    public static final java.lang.String APP_JAR_CLASS

See Also:
  Constant Field Values

#### APP_JAR_PATH

    public static final java.lang.String APP_JAR_PATH

See Also:
  Constant Field Values

#### name

    protected java.lang.String name

#### version

    protected java.lang.String version

#### tags

    protected java.util.Set<java.lang.String> tags

#### jarClass

    protected java.lang.Class jarClass

#### jarPath

    protected java.lang.String jarPath

#### frameworks

    protected java.util.Set<java.lang.String> frameworks

### Constructor Detail

#### AppProps

    public AppProps()

#### AppProps

    public AppProps(java.lang.String name,
            java.lang.String version)

Sets the name and version of this application.

Parameters:
  `name` - of type String
  `version` - of type String

### Method Detail

#### appProps

    public static AppProps appProps()

Creates a new AppProps instance.

Returns:
  AppProps instance

#### setApplicationJarClass

    public static void setApplicationJarClass(java.util.Map<java.lang.Object,java.lang.Object> properties,
                              java.lang.Class type)

Method setApplicationJarClass is used to set the application jar file. All cluster executed Cascading applications need to call setApplicationJarClass(java.util.Map, Class) or `setApplicationJarPath(java.util.Map, String)`, otherwise ClassNotFound exceptions are likely.

Parameters:
  `properties` - of type Map
  `type` - of type Class

#### getApplicationJarClass

    public static java.lang.Class getApplicationJarClass(java.util.Map<java.lang.Object,java.lang.Object> properties)

Method getApplicationJarClass returns the Class set by the setApplicationJarClass method.

Parameters:
  `properties` - of type Map<Object, Object>
Returns:
  Class

#### setApplicationJarPath

    public static void setApplicationJarPath(java.util.Map<java.lang.Object,java.lang.Object> properties,
                             java.lang.String path)

Method setApplicationJarPath is used to set the application jar file. All cluster executed Cascading applications need to call `setApplicationJarClass(java.util.Map, Class)` or setApplicationJarPath(java.util.Map, String), otherwise ClassNotFound exceptions are likely.

Parameters:
  `properties` - of type Map
  `path` - of type String

#### getApplicationJarPath

    public static java.lang.String getApplicationJarPath(java.util.Map<java.lang.Object,java.lang.Object> properties)

Method getApplicationJarPath return the path set by the setApplicationJarPath method.

Parameters:
  `properties` - of type Map<Object, Object>
Returns:
  String

#### setApplicationID

    public static void setApplicationID(java.util.Map<java.lang.Object,java.lang.Object> properties)

#### getApplicationID

    public static java.lang.String getApplicationID(java.util.Map<java.lang.Object,java.lang.Object> properties)

#### getApplicationID

    public static java.lang.String getApplicationID()

#### resetAppID

    public static void resetAppID()

Sets the static appID value to null. For debugging purposes.

#### setApplicationName

    public static void setApplicationName(java.util.Map<java.lang.Object,java.lang.Object> properties,
                          java.lang.String name)

#### getApplicationName

    public static java.lang.String getApplicationName(java.util.Map<java.lang.Object,java.lang.Object> properties)

#### setApplicationVersion

    public static void setApplicationVersion(java.util.Map<java.lang.Object,java.lang.Object> properties,
                             java.lang.String version)

#### getApplicationVersion

    public static java.lang.String getApplicationVersion(java.util.Map<java.lang.Object,java.lang.Object> properties)

#### addApplicationTag

    public static void addApplicationTag(java.util.Map<java.lang.Object,java.lang.Object> properties,
                         java.lang.String tag)

#### getApplicationTags

    public static java.lang.String getApplicationTags(java.util.Map<java.lang.Object,java.lang.Object> properties)

#### addApplicationFramework

    public static void addApplicationFramework(java.util.Map<java.lang.Object,java.lang.Object> properties,
                               java.lang.String framework)

Adds a framework "name:version" string to the property set and to the System properties.

Properties may be null. Duplicates are removed.

Parameters:
  `properties` - may be null, additionally adds to System properties
  `framework` - "name:version" String

#### getApplicationFrameworks

    public static java.lang.String getApplicationFrameworks(java.util.Map<java.lang.Object,java.lang.Object> properties)

#### setName

    public AppProps setName(java.lang.String name)

Method setName sets the application name.

By default the application name is derived from the jar name (values before the version in most Maven compatible jars).

Parameters:
  `name` - type String
Returns:
  this

#### setVersion

    public AppProps setVersion(java.lang.String version)

Method setVersion sets the application version.

By default the application version is derived from the jar name (values after the name in most Maven compatible jars).

Parameters:
  `version` - type String
Returns:
  this

#### getTags

    public java.lang.String getTags()

#### addTag

    public AppProps addTag(java.lang.String tag)

Method addTag will associate a "tag" with this application. Applications can have an unlimited number of tags.

Tags allow applications to be searched and organized by management tools.

Tag values are opaque, but adopting a simple convention of 'category:value' allows for complex use cases.

Some recommendations for categories are:

<lli>cluster: - the cluster name the application is or should be run against. A name could be logical, like QA or PROD.</lli> <lli>project: - the project name, possibly a JIRA project name this application is managed under.</lli> <lli>org: - the group, team or organization that is responsible for the application.</lli> <lli>support: - the email address of the user who should be notified of failures or issues.</lli>

Note that tags should not contain whitespace characters, even though this is not an error, a warning will be issues.

Parameters:
  `tag` - type String
Returns:
  this

#### addTags

    public AppProps addTags(java.lang.String... tags)

Method addTags will associate the given "tags" with this application. Applications can have an unlimited number of tags.

Tags allow applications to be searched and organized by management tools.

Tag values are opaque, but adopting a simple convention of 'category:value' allows for complex use cases.

Some recommendations for categories are:

<lli>cluster: - the cluster name the application is or should be run against. A name could be logical, like QA or PROD.</lli> <lli>project: - the project name, possibly a JIRA project name this application is managed under.</lli> <lli>org: - the group, team or organization that is responsible for the application.</lli> <lli>support: - the email address of the user who should be notified of failures or issues.</lli>

Note that tags should not contain whitespace characters, even though this is not an error, a warning will be issues.

Parameters:
  `tags` - type String
Returns:
  this

#### getFrameworks

    public java.lang.String getFrameworks()

Method getFrameworks returns a list of frameworks used to build this App.

Returns:
  Registered frameworks

#### addFramework

    public AppProps addFramework(java.lang.String framework)

Method addFramework adds a new framework name to the list of frameworks used.

Higher level tools should register themselves, and preferably with their version, for example `foo-flow-builder:1.2.3`.

See `addFramework(String, String)`.

Parameters:
  `framework` - A String
Returns:
  this AppProps instance

#### addFramework

    public AppProps addFramework(java.lang.String framework,
                        java.lang.String version)

Method addFramework adds a new framework name and its version to the list of frameworks used.

Higher level tools should register themselves, and preferably with their version, for example `foo-flow-builder:1.2.3`.

Parameters:
  `framework` - A String
Returns:
  this AppProps instance

#### addFrameworks

    public AppProps addFrameworks(java.lang.String... frameworks)

Method addFrameworks adds new framework names to the list of frameworks used.

Higher level tools should register themselves, and preferably with their version, for example `foo-flow-builder:1.2.3`.

Parameters:
  `frameworks` - Strings
Returns:
  this AppProps instance

#### setJarClass

    public AppProps setJarClass(java.lang.Class jarClass)

Method setJarClass is used to set the application jar file. All cluster executed Cascading applications need to call setApplicationJarClass(java.util.Map, Class) or `setApplicationJarPath(java.util.Map, String)`, otherwise ClassNotFound exceptions are likely.

Parameters:
  `jarClass` - of type Class

#### setJarPath

    public AppProps setJarPath(java.lang.String jarPath)

Method setJarPath is used to set the application jar file. All cluster executed Cascading applications need to call `setJarClass(Class)` or setJarPath(java.util.Map, String), otherwise ClassNotFound exceptions are likely.

Parameters:
  `jarPath` - of type String

#### addPropertiesTo

    protected void addPropertiesTo(java.util.Properties properties)

Specified by:
  `addPropertiesTo` in class `Props`