entry : annotationAttributes.entrySet()) {
+ Object resolvedValue = entry.getValue();
+ if (entry.getKey().equals(ATTRIBUTE_MESSAGE_NAME)
+ && ((String) entry.getValue()).matches(JSR_DEFAULT_MESSAGE_REGEX)) {
+ resolvedValue = this.resolveMessage((String) entry.getValue(), annotatedElement, annotation);
}
+ map.put(entry.getKey(), resolvedValue);
}
return map;
}
+ private String resolveMessage(String initialMessageValue, AnnotatedElement annotatedElement,
+ Annotation annotation) {
+ String key = this.replacePattern.matcher(initialMessageValue).replaceAll("${messageKey}");
+ String overriddenDefault = this.propertyResolver.getProperty(key);
+ if (null != overriddenDefault) {
+ return overriddenDefault;
+ }
+ return this.resolveDefaultMessage(initialMessageValue, annotatedElement, annotation);
+ }
+
+ private String resolveDefaultMessage(String initialMessageValue, AnnotatedElement annotatedElement,
+ Annotation annotation) {
+ String key = this.replacePattern.matcher(initialMessageValue).replaceAll("${messageKey}");
+ try {
+ return this.defaultMessagesBundle.getString(key);
+ } catch (MissingResourceException mre) {
+ String annotationName = ANNOTATION_PREFIX + annotation.annotationType().getSimpleName();
+ LOG.warn(() -> "Default message not defined for " + initialMessageValue
+ + ". It is likely validation logic is not supported for " + annotationName
+ + ". Please consider opening a feature request for " + annotationName
+ + " validation support or remove " + annotationName + " from " + annotatedElement + ".");
+ return initialMessageValue;
+ } catch (ClassCastException cce) {
+ throw new FrameworkRuntimeException("Unable to resolve default mesage for " + initialMessageValue, cce);
+ }
+ }
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/AssociatedEntity.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/AssociatedEntity.java
index c2bdbeaba..e38e8890c 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/AssociatedEntity.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/AssociatedEntity.java
@@ -36,18 +36,18 @@
public Class> clazz() default Class.class;
- public AssociationType association() default AssociationType.none;
+ public AssociationType association() default AssociationType.NONE;
public FetchType fetch() default FetchType.EAGER;
public CascadeType cascade() default CascadeType.ALL;
public enum AssociationType {
- oneToOne,
- oneToMany,
- manyToOne,
- manyToMany,
- none;
+ ONE_TO_ONE,
+ ONE_TO_MANY,
+ MANY_TO_ONE,
+ MANY_TO_MANY,
+ NONE;
}
public enum FetchType {
EAGER,
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/ConfigLoadException.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/ConfigLoadException.java
index 1f5fcdabe..877e3cad4 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/ConfigLoadException.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/ConfigLoadException.java
@@ -31,16 +31,4 @@ public ConfigLoadException(String message) {
super(message);
}
- public ConfigLoadException(Throwable cause) {
- super(cause);
- }
-
- public ConfigLoadException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public ConfigLoadException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
- super(message, cause, enableSuppression, writableStackTrace);
- }
-
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/Constants.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/Constants.java
index e3e2b3f17..abca48c4e 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/Constants.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/Constants.java
@@ -99,10 +99,13 @@ public enum Constants {
SEARCH_REQ_PROJECT_MAPPING_MARKER("projection.mapsTo"),
SEARCH_REQ_AGGREGATE_MARKER("aggregate"),
+ SEARCH_REQ_AGGREGATE_PIPELINE("pipeline"),
SEARCH_REQ_AGGREGATE_COUNT("count"),
SEARCH_REQ_FETCH_MARKER("fetch"),
SEARCH_REQ_ORDERBY_MARKER("orderby"),
+ SEARCH_REQ_ORDERBY_DESC_MARKER("desc()"),
+ SEARCH_REQ_ORDERBY_ASC_MARKER("asc()"),
SEARCH_REQ_WHERE_MARKER("where"),
SEARCH_REQ_PAGINATION_SIZE("pageSize"),
@@ -110,7 +113,10 @@ public enum Constants {
SEARCH_REQ_PAGINATION_SORT_PROPERTY("sortBy"),
SEARCH_NAMED_QUERY_DELIMTER("~~"),
- SEARCH_NAMED_QUERY_RESULT("result");
+ SEARCH_NAMED_QUERY_RESULT("result"),
+ HTTP_RESPONSEBODY_INTERCEPTOR_HEADER("responseBody"),
+ HTTP_RESPONSEBODY_INTERCEPTOR_HEADER_RAW("_raw");
+
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/Repo.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/Repo.java
index c2021fe26..0ff040496 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/Repo.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/Repo.java
@@ -21,6 +21,9 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
/**
* @author Soham Chakravarti
*
@@ -58,6 +61,11 @@ public static boolean exists(Repo repo) {
return repo!=null && repo.cache()!=Repo.Cache.rep_none;
}
}
+
+ public enum Remote {
+ rep_remote_ws,
+ rep_remote_none;
+ }
String alias() default "";
@@ -66,6 +74,8 @@ public static boolean exists(Repo repo) {
Cache cache() default Cache.rep_device;
+ Remote remote() default Remote.rep_remote_ws;
+
boolean autoSave() default true;
NamedNativeQuery[] namedNativeQueries() default {};
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/ViewConfig.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/ViewConfig.java
index e127bb0de..1be8f6e65 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/ViewConfig.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/ViewConfig.java
@@ -21,11 +21,13 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.validation.constraints.Future;
+import javax.validation.constraints.Past;
+
import com.antheminc.oss.nimbus.domain.Event;
import com.antheminc.oss.nimbus.domain.defn.event.StateEvent.OnStateLoad;
import com.antheminc.oss.nimbus.domain.defn.extension.ParamContext;
-
import lombok.Getter;
import lombok.Setter;
@@ -45,20 +47,13 @@
public class ViewConfig {
/**
- * **
- *
- * Accordion groups a collection of contents in tabs.
+ * **
Accordion groups a collection of contents in tabs.
*
- *
- * Expected Field Structure
+ *
Expected Field Structure
*
- *
- * Accordion will be rendered when annotating a field nested under one of the
- * following components:
- *
- * - {@link Form}
- * - {@link Section}
- *
+ * Accordion will be rendered when annotating a field nested under one
+ * of the following components:
- {@link Form}
+ * - {@link Section}
*
*/
@Retention(RetentionPolicy.RUNTIME)
@@ -70,40 +65,33 @@ public class ViewConfig {
String alias() default "Accordion";
/**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "panel-default";
boolean multiple() default false;
boolean showExpandAll() default false;
-
+
boolean showMessages() default false;
}
/**
- *
- * AccordionTab is the section of Accordion.
+ *
AccordionTab contains a collection of contents for an individual
+ * section within an Accordion.
*
- *
- * Expected Field Structure
+ *
Expected Field Structure
*
- *
- * AccordionTab should be used to decorate a field in a class that has been
- * decorated with Accordion.
- *
- *
- * AccordionTab will render nested fields in the same manner declared directly
- * under a {@link Form} component
+ *
AccordionTab should be used to decorate a field in a class that has
+ * been decorated with Accordion.
AccordionTab will render nested
+ * fields in the same manner declared directly under a {@link Form}
+ * component
*
- *
- * AccordionTab used within a {@link Section} component, should contain fields
- * decorated with one or more of the following components:
- *
- * - {@link CardDetail}
- * - {@link ButtonGroup}
- * - {@link Grid}
+ *
AccordionTab used within a {@link Section} component, should contain
+ * fields decorated with one or more of the following components:
+ * - {@link CardDetail}
- {@link ButtonGroup}
- {@link Grid}
*
*
* @since 1.0
@@ -115,8 +103,9 @@ public class ViewConfig {
String alias() default "AccordionTab";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "panel-default";
@@ -146,8 +135,9 @@ public enum Type {
String alias() default "ActionTray";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -168,8 +158,9 @@ public enum Type {
String alias() default "Assessment";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "text-sm-right";
}
@@ -186,8 +177,9 @@ public enum Type {
String alias() default "breadCrumb";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -197,51 +189,10 @@ public enum Type {
boolean postEventOnChange() default false;
}
-
-
- /**
- *
Expected Field Structure
- *
- *
TreeGrid will be rendered when annotating a field nested under one of
- * the following components:
- {@link Section}
- * - {@link Form}
- *
- */
-
- @Retention(RetentionPolicy.RUNTIME)
- @Target({ ElementType.FIELD })
- @ViewStyle
- public @interface TreeGrid {
- String alias() default "TreeGrid";
- /**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
- */
- String cssClass() default "";
- }
-
-
- /**
- *
Expected Field Structure
- *
- *
Child entities that are within TreeGrid should be annotated with this.
- */
-
- @Retention(RetentionPolicy.RUNTIME)
- @Target({ ElementType.FIELD })
- @ViewStyle
- public @interface TreeGridChild {
- String alias() default "TreeGridChild";
- /**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
- */
- String cssClass() default "";
- }
-
/**
- *
Expected Field Structure
+ *
Button is an extension to the standard button input element with icons
+ * and theming.
Expected Field Structure
*
*
Button will be rendered when annotating a field nested under one of
* the following components:
- {@link ActionTray}
@@ -257,7 +208,21 @@ public enum Type {
@ViewStyle
public @interface Button {
public enum Style {
- DESTRUCTIVE, PLAIN, PRIMARY, SECONDARY, VALIDATION;
+ DESTRUCTIVE, PLAIN, PRIMARY,
+
+ /**
+ * Opens a print dialog with the rendered HTML content
+ * represented by this button's {@link Button#printPath()}.
A
+ * path should be provided to a component that supports printing.
+ * The following components are supported to be targeted using
+ * {@code printPath}:
- {@link Accordion}
+ * - {@link CardDetails}
- {@link CardDetailsGrid}
+ * - {@link Form}
- {@link Grid}
+ * - {@link Modal}
- {@link Page}
+ * - {@link Section}
- {@link Tile}
+ * @see PrintConfig
+ */
+ PRINT, SECONDARY, VALIDATION;
}
public enum Type {
@@ -271,8 +236,9 @@ public enum Type {
boolean browserBack() default false;
/**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -286,6 +252,17 @@ public enum Type {
String payload() default "";
+ /**
+ *
Used to determine the HTML DOM content to print when
+ * {@link #style()} is set to {@link Style#PRINT}.
The format of
+ * {@code printPath} should start with {@code /} and the domain value
+ * ({@code refId} is not needed). For example:
+ * {@code "/domain/page/tile/section"}
If {@code printPath} is not
+ * provided, the top most page that this button is declared within will
+ * be used as the printable content.
+ */
+ String printPath() default "";
+
Style style() default Style.PLAIN;
String title() default "";
@@ -296,7 +273,7 @@ public enum Type {
}
/**
- *
Container for buttons
+ *
ButtonGroup contains a collection of Button components.
*
*
Expected Field Structure
*
@@ -316,13 +293,16 @@ public enum Type {
String alias() default "ButtonGroup";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "text-sm-center";
}
/**
+ *
Calendar is an input component to select a date.
+ *
*
Expected Field Structure
*
*
Calendar will be rendered when annotating a field nested under one of
@@ -330,8 +310,8 @@ public enum Type {
*
*
Calendar should decorate a field having a simple type.
*
- *
Additionally you can restrict calendar input as Past or Future Date by Annotating
- * javax provided {@link Past} or {@link Future} respectively
+ * Additionally you can restrict calendar input as Past or Future Date by
+ * Annotating javax provided {@link Past} or {@link Future} respectively
*
* @since 1.0
*/
@@ -341,14 +321,19 @@ public enum Type {
public @interface Calendar {
String alias() default "Calendar";
+ String cols() default "";
+
String controlId() default "";
/**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+ boolean dataEntryField() default true;
+
String help() default "";
String hourFormat() default "12";
@@ -372,12 +357,12 @@ public enum Type {
boolean yearNavigator() default false;
String yearRange() default "1910:2050";
-
- String cols() default "";
}
/**
+ *
CardDetail is a flexible container component.
+ *
*
Expected Field Structure
*
*
CardDetail will be rendered when annotating a field nested under one
@@ -415,8 +400,9 @@ public enum Type {
String alias() default "CardDetailsBody";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply
+ * additional styling, if necessary.
*/
String cssClass() default "";
}
@@ -441,8 +427,9 @@ public enum Type {
String alias() default "CardDetailsHeader";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply
+ * additional styling, if necessary.
*/
String cssClass() default "";
}
@@ -459,38 +446,44 @@ public enum Type {
String alias() default "CardDetailsTag";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply
+ * additional styling, if necessary.
*/
String cssClass() default "";
}
-
- String alias() default "CardDetail";
- boolean expandable() default false;
+ String alias() default "CardDetail";
boolean border() default false;
-
+
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
- String cssClass() default "";
+ String cssClass() default "";
boolean draggable() default false;
boolean editable() default false;
+ boolean expandable() default false;
+
String imgSrc() default "";
String modelPath() default "";
}
/**
+ *
CardDetailsGrid contains a collection of {@link CardDetail}
+ * components.
+ *
*
Expected Field Structure
*
*
CardDetailsGrid will be rendered when annotating a field nested under
- * one of the following components:
- {@link Accordion}
- {@link Section}
+ * one of the following components:
+ * - {@link Accordion}
- {@link Section}
*
* A field decorated with @CardDetailsGrid should be an object
* containing one or more fields. Each of these fields would represent a
@@ -507,8 +500,9 @@ public enum Type {
String alias() default "CardDetailsGrid";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -520,6 +514,8 @@ public enum Type {
}
/**
+ *
Checkbox is an extension to standard checkbox element.
+ *
*
Expected Field Structure
*
*
CheckBox will be rendered when annotating a field nested under one of
@@ -535,25 +531,30 @@ public enum Type {
public @interface CheckBox {
String alias() default "CheckBox";
+ String cols() default "";
+
String controlId() default "";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+ boolean dataEntryField() default true;
+
String help() default "";
String labelClass() default "anthem-label";
boolean postEventOnChange() default false;
-
- String cols() default "";
}
/**
+ *
CheckBoxGroup is used for multi-select {@link Che components.
+ *
*
Expected Field Structure
*
*
CheckBoxGroup will be rendered when annotating a field nested under
@@ -569,14 +570,19 @@ public enum Type {
public @interface CheckBoxGroup {
String alias() default "CheckBoxGroup";
+ String cols() default "";
+
String controlId() default "";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+ boolean dataEntryField() default true;
+
String help() default "";
String labelClass() default "anthem-label";
@@ -584,73 +590,16 @@ public enum Type {
String level() default "0";
boolean postEventOnChange() default false;
-
- String cols() default "";
}
-
- /**
- *
Expected Field Structure
- *
- *
InputSwitch will be rendered when annotating a field nested under one of the
- * following components:
- {@link Form}
- {@link Section}
- *
- * InputSwitch should decorate a field having a simple type.
- *
- *
If no orientation is specified, it's considered as DEFAULT. On the need basis
- * orientation can be supplied as the LEFT or RIGHT.
- *
- *
orientation description:
- DEFAULT orientation places the component right next
- * to the Label.
- LEFT orientation places the component left to the Label.
- RIGHT
- * orientation places the component little away from the Label.
- *
- * @since 1.1
- */
- @Retention(RetentionPolicy.RUNTIME)
- @Target({ElementType.FIELD})
- @ViewStyle
- public @interface InputSwitch {
-
- /**
- * Type of orientation.
- *
- */
- public enum Type {
- LEFT,
- RIGHT,
- DEFAULT
- }
- String alias() default "InputSwitch";
-
- String controlId() default "";
-
- /**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
- */
- String cssClass() default "";
-
- /**
- * postEventOnChange flag, by default is false.
- * When it's set to true, posts the state changes on this component to the server.
- *
- */
- boolean postEventOnChange() default false;
-
- /**
- * It describes the Type of orientation, Accepted values can be InputSwitch.Type.LEFT,
- * InputSwitch.Type.RIGHT, InputSwitch.Type.DEFAULT
- *
- */
- InputSwitch.Type orientation() default InputSwitch.Type.DEFAULT;
- }
/**
+ *
Combobox is used to select an item from a collection of options.
*
Expected Field Structure
*
*
ComboBox will be rendered when annotating a field nested under one of
* the following components:
- {@link Form}
- Layout
- * Domain
- {@link GlobalNavMenu}
- {@link Section}
+ * Domain
- {@link Section}
*
* ComboBox should decorate a field having a simple type.
*
@@ -662,14 +611,19 @@ public enum Type {
public @interface ComboBox {
String alias() default "ComboBox";
+ String cols() default "";
+
String controlId() default "";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+ boolean dataEntryField() default true;
+
String help() default "";
String labelClass() default "anthem-label";
@@ -679,8 +633,6 @@ public enum Type {
boolean postEventOnChange() default false;
boolean readOnly() default false;
-
- String cols() default "";
}
@@ -723,6 +675,8 @@ public enum Type {
}
/**
+ *
FieldValue is a container for displaying a single value.
+ *
*
Expected Field Structure
*
*
FieldValue will be rendered when annotating a field nested under one
@@ -779,8 +733,9 @@ public enum Type {
String cols() default "4";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -815,6 +770,9 @@ public enum Type {
}
/**
+ *
FieldValue is a container for displaying a logical grouping of
+ * multiple {@link FieldValue} components.
+ *
*
Expected Field Structure
*
*
FieldValueGroup is a grouping of FieldValues. Used in scenarios where
@@ -834,13 +792,17 @@ public enum Type {
String cols() default "1";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
}
/**
+ *
FileUpload is an advanced uploader with dragdrop support, multi file
+ * uploads, auto uploading, progress tracking and validations.
+ *
*
Expected Field Structure
*
*
FileUpload will be rendered when annotating a field nested under one
@@ -848,12 +810,18 @@ public enum Type {
*
*
FileUpload should decorate a field having a simple type.
*
- *
Meta data can be sent along with the file contents by making use of metaData attribute. Example configuration:
- *
@FileUpload(url="${cueIntegration.fileUploadUrl}", type= ".jpeg,.png", metaData= "memberId")
- * And {@code memberId} can be configured as a hidden attribute inside form.
+ *
Meta data can be sent along with the file contents by making use of
+ * metaData attribute. Example configuration:
+ *
+ *
+ * @FileUpload(url="${cueIntegration.fileUploadUrl}", type= ".jpeg,.png", metaData= "memberId")
+ *
+ *
+ * And {@code memberId} can be configured as a hidden attribute inside
+ * form.
*
- *
More than one item can be sent by configuring as comma separated values:
- * {@code metaData= "memberId,subscriberId"}
+ *
More than one item can be sent by configuring as comma separated
+ * values: {@code metaData= "memberId,subscriberId"}
*
* @since 1.0
*/
@@ -867,14 +835,19 @@ public enum ControlType {
String alias() default "FileUpload";
+ String cols() default "";
+
ControlType controlType() default ControlType.FORMCONTROL;
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+ boolean dataEntryField() default true;
+
String metaData() default "";
boolean multiple() default true;
@@ -882,13 +855,14 @@ public enum ControlType {
String type() default ".pdf,.png";
String url() default "";
-
- String cols() default "";
}
/**
- *
+ *
FilterButton is an extension to the standard button input element with
+ * icons and theming related to filtering activities.
+ *
+ *
*
* @since 1.0
*/
@@ -897,12 +871,13 @@ public enum ControlType {
@ViewStyle
public @interface FilterButton {
String alias() default "FilterButton";
-
+
String b() default "$execute";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "btn btn-primary";
@@ -930,26 +905,34 @@ public enum Property {
}
/**
+ *
A Form is an HTML form container for user input contents.
+ *
*
Expected Field Structure
*
*
Form will be rendered when annotating a field nested under one of the
* following components:
*
* Form will render nested fields that are decorated with:
- * - {@link FormElementGroup}
- * - {@link Accordion}
- {@link Button}
- * - {@link ButtonGroup}
- {@link Calendar}
- * - {@link CheckBox}
- {@link CheckBoxGroup}
- * - {@link ComboBox}
- {@link FileUpload}
- * - {@link Grid}
- {@link Header}
- * - {@link MultiSelect}
- {@link MultiSelectCard}
+ * - {@link FormElementGroup}
- {@link Accordion}
+ * - {@link Button}
- {@link ButtonGroup}
+ * - {@link Calendar}
- {@link CheckBox}
+ * - {@link CheckBoxGroup}
- {@link ComboBox}
+ * - {@link FileUpload}
- {@link Grid}
- {@link Header}
+ * - {@link MultiSelect}
- {@link MultiSelectCard}
* - {@link Paragraph}
- {@link PickList}
* - {@link Radio}
- {@link Signature}
- * - {@link TextArea}
- {@link TextBox}
+ * - {@link TextArea}
- {@link TextBox}
+ * - {@link InputMask}
+ * {@link Radio} {@link RichText}
+ * {@link Signature} {@link TextArea}
+ * {@link TextBox}
+
*
- * *Note: Nested class fields will not be rendered in the same manner as
- * fields declared directly under the Form decorated field. This is a change from previous version.
- * The nesting/grouping should be annotated with {@link FormElementGroup} where the elements need to be grouped.
+ *
*Note: Nested class fields will not be rendered in the same
+ * manner as fields declared directly under the Form decorated field. This
+ * is a change from previous version. The nesting/grouping should be
+ * annotated with {@link FormElementGroup} where the elements need to be
+ * grouped.
*
* @since 1.0
*/
@@ -959,37 +942,37 @@ public enum Property {
public @interface Form {
String alias() default "Form";
+ String b() default ""; // remove
+
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
- String b() default ""; // remove
+ boolean manualValidation() default false;
String navLink() default ""; // remove
+ boolean showMessages() default false;
+
boolean submitButton() default true; // remove
String submitUrl() default ""; // remove
-
- boolean showMessages() default false;
-
- boolean manualValidation() default false;
}
-
+
/**
*
Expected Field Structure
*
- *
FormElementGroup will be rendered when annotating a field nested under one of the
- * following components:
+ * FormElementGroup will be rendered when annotating a field nested under
+ * one of the following components:
*
- * FormElementGroup will render nested fields that are decorated with:
- * - {@link Calendar}
- * - {@link CheckBox}
- {@link CheckBoxGroup}
- * - {@link ComboBox}
- {@link FileUpload}
- * - {@link Header}
- * - {@link MultiSelect}
- {@link MultiSelectCard}
+ * FormElementGroup will render nested fields that are decorated with:
+ *
- {@link Calendar}
- {@link CheckBox}
+ * - {@link CheckBoxGroup}
- {@link ComboBox}
+ * - {@link FileUpload}
- {@link Header}
+ * - {@link MultiSelect}
- {@link MultiSelectCard}
* - {@link Paragraph}
- {@link PickList}
* - {@link Radio}
- {@link Signature}
* - {@link TextArea}
- {@link TextBox}
@@ -1002,22 +985,24 @@ public enum Property {
public @interface FormElementGroup {
String alias() default "FormElementGroup";
+ String cols() default "1";
+
/**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
-
- String cols() default "1";
}
-
+
/**
*
Expected Field Structure
*
- *
FormGridFiller will be rendered when annotating a field nested under one of the
- * following components:
+ * FormGridFiller will be rendered when annotating a field nested under
+ * one of the following components:
*
- * FormGridFiller is a filler that is placed in a form layout for empty cells.
+ *
FormGridFiller is a filler that is placed in a form layout for empty
+ * cells.
*
* @since 1.1
*/
@@ -1027,13 +1012,14 @@ public enum Property {
public @interface FormGridFiller {
String alias() default "FormGridFiller";
+ String cols() default "";
+
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
-
- String cols() default "";
}
/**
@@ -1052,8 +1038,9 @@ public enum Property {
String alias() default "Footer";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
}
@@ -1074,8 +1061,9 @@ public enum Property {
String alias() default "Global-Header";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
}
@@ -1087,7 +1075,8 @@ public enum Property {
* one of the following components:
*
* @since 1.0
- * @deprecated As of 1.1.7 onwards, {@code GlobalNavMenu} will no longer be rendered in the UI. Use {@link MenuPanel} instead.
+ * @deprecated As of 1.1.7 onwards, {@code GlobalNavMenu} will no longer be
+ * rendered in the UI. Use {@link MenuPanel} instead.
*/
@Deprecated
@Retention(RetentionPolicy.RUNTIME)
@@ -1098,8 +1087,9 @@ public enum Property {
String alias() default "Global-Nav-Menu";
/**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
}
@@ -1116,8 +1106,9 @@ public enum Property {
String alias() default "globalSection";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -1125,6 +1116,8 @@ public enum Property {
}
/**
+ *
Grid is a table container capable of displaying tabular data.
+ *
*
Expected Field Structure
*
*
Grid will be rendered when annotating a field nested under one of the
@@ -1151,11 +1144,20 @@ public enum Property {
boolean clearAllFilters() default false;
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+ boolean dataEntryField() default true;
+
+ /**
+ *
As of release 1.1.9, {@code dataKey} is no longer needed to
+ * support grid row expansion. This attribute will be removed in the
+ * future releases.
+ */
+ @Deprecated
String dataKey() default "id";
boolean expandableRows() default false;
@@ -1179,8 +1181,20 @@ public enum Property {
String postButtonLabel() default "";
String postButtonTargetPath() default "";
-
+
+ /**
+ * @deprecated As of 1.1.11 onwards, {@code postButtonUrl} will no longer
+ * represent the absolute path to make a http call for rowselection from UI.
+ * Replaced with {@link postButtonUri} attribute instead.
+ */
+ @Deprecated
String postButtonUrl() default "";
+
+ /**
+ * Represents the relative path of the postButton on a rowselection Grid.
+ * Can use similar notation as url attribute of @Config for relative path to param i.e, '../',
+ */
+ String postButtonUri() default "";
boolean postEventOnChange() default false;
@@ -1189,9 +1203,21 @@ public enum Property {
boolean showHeader() default true;
String url() default "";
+
+ /**
+ * @Since 1.1.11
+ * Setting this to true will enable to select all the records in the dataset i.e across all pages
+ * within a table when selectAll checkbox in the header is checked.
+ * Default behavior is to select all the records only within the current
+ * page of the table when the table is paginated.
+ */
+ boolean headerCheckboxToggleAllPages() default false;
}
/**
+ *
GridColumn is a container for displaying a single value within a
+ * {@link Grid}.
+ *
*
Expected Field Structure
*
*
GridColumn will be rendered when annotating a field within a
@@ -1286,8 +1312,13 @@ public enum SortAs {
boolean applyValueStyles() default false;
/**
- *
The date/time components to include when displaying this
- * component, using predefined options or a custom format string.
+ * Custom Style for column
+ */
+ String cssClass() default "";
+
+ /**
+ *
The date/time components to include when displaying this
+ * component, using predefined options or a custom format string.
*
Generally speaking, a standard date format is acceptable as a
* value. Transformation logic is handled by Angular's DatePipe. See Angular DatePipe
@@ -1368,6 +1399,9 @@ public enum SortAs {
}
/**
+ * GridRowBody is used to display additional content about the row data
+ * within a {@link Grid}.
+ *
*
Expected Field Structure
*
*
The field decorated with @GridRowBody is rendered using the same
@@ -1393,13 +1427,17 @@ public enum SortAs {
boolean asynchronous() default false;
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
}
/**
+ *
Header is a container with a text header, equivalent to an HTML
+ * header.
+ *
*
Expected Field Structure
*
*
Header will be rendered when annotating a field nested under one of
@@ -1420,8 +1458,9 @@ public enum Size {
String alias() default "Header";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -1429,7 +1468,7 @@ public enum Size {
}
/**
- *
+ *
*
* @since 1.0
*/
@@ -1445,7 +1484,15 @@ public enum AlignOptions {
}
/**
+ *
Image is a container that renders an HTML image.
+ *
+ *
Expected Field Structure
+ *
+ *
Image will be rendered in accordance to the rules of a component that
+ * uses as an attribute within it's annotation definition.
*
+ *
Image will have no effect when directly decorating a type and is
+ * typically used as an annotation attribute.
*
* @since 1.0
*/
@@ -1461,8 +1508,9 @@ public enum Type {
String alias() default "Image";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -1485,6 +1533,9 @@ public enum Type {
String alias() default "initialize";
}
+ /**
+ *
+ */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD })
@ViewStyle
@@ -1492,14 +1543,76 @@ public enum Type {
String alias() default "InPlaceEdit";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
String type() default "text";
}
+ /**
+ *
Expected Field Structure
+ *
+ *
InputSwitch will be rendered when annotating a field nested under one
+ * of the following components:
- {@link Form}
+ * - {@link Section}
+ *
+ * InputSwitch should decorate a field having a simple type.
+ *
+ *
If no orientation is specified, it's considered as DEFAULT. On the
+ * need basis orientation can be supplied as the LEFT or RIGHT.
+ *
+ *
orientation description:
- DEFAULT orientation places the
+ * component right next to the Label.
- LEFT orientation places the
+ * component left to the Label.
- RIGHT orientation places the
+ * component little away from the Label.
+ *
+ * @since 1.1
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface InputSwitch {
+
+ /**
+ * Type of orientation.
+ *
+ */
+ public enum Type {
+ DEFAULT, LEFT, RIGHT, DOWN
+ }
+
+ String alias() default "InputSwitch";
+
+ String controlId() default "";
+
+ /**
+ * CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
+ */
+ String cssClass() default "";
+
+ boolean dataEntryField() default true;
+
+ /**
+ * It describes the Type of orientation, Accepted values can be
+ * InputSwitch.Type.LEFT, InputSwitch.Type.RIGHT,
+ * InputSwitch.Type.DOWN, InputSwitch.Type.DEFAULT
+ *
+ */
+ InputSwitch.Type orientation() default InputSwitch.Type.DEFAULT;
+
+ /**
+ * postEventOnChange flag, by default is false. When it's set to true,
+ * posts the state changes on this component to the server.
+ *
+ */
+ boolean postEventOnChange() default false;
+ }
+
/**
*
*
@@ -1512,8 +1625,9 @@ public enum Type {
String alias() default "LinearGauge";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -1523,6 +1637,9 @@ public enum Type {
}
/**
+ *
Link is a hyperlink component used for navigation or user interaction
+ * of displayed text.
+ *
*
Expected Field Structure
*
*
Link will be rendered when annotating a field nested under one of the
@@ -1550,8 +1667,9 @@ public enum Type {
String b() default "$executeAnd$nav";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -1566,9 +1684,13 @@ public enum Type {
String url() default "";
Type value() default Type.DEFAULT;
+
}
/**
+ *
LinkMenu is a dropdown component used for displaying links within a
+ * {@link Grid} row.
+ *
*
Expected Field Structure
*
*
LinkMenu will be rendered when annotating a field nested under one of
@@ -1586,8 +1708,9 @@ public enum Type {
String alias() default "LinkMenu";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "dropdownTrigger";
@@ -1597,6 +1720,8 @@ public enum Type {
}
/**
+ *
Menu is a container intended to display other navigation components.
+ *
*
Expected Field Structure
*
*
Menu will be rendered when annotating a field nested under one of the
@@ -1618,8 +1743,9 @@ public enum Type {
String alias() default "Menu";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -1646,6 +1772,26 @@ public enum Type {
@ViewStyle
public @interface MenuLink {
+ /**
+ *
Link Types that define the behavior of the {@link MenuLink}
+ * component.
+ * @author Tony Lopez
+ * @since 1.1
+ */
+ public static enum Type {
+ /**
+ *
External links are links that navigate to another site,
+ * different from the single page application.
+ */
+ EXTERNAL,
+
+ /**
+ *
Internal links are links that navigate within the single page
+ * application.
+ */
+ INTERNAL;
+ }
+
String alias() default "MenuLink";
/**
@@ -1701,26 +1847,6 @@ public enum Type {
* component.
*/
String url() default "";
-
- /**
- *
Link Types that define the behavior of the {@link MenuLink}
- * component.
- * @author Tony Lopez
- * @since 1.1
- */
- public static enum Type {
- /**
- *
Internal links are links that navigate within the single page
- * application.
- */
- INTERNAL,
-
- /**
- *
External links are links that navigate to another site,
- * different from the single page application.
- */
- EXTERNAL;
- }
}
/**
@@ -1733,7 +1859,7 @@ public static enum Type {
*
- {@link MenuPanel}
- {@link Page}
*
* MenuPanel will render nested fields that are decorated with:
- * - {@link MenuPanel}
- {@link MenuLink}
+ * {@link MenuLink} {@link MenuPanel}
* @since 1.1
*/
@Retention(RetentionPolicy.RUNTIME)
@@ -1741,6 +1867,26 @@ public static enum Type {
@ViewStyle
public @interface MenuPanel {
+ /**
+ * Link Types that define the behavior of the {@link MenuPanel}
+ * component.
+ * @author Tony Lopez
+ * @since 1.1
+ */
+ public static enum Type {
+ /**
+ *
External links are links that navigate to another site,
+ * different from the single page application.
+ */
+ EXTERNAL,
+
+ /**
+ *
Internal links are links that navigate within the single page
+ * application.
+ */
+ INTERNAL;
+ }
+
String alias() default "MenuPanel";
/**
@@ -1784,39 +1930,21 @@ public static enum Type {
* component.
*/
String url() default "";
-
- /**
- *
Link Types that define the behavior of the {@link MenuPanel}
- * component.
- * @author Tony Lopez
- * @since 1.1
- */
- public static enum Type {
- /**
- *
Internal links are links that navigate within the single page
- * application.
- */
- INTERNAL,
-
- /**
- *
External links are links that navigate to another site,
- * different from the single page application.
- */
- EXTERNAL;
- }
}
-
+
/**
- *
Renders a popup window with content defined by the nested fields
- * within the field that is decorated with @Modal.
+ *
Modal is a container to display content in an overlay window.
*
*
Expected Field Structure
*
*
Modal will be rendered when annotating a field nested under one of the
* following components:
*
+ * Modal will render nested fields that are decorated with:
+ *
* Notes:
- Default contextual properties are set by
- * ModalStateEventHandler during the OnStateLoad
+ * ModalStateEventHandler during the {@code OnStateLoad}
* event.
*
* @since 1.0
@@ -1840,8 +1968,9 @@ public enum Type {
ParamContext context() default @ParamContext(enabled = true, visible = false);
/**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default ""; // new
@@ -1882,8 +2011,9 @@ public enum Options {
String alias() default "MultiGrid";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "question-header";
@@ -1895,12 +2025,7 @@ public enum Options {
}
/**
- *
Expected Field Structure
- *
- *
MultiSelect will be rendered when annotating a field nested under one
- * of the following components:
- *
- * MultiSelect should decorate an array or collection.
+ *
*
* @since 1.0
*/
@@ -1910,9 +2035,12 @@ public enum Options {
public @interface MultiSelect {
String alias() default "MultiSelect";
+ String cols() default "";
+
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -1922,17 +2050,12 @@ public enum Options {
boolean postEventOnChange() default false;
- String cols() default "";
+ boolean dataEntryField() default true;
}
/**
- *
Expected Field Structure
- *
- *
MultiSelectCard will be rendered when annotating a field nested under
- * one of the following components:
- *
- * MultiSelectCard should decorate an array or collection.
+ *
*
* @since 1.0
*/
@@ -1943,13 +2066,18 @@ public enum Options {
String alias() default "MultiSelectCard";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+
+ boolean dataEntryField() default true;
}
/**
+ *
Page is a container component that groups a collection of contents.
+ *
*
Expected Field Structure
*
*
Page will be rendered when annotating a field nested under one of the
@@ -1967,8 +2095,9 @@ public enum Options {
String alias() default "Page";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -1977,6 +2106,8 @@ public enum Options {
String imgSrc() default "";
String route() default ""; // remove
+
+ boolean fixLayout() default false;
}
/**
@@ -1996,6 +2127,8 @@ public enum Property {
}
/**
+ *
Paragraph is a container for displaying text content.
+ *
*
Expected Field Structure
*
*
Paragraph will be rendered when annotating a field nested under one of
@@ -2014,33 +2147,39 @@ public enum Property {
String alias() default "Paragraph";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
}
/**
+ *
PickList is used to reorder items between different lists.
+ *
*
Expected Field Structure
*
*
PickList will be rendered when annotating a field nested under one of
* the following components:
*
- * PickList should decorate a complex type, with its nested param annotated as {@link PickListSelected}.
- *
Ex :
+ *
PickList should decorate a complex type, with its nested param
+ * annotated as {@link PickListSelected}.
Ex :
+ *
*
- * @PickList(sourceHeader="Available Category", targetHeader="Selected Category")
- * @Values(value=A_Category.class)
- * private PicklistType category;
- *
- * @Getter @Setter @Type(SomeClass.class)
- * public static class PicklistType {
- * @Values(value=AllCategory.class)
- * @Path("category")
- * @PickListSelected(postEventOnChange=true)
- * private String[] selected;
- * }
- *
+ * @PickList(sourceHeader = "Available Category", targetHeader = "Selected Category")
+ * @Values(value = A_Category.class)
+ * private PicklistType category;
+ *
+ * @Getter
+ * @Setter
+ * @Type(SomeClass.class)
+ * public static class PicklistType {
+ * @Values(value = AllCategory.class)
+ * @Path("category")
+ * @PickListSelected(postEventOnChange = true)
+ * private String[] selected;
+ * }
+ *
*
*
* @since 1.0
@@ -2051,102 +2190,311 @@ public enum Property {
public @interface PickList {
String alias() default "PickList";
+ String cols() default "";
+
/**
- * CSS classes added here will be added to the container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to the container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
-
+
+ boolean dataEntryField() default true;
+
String help() default "";
String labelClass() default "anthem-label";
boolean readOnly() default false;
- String sourceHeader() default "SourceList";
-
- String targetHeader() default "TargetList";
-
/**
- *
When {@code true}, the sort controls on source list are shown on the UI
+ *
When {@code true}, the sort controls on source list are shown on
+ * the UI
*/
boolean showSourceControls() default false;
-
+
/**
- *
When {@code true}, the sort controls on target list are shown on the UI
+ *
When {@code true}, the sort controls on target list are shown on
+ * the UI
*/
boolean showTargetControls() default false;
-
- String cols() default "";
+
+ String sourceHeader() default "SourceList";
+
+ String targetHeader() default "TargetList";
}
-
+
/**
*
Expected Field Structure
*
- *
PickListSelected will be rendered when annotating a field nested under one of the following components:
- *
+ * PickListSelected will be rendered when annotating a field nested under
+ * one of the following components:
*
- * PickListSelected should decorate an array or collection
- *
A comprehensive list of {@link @Values} on a given {@link PickList} should be annotated on the PickListSelected field
- * so that a map for all code-label pairs will be available for the chosen items.
+ *
PickListSelected should decorate an array or collection
A
+ * comprehensive list of {@link @Values} on a given {@link PickList} should
+ * be annotated on the PickListSelected field so that a map for all
+ * code-label pairs will be available for the chosen items.
*
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME)
- @Target({ElementType.FIELD})
+ @Target({ ElementType.FIELD })
@ViewStyle
public @interface PickListSelected {
-
+
String alias() default "PickListSelected";
-
+
/**
- *
When {@code true} and the value of this component is changed on the client, the updated
- * value will be sent to the server.
+ *
When {@code true} and the value of this component is changed on
+ * the client, the updated value will be sent to the server.
*/
boolean postEventOnChange() default false;
-
+
}
/**
- *
Expected Field Structure
+ *
Defines print configuration for a {@link ViewStyle} component.
*
- *
Radio will be rendered when annotating a field nested under one of the
- * following components:
+ * {@code PrintConfig} should decorate a field that is also decorated
+ * with {@link Button}.
*
- *
Radio should decorate a field having a simple type.
+ *
Sample Usage
*
- * @since 1.0
+ *
+ * @Button(style = Button.Style.PRINT)
+ * @PrintConfig(autoPrint = false)
+ * private String print;
+ *
+ *
+ * @author Tony Lopez
+ * @since 1.1
+ *
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD })
- @ViewStyle
- public @interface Radio {
- String alias() default "Radio";
+ @ViewParamBehavior
+ public @interface PrintConfig {
- String controlId() default "";
+ /**
+ * Whether or not to open the print dialog immediately after the
+ * print window/tab is opened.
+ */
+ boolean autoPrint() default true;
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
Whether or not to close the opened browser window/tab containing
+ * the printable content after the user completes actions within the
+ * native browser print dialog.
*/
- String cssClass() default "";
+ boolean closeAfterPrint() default true;
- String help() default "";
+ /**
+ *
The delay (in milliseconds) between when the browser opens a new
+ * window/tab containing the printable content and when the browser
+ * opens the native print dialog.
The {@code delay} will be applied
+ * only when {@link #useDelay()} is {@code true}.
+ */
+ int delay() default 300;
- String labelClass() default "anthem-label";
+ /**
+ *
A relative URI of a stylesheet that should be applied to the
+ * printable content. The URI's provided are relative to the server
+ * context of the client application. For example,
+ * {@code "/styles/sheet1.css"} would resolve to:
+ * {@code http://localhost:8080/appcontext/styles/sheet1.css}
*Note:
+ * The protocol, host, port, and context are client specific.
If
+ * providing a very large stylesheet, it may be necessary to modify the
+ * {@link delay} property so that the stylesheet have time to load prior
+ * to the print actions taking place.
+ */
+ String stylesheet() default "";
- String level() default "0";
+ /**
+ *
Whether or not to include the single page application styles with
+ * the printable content.
This feature is experimental and may be
+ * removed in the future.
+ */
+ boolean useAppStyles() default false;
+
+ /**
+ *
Whether or not to use the {@link delay} setting.
If
+ * {@link #stylesheet()} is provided as a non-empty array,
+ * {@code useDelay} will be set to {@code true} regardless of the value
+ * set.
+ */
+ boolean useDelay() default true;
+ }
+
+ /**
+ *
Radio is an extension to standard radio button element.
+ *
+ *
Expected Field Structure
+ *
+ *
Radio will be rendered when annotating a field nested under one of the
+ * following components:
+ *
+ * Radio should decorate a field having a simple type.
+ *
+ * @since 1.0
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface Radio {
+ String alias() default "Radio";
- boolean postEventOnChange() default false;
-
String cols() default "";
+ String controlId() default "";
+
+ /**
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
+ */
+ String cssClass() default "";
+
+ boolean dataEntryField() default true;
+
+ String help() default "";
+
+ String labelClass() default "anthem-label";
+
+ String level() default "0";
+
+ boolean postEventOnChange() default false;
+
+ }
+
+ /**
+ *
RichText is a rich text editor.
+ *
+ *
Expected Field Structure
+ *
+ *
RichText will be rendered when annotating a field nested under one of
+ * the following components:
+ *
+ * RichText should decorate a field having a simple type.
+ *
+ * @since 1.2
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface RichText {
+
+ public enum ToolbarFeature {
+ ALIGN, BACKGROUND, BLOCKQUOTE, BOLD, CLEAN, CODE, CODE_BLOCK, COLOR, DIRECTION, FONT, HEADER, IMAGE, INDENT,
+ /**
+ *
Adds a combobox to the toolbar. Selected values from the
+ * combobox will be inserted into the editor's last known cursor
+ * position (at the start if untouched).
Values can be
+ * supplied by decorating the field with {@link Values}.
+ */
+ VALUES_COMBOBOX, ITALIC, LINK, LIST, SCRIPT, SIZE, STRIKE, UNDERLINE, VIDEO;
+ }
+
+ String alias() default "RichText";
+
+ /**
+ * Drives the size of the component by how many columns it occupies
+ * on the UI.
+ */
+ String cols() default "";
+
+ String controlId() default "";
+
+ /**
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
+ */
+ String cssClass() default "";
+
+ /**
+ *
Whether or not this field should be considered a user-input field.
+ */
+ boolean dataEntryField() default true;
+
+ /**
+ *
Whitelist of formats to display, see here for available
+ * options.
+ */
+ String formats() default "";
+
+ /**
+ *
Placeholder text to show when editor is empty.
+ */
+ String placeholder() default "";
+
+ /**
+ *
When {@code true} and the value of this component is changed on
+ * the client, the updated value will be sent to the server.
+ */
+ boolean postEventOnChange() default false;
+
+ /**
+ *
Marks if this rich text box should be used in readonly mode. Using this mode will
+ * simply display a readonly text field with the rich text formatting preserved.
+ */
+ boolean readOnly() default false;
+
+ /**
+ *
The features to include when rendering the toolbar.
Features
+ * will be rendered in the order they are configured.
+ */
+ ToolbarFeature[] toolbarFeatures() default { ToolbarFeature.HEADER, ToolbarFeature.FONT, ToolbarFeature.BOLD,
+ ToolbarFeature.ITALIC, ToolbarFeature.UNDERLINE, ToolbarFeature.STRIKE, ToolbarFeature.COLOR,
+ ToolbarFeature.BACKGROUND, ToolbarFeature.SCRIPT, ToolbarFeature.LIST, ToolbarFeature.INDENT,
+ ToolbarFeature.ALIGN, ToolbarFeature.LINK, ToolbarFeature.CLEAN };
+ }
+
+ /**
+ *
Fonts is a {@link ViewParamBehavior} that can be used to apply fonts
+ * to the decorated component.
+ *
+ * @since 1.2
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD, ElementType.TYPE })
+ @ViewParamBehavior
+ public static @interface Fonts {
+ String[] value() default { "Serif", "Monospace" };
+ }
+
+ /**
+ * Headings is a {@link ViewParamBehavior} that can be used to apply
+ * headings to the decorated component.
+ *
+ * @since 1.2
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewParamBehavior
+ public static @interface Headings {
+ KeyValuePair[] value() default { @KeyValuePair(key = "Heading", value = "1"),
+ @KeyValuePair(key = "Subheading", value = "2") };
+ }
+
+ /**
+ * KeyValuePair is a simple container annotation that stores key/value
+ * pair information.
+ *
+ * @since 1.2
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ public static @interface KeyValuePair {
+ String key();
+
+ String value();
}
/**
+ * Section is a container component that groups a collection of contents.
+ *
*
Expected Field Structure
*
*
Section will be rendered when annotating a field nested under one of
@@ -2155,11 +2503,11 @@ public enum Property {
*
*
*
Section will render nested fields that are decorated with:
- * - {@link AccordionMain}
- {@link Button}
+ * - {@link Accordion}
- {@link Button}
* - {@link ButtonGroup}
- {@link CardDetail}
- * - {@link CardDetailsGrid}
- {@link ComboBox}
+ * - {@link CardDetailsGrid}
- {@link Tab}
- {@link ComboBox}
* - {@link Form}
- {@link Grid}
- {@link Link}
- * - {@link Menu}
- {@link Paragraph}
+ * - {@link Menu}
- {@link Paragraph}
- {@link Chart}
* - {@link StaticText}
- {@link TextBox}
*
* @since 1.0
@@ -2177,30 +2525,32 @@ public enum Type {
String alias() default "Section";
/**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
- Type value() default Type.DEFAULT; // HEADER and LEFTBAR should be
- // removed in future
-
String imgSrc() default "";
-
+
Image.Type imgType() default Image.Type.FA;
+
+ Type value() default Type.DEFAULT; // HEADER and LEFTBAR should be
+ // removed in future
}
/**
- *
The Signature component is used to capture a user's signature using user input in the form of
- * a Data URL.
+ *
Signature is an HTML canvas element that can be used to capture
+ * signature content.
*
*
Expected Field Structure
*
*
Signature will be rendered when annotating a field nested under one of
* the following components:
*
- * Signature should decorate a field having a simple type.
- *
Sample Usage:
+ *
Signature should decorate a field having a simple type.
Sample
+ * Usage:
+ *
*
* @Signature
* private String userSignature;
@@ -2216,20 +2566,20 @@ public enum Type {
public @interface Signature {
/**
- * The strategy for how the signature drawing should be captured on the
- * UI.
+ *
The strategy for how the signature drawing should be captured on
+ * the UI.
*/
public enum CaptureType {
/**
- *
Signature data is captured in between the mouse down and mouse up
- * events.
+ *
Signature data is captured in between the mouse down and mouse
+ * up events.
*/
DEFAULT,
/**
- *
Signature data is captured upon the click event. Capturing will
- * continue until the click event is invoked a second time.
+ *
Signature data is captured upon the click event. Capturing
+ * will continue until the click event is invoked a second time.
*/
ON_CLICK;
}
@@ -2243,45 +2593,63 @@ public enum CaptureType {
* @see com.antheminc.oss.nimbus.domain.defn.ViewConfig.Signature.CaptureType
*/
CaptureType captureType() default CaptureType.DEFAULT;
+
/**
*
The label value displayed on the "clear" button.
*/
String clearLabel() default "Clear";
+
/**
- *
CSS classes added here will be added to the container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to the container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+
/**
- *
Method name from app_scripts.js is provided in scriptName, which will be triggered
- * on click of "Get updated signature" button
+ *
Tells that the control is eligible for form validations.
*/
- String scriptName() default "";
+ boolean dataEntryField() default true;
+
/**
- *
The width of the signature canvas.
+ *
The width of the signature canvas.
*/
String height() default "60";
+
/**
- *
When {@code true}, the the label and help text will be hidden for this component.
+ *
When {@code true}, the the label and help text will be hidden for
+ * this component.
*/
boolean hidden() default false;
+
/**
- *
When {@code true} and the value of this component is changed on the client, the updated
- * value will be sent to the server.
+ *
When {@code true} and the value of this component is changed on
+ * the client, the updated value will be sent to the server.
*/
boolean postEventOnChange() default false;
+
+ /**
+ *
Method name from app_scripts.js is provided in scriptName, which
+ * will be triggered on click of "Get updated signature" button
+ */
+ String scriptName() default "";
+
/**
- *
To be used by the client as a unique identifier for this component.
- *
THIS VALUE SHOULD NOT BE CHANGED!
+ *
To be used by the client as a unique identifier for this
+ * component.
THIS VALUE SHOULD NOT BE CHANGED!
*/
String type() default "signature";
+
/**
- *
The width of the signature canvas.
+ *
The width of the signature canvas.
*/
String width() default "345";
}
/**
+ *
StaticText is a container for displaying html content or text "as is"
+ * to the UI.
+ *
*
Expected Field Structure
*
*
StaticText will be rendered when annotating a field nested under one
@@ -2301,21 +2669,15 @@ public enum CaptureType {
String contentId() default "";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
}
/**
- *
Expected Field Structure
- *
- *
SubHeader will be rendered when annotating a field nested under one of
- * the following components:
- *
- * SubHeader should decorate a field having a simple type.
- *
- * @since 1.0
+ *
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD })
@@ -2324,8 +2686,9 @@ public enum CaptureType {
String alias() default "SubHeader";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "col-sm-6 pb-0 align-top"; // pb-0 is added
// for the demo.
@@ -2345,8 +2708,9 @@ public enum CaptureType {
String alias() default "TabInfo";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -2354,6 +2718,9 @@ public enum CaptureType {
}
/**
+ *
TextArea is a text input component that allows for a specified number
+ * of rows.
+ *
*
Expected Field Structure
*
*
TextArea will be rendered when annotating a field nested under one of
@@ -2373,14 +2740,19 @@ public enum CaptureType {
public @interface TextArea {
String alias() default "TextArea";
+ String cols() default "";
+
String controlId() default "";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+ boolean dataEntryField() default true;
+
String help() default "";
boolean hidden() default false;
@@ -2394,11 +2766,12 @@ public enum CaptureType {
String rows() default "5";
String type() default "textarea";
-
- String cols() default "";
+
}
/**
+ *
TextBox is a text input component.
+ *
*
Expected Field Structure
*
*
TextBox will be rendered when annotating a field nested under one of
@@ -2415,14 +2788,19 @@ public enum CaptureType {
public @interface TextBox {
String alias() default "TextBox";
+ String cols() default "";
+
String controlId() default "";
/**
- *
CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
+ boolean dataEntryField() default true;
+
String help() default "";
boolean hidden() default false;
@@ -2434,12 +2812,105 @@ public enum CaptureType {
boolean readOnly() default false;
String type() default "text";
-
- String cols() default "";
}
+
+
+ /**
+ *
InputMask is a text input component.
+ *
+ *
Expected Field Structure
+ *
+ *
InputMask will be rendered when annotating a field nested under one of
+ * the following components:
- {@link Form}
+ *
+ * InputMask should decorate a field having a simple type.
+ *
+ * @since 1.0
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface InputMask {
+ String alias() default "InputMask";
+
+ boolean dataEntryField() default true;
+
+ boolean postEventOnChange() default false;
+
+ /**
+ *
maskStyle can be used to define the restricted format user is expected to enter.
+ * For example maskStyle="99-9999" would let user enter only 6 numerical values in the i/p box.
+ */
+ String mask() default "";
+
+ /**
+ *
Please visit PrimeNG's website for details on the below parameter.
+ */
+
+ String slotChar() default "_";
+
+ /**
+ *
Please visit PrimeNG's website for details on the below parameter.
+ */
+ String charRegex() default "[A-Za-z]";
+
+
+ /**
+ *
Please visit PrimeNG's website for details on the below parameter.
+ */
+ String maskPlaceHolder() default "";
+
+ }
+
+
+
+ /**
+ *
Tab groups a collection of TabPanels in tabs.
+ *
+ *
Expected Field Structure
+ *
+ *
Tab will be rendered when annotating a field nested under one
+ * of the following components:
- {@link Tile}
+ * - {@link Section}
+ *
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface Tab {
+
+ String alias() default "Tab";
+ }
+
+
+
+ /**
+ * TabPanel is used to display content for the tabs.
+ *
TabPanel will render nested fields that are decorated with:
+ * - {@link Tab}
- {@link Section}
+ * We can have a section within a TabPanel or even a Tab to create a nested structure.
+ *
+ * Expected Field Structure
+ *
+ *
TabPanel will be rendered when annotating a field nested under one
+ * of the following components:
+ *
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface TabPanel {
+ String alias() default "TabPanel";
+
+ boolean closable() default false;
+
+ }
+
/**
+ * Tile is a container component that groups a collection of contents.
+ *
*
Expected Field Structure
*
*
Tile will be rendered when annotating a field nested under one of the
@@ -2447,7 +2918,7 @@ public enum CaptureType {
*
*
Tile will render nested fields that are decorated with:
* - {@link Header}
- {@link Modal}
- {@link Section}
- * - {@link Tile}
+ * - {@link Tile}
- {@link Tab}
*
* @since 1.0
*/
@@ -2466,8 +2937,9 @@ public enum Size {
String alias() default "Tile";
/**
- * CSS classes added here will be added to a container element surrounding this component.
- *
This can be used to apply additional styling, if necessary.
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
*/
String cssClass() default "";
@@ -2476,6 +2948,66 @@ public enum Size {
Size size() default Size.Large;
}
+ /**
+ *
TreeGrid is is used to display hierarchical data in tabular format.
+ *
+ *
Expected Field Structure
+ *
+ *
TreeGrid will be rendered when annotating a field nested under one of
+ * the following components:
- {@link Section}
+ * - {@link Form}
+ *
+ * TreeGrid will render nested fields that are decorated with:
+ * - {@link GridColumn}
- {@link LinkMenu}
+ * - {@link TreeGridChild}
+ *
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface TreeGrid {
+ String alias() default "TreeGrid";
+
+ /**
+ * CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
+ */
+ String cssClass() default "";
+
+ boolean dataEntryField() default true;
+ }
+
+ /**
+ *
TreeGridChild is the recursive child of {@link TreeGrid} and is used
+ * to display hierarchical data in tabular format.
+ *
+ *
Expected Field Structure
+ *
+ *
TreeGridChild will be rendered when annotating a field nested under
+ * one of the following components:
+ *
+ * {@code TreeGridChild} should decorate a field having a
+ * collection/array with a defined type. The type should match the
+ * collection element type of the parent field decorated with
+ * {@link TreeGrid}. Consequently, the rendered fields for
+ * {@code TreeGridChild} would be the same as those rendered for
+ * {@link TreeGrid}.
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface TreeGridChild {
+ String alias() default "TreeGridChild";
+
+ /**
+ *
CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
+ */
+ String cssClass() default "";
+ }
+
/**
*
*
@@ -2489,7 +3021,7 @@ public enum Size {
}
/**
- *
+ *
ViewRoot is the entry point for a view domain definition.
*
* @since 1.0
*/
@@ -2514,4 +3046,53 @@ public enum Size {
public @interface ViewStyle {
}
+
+ /**
+ *
Chart is readonly component with some interaction(hide/show charts when the corresponding legend is clicked.
+ *
+ *
The projection object for the chart is List
+ *
+ *
Chart will be rendered when annotating a field nested under one of
+ * the following components:
- {@link Section}
+ *
+ * @since 1.2
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.FIELD })
+ @ViewStyle
+ public @interface Chart {
+ public enum Type {
+ BAR, LINE, PIE, DOUGHNUT
+ }
+
+ String alias() default "Chart";
+
+ /**
+ * CSS classes added here will be added to a container element
+ * surrounding this component.
This can be used to apply additional
+ * styling, if necessary.
+ */
+ String cssClass() default "";
+
+ /**
+ *
Provides the title to x-axis, if the graph is cartesian
+ */
+ String xAxisLabel() default "";
+
+ /**
+ * Provides the title to y-axis, if the graph is cartesian
+ */
+ String yAxisLabel() default "";
+
+ /**
+ * Specify the type of graph
+ */
+ Type value() default Type.BAR;
+
+ /**
+ * Specify the increments on the y-axis. Default is number algorithm based on different y axes values
+ */
+ String stepSize() default "";
+
+ }
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/event/EventType.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/event/EventType.java
new file mode 100644
index 000000000..b1925bb53
--- /dev/null
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/event/EventType.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2016-2018 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.antheminc.oss.nimbus.domain.defn.event;
+
+import java.lang.annotation.Annotation;
+
+import com.antheminc.oss.nimbus.domain.defn.event.StateEvent.OnStateChange;
+import com.antheminc.oss.nimbus.domain.defn.event.StateEvent.OnStateLoad;
+import com.antheminc.oss.nimbus.domain.defn.event.StateEvent.OnStateLoadGet;
+import com.antheminc.oss.nimbus.domain.defn.event.StateEvent.OnStateLoadNew;
+import com.antheminc.oss.nimbus.domain.defn.event.StateEvent.OnTxnExecute;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
+/**
+ * @author Rakesh Patel
+ *
+ */
+@RequiredArgsConstructor @Getter
+public enum EventType {
+
+ OnStateLoadNew(OnStateLoadNew.class),
+ OnStateChange(OnStateChange.class),
+ OnStateLoad(OnStateLoad.class),
+ OnStateLoadGet(OnStateLoadGet.class),
+ OnTxnExecute(OnTxnExecute.class);
+
+
+
+ final Class extends Annotation> annotationType;
+
+}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/event/StateEvent.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/event/StateEvent.java
index d9a6c1e53..9ec65eac0 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/event/StateEvent.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/event/StateEvent.java
@@ -32,7 +32,7 @@ public final class StateEvent {
@Retention(RUNTIME)
@Target(ANNOTATION_TYPE)
- @Event
+ @Event(eventType = EventType.OnStateLoad)
@Inherited
public @interface OnStateLoad {
int order() default Event.DEFAULT_ORDER_NUMBER;
@@ -40,7 +40,7 @@ public final class StateEvent {
@Retention(RUNTIME)
@Target(ANNOTATION_TYPE)
- @Event
+ @Event(eventType = EventType.OnStateLoadNew)
@Inherited
public @interface OnStateLoadNew { // Blank Constructor -- Action._new: OnStateLoadNew
int order() default Event.DEFAULT_ORDER_NUMBER;
@@ -48,7 +48,7 @@ public final class StateEvent {
@Retention(RUNTIME)
@Target(ANNOTATION_TYPE)
- @Event
+ @Event(eventType = EventType.OnStateLoadGet)
@Inherited
public @interface OnStateLoadGet { // Args Constructor -- Action._get: OnStateLoadGet
int order() default Event.DEFAULT_ORDER_NUMBER;
@@ -57,7 +57,7 @@ public final class StateEvent {
@Retention(RUNTIME)
@Target(ANNOTATION_TYPE)
- @Event
+ @Event(eventType = EventType.OnStateChange)
@Inherited
public @interface OnStateChange {
int order() default Event.DEFAULT_ORDER_NUMBER;
@@ -65,9 +65,11 @@ public final class StateEvent {
@Retention(RUNTIME)
@Target(ANNOTATION_TYPE)
- @Event
+ @Event(eventType = EventType.OnTxnExecute)
@Inherited
public @interface OnTxnExecute {
int order() default Event.DEFAULT_ORDER_NUMBER;
}
+
+
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/extension/Script.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/extension/Script.java
index d591ade03..f597b7d8e 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/extension/Script.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/defn/extension/Script.java
@@ -15,21 +15,23 @@
*/
package com.antheminc.oss.nimbus.domain.defn.extension;
+import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import com.antheminc.oss.nimbus.domain.defn.event.StateEvent.OnStateLoadNew;
+import com.antheminc.oss.nimbus.domain.Event;
+import com.antheminc.oss.nimbus.domain.defn.event.EventType;
/**
* @author Soham Chakravarti
*
*/
@Retention(RUNTIME)
-@Target(TYPE)
-@OnStateLoadNew
+@Target({TYPE,FIELD})
+@Event
public @interface Script {
enum Type {
@@ -42,4 +44,7 @@ enum Type {
String value() default "";
Type type() default Type.SPEL_INLINE;
+
+ EventType[] eventType() default {EventType.OnStateLoadNew};
+
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/EntityConfig.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/EntityConfig.java
index 9fa132ca7..e8d5b9e4a 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/EntityConfig.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/EntityConfig.java
@@ -64,4 +64,9 @@ default boolean isMapped() {
public EntityConfig getMapsToConfig();
}
+
+ public enum Scope {
+ LOCAL,
+ REMOTE;
+ }
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/ModelConfig.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/ModelConfig.java
index 2cc3b12f7..ad0a82f95 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/ModelConfig.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/ModelConfig.java
@@ -28,9 +28,13 @@ public interface ModelConfig extends EntityConfig {
public String getAlias();
+ public String getRepoAlias();
+
public String getDomainLifecycle();
public Repo getRepo();
+
+ public boolean isRemote();
//@JsonIgnore
public List extends ParamConfig>> getParamConfigs();
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/ParamConfig.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/ParamConfig.java
index ef6f6dd0d..9b941fa2f 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/ParamConfig.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/ParamConfig.java
@@ -18,8 +18,13 @@
import java.util.List;
import java.util.Set;
+import org.apache.commons.lang.ArrayUtils;
+import org.springframework.util.CollectionUtils;
+
import com.antheminc.oss.nimbus.domain.defn.AssociatedEntity;
+import com.antheminc.oss.nimbus.domain.defn.ConfigNature.Ignore;
import com.antheminc.oss.nimbus.domain.defn.Converters.ParamConverter;
+import com.antheminc.oss.nimbus.domain.defn.Domain.ListenerType;
import com.antheminc.oss.nimbus.domain.defn.MapsTo;
import com.antheminc.oss.nimbus.domain.defn.MapsTo.Mode;
import com.antheminc.oss.nimbus.domain.defn.MapsTo.Path;
@@ -85,6 +90,22 @@ default MapsTo.Mode getMappingMode() {
return null;
}
+ @JsonIgnore
+ default boolean containsIgnoreListener(ListenerType listenerType) {
+ if(!CollectionUtils.isEmpty(getExtensions())) {
+ return getExtensions().stream()
+ .map(AnnotationConfig::getAnnotation)
+ .filter(a->a.annotationType()==Ignore.class)
+ .map(Ignore.class::cast)
+ .map(Ignore::listeners)
+ .filter(array->ArrayUtils.contains(array,listenerType))
+ .findFirst()
+ .isPresent();
+ }
+ return false;
+ }
+
+
public interface MappedParamConfig extends ParamConfig
, MappedConfig
{
@Override
boolean isMapped();
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/AbstractEntityConfigBuilder.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/AbstractEntityConfigBuilder.java
index 21c4a73b0..1cdc58a79 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/AbstractEntityConfigBuilder.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/AbstractEntityConfigBuilder.java
@@ -89,7 +89,7 @@ public AbstractEntityConfigBuilder(BeanResolverStrategy beanResolver) {
this.beanResolver = beanResolver;
this.rulesEngineFactoryProducer = beanResolver.get(RulesEngineFactoryProducer.class);
this.eventHandlerConfigFactory = beanResolver.get(EventHandlerConfigFactory.class);
- this.annotationConfigHandler = beanResolver.get(AnnotationConfigHandler.class);
+ this.annotationConfigHandler = beanResolver.get(AnnotationConfigHandler.class, "annotationConfigBuilder");
this.executionConfigFactory = beanResolver.get(ExecutionConfigFactory.class);
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/DefaultEntityConfigBuilder.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/DefaultEntityConfigBuilder.java
index ece5f524d..084d2565f 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/DefaultEntityConfigBuilder.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/DefaultEntityConfigBuilder.java
@@ -20,6 +20,7 @@
import java.util.List;
import java.util.Map;
+import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.springframework.core.annotation.AnnotatedElementUtils;
@@ -30,6 +31,7 @@
import com.antheminc.oss.nimbus.context.BeanResolverStrategy;
import com.antheminc.oss.nimbus.domain.defn.ConfigNature;
import com.antheminc.oss.nimbus.domain.defn.Repo;
+import com.antheminc.oss.nimbus.domain.model.config.EntityConfig.Scope;
import com.antheminc.oss.nimbus.domain.model.config.ModelConfig;
import com.antheminc.oss.nimbus.domain.model.config.ParamConfig;
import com.antheminc.oss.nimbus.domain.model.config.ParamConfigType;
@@ -51,11 +53,13 @@
public class DefaultEntityConfigBuilder extends AbstractEntityConfigBuilder implements EntityConfigBuilder {
private final Map typeClassMappings;
-
- public DefaultEntityConfigBuilder(BeanResolverStrategy beanResolver, Map typeClassMappings) {
+ private final Map> domainSet;
+
+ public DefaultEntityConfigBuilder(BeanResolverStrategy beanResolver, Map typeClassMappings, Map> domainset) {
super(beanResolver);
this.typeClassMappings = typeClassMappings;
+ this.domainSet = domainset;
}
@@ -116,6 +120,22 @@ public ModelConfig buildModel(Class clazz, EntityConfigVisitor visited
throw new InvalidConfigException("Persistable Entity: "+mConfig.getReferredClass()+" must be configured with @Id param which has Repo: "+mConfig.getRepo());
}
+ if(domainSet == null)
+ return mConfig;
+
+ /*If remote domain set is given in properties, only the alias in remote list are remote domain sets and rest are local*/
+ List remoteAliasList = domainSet.get(Scope.REMOTE);
+ if(CollectionUtils.isEmpty(remoteAliasList)) {
+ return mConfig;
+ }
+
+ if(remoteAliasList.contains(mConfig.getAlias())) {
+ mConfig.setRemote(true);
+ }
+ //TODO : Add logic for checking local domainset
+ if(CollectionUtils.isNotEmpty(domainSet.get(Scope.LOCAL))) {
+ throw new UnsupportedOperationException("Local scope is not supported for domainset configuration. Consider using only domain.model.domainSet.remote property instead");
+ }
return mConfig;
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/EventHandlerConfigFactory.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/EventHandlerConfigFactory.java
index 2272dba21..12fd66221 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/EventHandlerConfigFactory.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/builder/internal/EventHandlerConfigFactory.java
@@ -50,7 +50,7 @@ public class EventHandlerConfigFactory {
public EventHandlerConfigFactory(BeanResolverStrategy beanResolver) {
this.beanResolver = beanResolver;
- this.annotationConfigHandler = beanResolver.find(AnnotationConfigHandler.class);
+ this.annotationConfigHandler = beanResolver.find(AnnotationConfigHandler.class, "eventAnnotationConfigBuilder");
}
@SuppressWarnings("unchecked")
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/internal/DefaultModelConfig.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/internal/DefaultModelConfig.java
index 6d7f48ef3..99f37cf4a 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/internal/DefaultModelConfig.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/internal/DefaultModelConfig.java
@@ -55,6 +55,8 @@ public class DefaultModelConfig extends AbstractEntityConfig implements Mo
@JsonIgnore private Repo repo;
+ @JsonIgnore private boolean remote;
+
private List> paramConfigs;
@JsonIgnore private transient ParamConfig> idParamConfig;
@@ -101,4 +103,8 @@ public ParamConfig findParamByPath(String[] pathArr) {
return p.findParamByPath(ArrayUtils.remove(pathArr, 0));
}
+ public String getRepoAlias() {
+ return getRepo() != null && StringUtils.isNotBlank(getRepo().alias()) ? getRepo().alias() : getAlias();
+ }
+
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/support/DefaultJsonParamConfigSerializer.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/support/DefaultJsonParamConfigSerializer.java
index 820433e30..9f3e17924 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/support/DefaultJsonParamConfigSerializer.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/config/support/DefaultJsonParamConfigSerializer.java
@@ -20,6 +20,7 @@
import java.util.LinkedList;
import java.util.UUID;
+import com.antheminc.oss.nimbus.domain.defn.Domain.ListenerType;
import com.antheminc.oss.nimbus.domain.model.config.ParamConfig;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -60,6 +61,9 @@ public void serialize(ParamConfig> p, JsonGenerator gen, SerializerProvider se
try {
+ if(p.containsIgnoreListener(ListenerType.websocket))
+ return;
+
gen.writeStartObject();
if(TH_STACK.get().contains(p.getId())) {
gen.writeStringField(K_POINTERID, p.getId());
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/EntityNotFoundException.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/EntityNotFoundException.java
deleted file mode 100644
index 26bb694a0..000000000
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/EntityNotFoundException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright 2016-2018 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.antheminc.oss.nimbus.domain.model.state;
-
-import com.antheminc.oss.nimbus.FrameworkRuntimeException;
-
-import lombok.Getter;
-
-/**
- * @author Soham Chakravarti
- *
- */
-@Getter
-public class EntityNotFoundException extends FrameworkRuntimeException {
-
- private static final long serialVersionUID = 1L;
-
- private Class> clazz;
-
-
- public EntityNotFoundException(Class> clazz) {
- super();
- this.clazz = clazz;
- }
-
- public EntityNotFoundException(String message, Class> clazz) {
- super(message);
- this.clazz = clazz;
- }
-
- public EntityNotFoundException(String message, Throwable cause, Class> clazz) {
- super(message, cause);
- this.clazz = clazz;
- }
-
- public EntityNotFoundException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Class> clazz) {
- super(message, cause, enableSuppression, writableStackTrace);
- this.clazz = clazz;
- }
-
-}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/EntityState.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/EntityState.java
index 9ca6329d8..9b5a84974 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/EntityState.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/EntityState.java
@@ -60,7 +60,6 @@ public interface EntityState {
@JsonIgnore
String getBeanPath();
- //@JsonIgnore
EntityConfig getConfig();
String getConfigId();
@@ -135,17 +134,9 @@ public interface ExecutionModel extends Model {
@Override
boolean isRoot();
-// @Override
-// default boolean isRoot() {
-// return true;
-// }
@Override
ExecutionModel findIfRoot();
-// @Override
-// default ExecutionModel findIfRoot() {
-// return this;
-// }
@JsonIgnore
Command getRootCommand();
@@ -161,7 +152,6 @@ public interface ExecutionModel extends Model {
public interface Model extends EntityState {
- //@JsonIgnore
@Override
ModelConfig getConfig();
@@ -176,29 +166,15 @@ public interface Model extends EntityState {
@JsonIgnore @Override
Model> getRootDomain();
-// @JsonIgnore @Override
-// default Model> getRootDomain() {
-// return getAssociatedParam().getRootDomain();
-// }
ExecutionModel findIfRoot();
-// default ExecutionModel findIfRoot() {
-// return null;
-// }
@Override
MappedModel findIfMapped();
-// @Override
-// default MappedModel findIfMapped() {
-// return null;
-// }
List> getParams();
ListModel> findIfListModel();
-// default ListModel> findIfListModel() {
-// return null;
-// }
CollectionsTemplate>, Param>> templateParams();
@@ -206,9 +182,6 @@ public interface Model extends EntityState {
T instantiateAndSet();
T getLeafState();
-// default T getLeafState() {
-// return Optional.ofNullable(getAssociatedParam()).map(p->p.getLeafState()).orElse(null);
-// }
T getState();
void setState(T state);
@@ -217,31 +190,21 @@ public interface Model extends EntityState {
}
public interface MappedModel extends Model, Mapped {
+
@Override
MappedModel findIfMapped();
-// @Override
-// default MappedModel findIfMapped() {
-// return this;
-// }
@Override
Model getMapsTo();
}
public interface ListModel extends Model>, ListBehavior {
+
@Override
MappedListModel findIfMapped();
-// @Override
-// default MappedListModel findIfMapped() {
-// return null;
-// }
@Override
ListModel findIfListModel();
-// @Override
-// default ListModel findIfListModel() {
-// return this;
-// }
ListElemParam createElement(String elemId);
@@ -250,35 +213,22 @@ public interface ListModel extends Model>, ListBehavior {
@JsonIgnore
ParamConfig getElemConfig();
-// @JsonIgnore
-// default ParamConfig getElemConfig() {
-// StateType.NestedCollection typeSAC = getAssociatedParam().getType().findIfCollection();
-// ParamConfigType.NestedCollection typeConfig = typeSAC.getConfig().findIfCollection();
-//
-// ParamConfig elemConfig = typeConfig.getElementConfig();
-// return elemConfig;
-// }
String getElemConfigId();
-// default String getElemConfigId() {
-// return getElemConfig().getId();
-// }
+
}
public interface MappedListModel extends ListModel, MappedModel, List> {
+
@Override
MappedListModel findIfMapped();
-// @Override
-// default MappedListModel findIfMapped() {
-// return this;
-// }
@Override
ListModel getMapsTo();
}
public interface Param extends EntityState, State, Notification.Producer {//, Notification.ObserveOn, Param> {
- //@JsonIgnore
+
@Override
ParamConfig getConfig();
@@ -446,87 +396,37 @@ default void traverse(Consumer> consumer, int depth, boolean execute) {
@JsonIgnore
boolean isLeaf();
-// @JsonIgnore
-// default boolean isLeaf() {
-// return getConfig().isLeaf();
-// }
@JsonIgnore
boolean isLeafOrCollectionWithLeafElems();
-// @JsonIgnore
-// default boolean isLeafOrCollectionWithLeafElems() {
-// return isLeaf() || (isCollection() && findIfCollection().isLeafElements());
-// }
LeafParam findIfLeaf();
-// default LeafParam findIfLeaf() {
-// return null;
-// }
MappedParam findIfMapped();
-// default MappedParam findIfMapped() {
-// return null;
-// }
boolean isCollection();
-// default boolean isCollection() {
-// return false;
-// }
+
+ boolean isEmpty();
boolean isNested();
-// default boolean isNested() {
-// return getType().isNested();
-// }
Model findIfNested();
-// default Model findIfNested() {
-// return isNested() ? getType().findIfNested().getModel() : null;
-// }
boolean isCollectionElem();
-// default boolean isCollectionElem() {
-// return false;
-// }
ListParam findIfCollection();
-// default ListParam findIfCollection() {
-// return null;
-// }
ListElemParam findIfCollectionElem();
-// default ListElemParam findIfCollectionElem() {
-// return null;
-// }
@JsonIgnore
boolean isLinked();
-// @JsonIgnore
-// default boolean isLinked() {
-// return false;
-// }
Param> findIfLinked();
-// default Param> findIfLinked() {
-// return null;
-// }
@JsonIgnore
boolean isTransient();
-// @JsonIgnore
-// default boolean isTransient() {
-// return false;
-// }
MappedTransientParam findIfTransient();
-// default MappedTransientParam findIfTransient() {
-// return null;
-// }
-
-// @JsonIgnore
-// PropertyDescriptor getPropertyDescriptor();
-
-// @JsonIgnore
-// MethodHandle[] getMethodHandles();
@JsonIgnore
ValueAccessor getValueAccessor();
@@ -573,7 +473,7 @@ public boolean equals(Object obj) {
return false;
LabelState other = LabelState.class.cast(obj);
-
+
if(StringUtils.equalsIgnoreCase(other.getLocale(), this.getLocale())
&& StringUtils.equalsIgnoreCase(other.getText(), this.getText()))
return true;
@@ -599,7 +499,7 @@ public boolean equals(Object obj) {
return false;
}
- if (!LabelState.class.isInstance(obj)) {
+ if (!StyleState.class.isInstance(obj)) {
return false;
}
@@ -680,75 +580,35 @@ public interface LeafParam extends Param {
@Override
LeafParam findIfLeaf();
-// @Override
-// default LeafParam findIfLeaf() {
-// return this;
-// }
}
public interface MappedParam extends Param, Mapped, Notification.Consumer {
@Override
MappedParam findIfMapped();
-// @Override
-// default MappedParam findIfMapped() {
-// return this;
-// }
@JsonIgnore @Override
Param getMapsTo();
@JsonIgnore
boolean requiresConversion();
-// @JsonIgnore
-// default boolean requiresConversion() {
-// if(isLeaf()) return false;
-//
-// if(isTransient() && !findIfTransient().isAssinged()) { // when transient is not assigned
-// Class> mappedClass = getType().getConfig().getReferredClass();
-// Class> mapsToClass = getType().getConfig().findIfNested().getModelConfig().findIfMapped().getMapsToConfig().getReferredClass();
-//
-// return (mappedClass!=mapsToClass);
-// }
-//
-// Class> mappedClass = getType().findIfNested().getModel().getConfig().getReferredClass();
-// Class> mapsToClass = getMapsTo().getType().findIfNested().getModel().getConfig().getReferredClass();
-//
-// // conversion required when mappedClass and mapsToClass are NOT same
-// return (mappedClass!=mapsToClass);
-// }
}
public interface MappedTransientParam extends MappedParam {
@Override
boolean isTransient();
-// @Override
-// default boolean isTransient() {
-// return true;
-// }
@Override
MappedTransientParam findIfTransient();
-// @Override
-// default MappedTransientParam findIfTransient() {
-// return this;
-// }
@JsonIgnore
boolean isAssinged();
-// @JsonIgnore
-// default boolean isAssinged() {
-// return getMapsTo() != null;
-// }
void assignMapsTo();
void assignMapsTo(String rootMapsToPath);
-// default void assignMapsTo(String rootMapsToPath) {
-// Param mapsToTransient = findParamByPath(rootMapsToPath);
-// assignMapsTo(mapsToTransient);
-// }
+
void assignMapsTo(Param mapsToTransient);
void unassignMapsTo();
@@ -756,10 +616,6 @@ public interface MappedTransientParam extends MappedParam {
}
public interface ListBehavior {
- /*
- boolean remove(Param p);
- Param remove(int i);
- Param set(int i, Param p);*/
String toElemId(int i);
int fromElemId(String elemId);
@@ -816,21 +672,9 @@ public interface MappedListParam extends ListParam, MappedParam
@Override
MappedListParam findIfMapped();
-// @Override
-// default MappedListParam findIfMapped() {
-// return this;
-// }
@Override
boolean requiresConversion();
-// @Override
-// default boolean requiresConversion() {
-// Class> mappedElemClass = getType().findIfCollection().getModel().getElemConfig().getReferredClass();
-// Class> mapsToElemClass = getMapsTo().getType().findIfCollection().getModel().getElemConfig().getReferredClass();
-//
-// // conversion required when mappedClass and mapsToClass are NOT same
-// return (mappedElemClass!=mapsToElemClass);
-// }
}
public interface ListElemParam extends Param {
@@ -844,37 +688,19 @@ public interface ListElemParam extends Param {
@Override
MappedListElemParam findIfMapped();
-// @Override
-// default MappedListElemParam findIfMapped() {
-// return null;
-// }
@Override
boolean isCollectionElem();
-// @Override
-// default boolean isCollectionElem() {
-// return true;
-// }
@Override
ListElemParam findIfCollectionElem();
-// @Override
-// default ListElemParam findIfCollectionElem() {
-// return this;
-// }
boolean remove();
}
public interface MappedListElemParam extends ListElemParam, MappedParam {
-// @Override
-// ListElemParam getMapsTo();
@Override
MappedListElemParam findIfMapped();
-// @Override
-// default MappedListElemParam findIfMapped() {
-// return this;
-// }
}
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/InvalidStateException.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/InvalidStateException.java
index 12ae5e0cc..79d36ed16 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/InvalidStateException.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/InvalidStateException.java
@@ -31,16 +31,8 @@ public InvalidStateException(String message) {
super(message);
}
- public InvalidStateException(Throwable cause) {
- super(cause);
- }
-
public InvalidStateException(String message, Throwable cause) {
super(message, cause);
}
- public InvalidStateException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
- super(message, cause, enableSuppression, writableStackTrace);
- }
-
}
diff --git a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/StateHolder.java b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/StateHolder.java
index e2754d168..95bd01957 100644
--- a/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/StateHolder.java
+++ b/nimbus-core/src/main/java/com/antheminc/oss/nimbus/domain/model/state/StateHolder.java
@@ -51,7 +51,7 @@ public String getBeanPath() {
@Override
public EntityConfig getConfig() {
- throw throwEx(); //return this.ref.getConfig();
+ throw throwEx();
}
@Override
@@ -66,12 +66,12 @@ public S findStateByPath(String path) {
@Override
public Model findModelByPath(String path) {
- throw throwEx(); //return this.ref.findModelByPath(path);
+ throw throwEx();
}
@Override
public Model findModelByPath(String[] pathArr) {
- throw throwEx(); //return this.ref.findModelByPath(pathArr);
+ throw throwEx();
}
@Override
@@ -110,12 +110,12 @@ public boolean isRoot() {
@Override
public Model> getRootDomain() {
- throw throwEx(); //return this.ref.getRootDomain();
+ throw throwEx();
}
@Override
public ExecutionModel> getRootExecution() {
- throw throwEx(); //return this.ref.getRootExecution();
+ throw throwEx();
}
@Override
@@ -232,7 +232,7 @@ public boolean requiresConversion() {
@Override
public ParamConfig getConfig() {
- throw throwEx(); //return ref.getConfig();
+ throw throwEx();
}
@Override
@@ -252,33 +252,33 @@ public Action setState(T state) {
@Override
public Model> getParentModel() {
- throw throwEx(); //return this.ref.getParentModel();
+ throw throwEx();
}
@Override
public StateType getType() {
- throw throwEx(); //return this.ref.getType();
+ throw throwEx();
}
@Override
public ListParam findIfCollection() {
- throw throwEx(); //return this.ref.findIfCollection();
+ throw throwEx();
}
@Override
public ListElemParam