Skip to content

Commit

Permalink
add parameter which indicates event source triggering chart rednering
Browse files Browse the repository at this point in the history
  • Loading branch information
ridoo committed Mar 7, 2017
1 parent 3bf8197 commit 8c4397b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions timeseries-io/src/main/java/org/n52/io/IoParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,16 @@ public class IoParameters {
*/
private static final String DEFAULT_FORMAT = "tvp";

/**
* Determines if what event causes a rendering task.
*/
static final String RENDERING_TRIGGER = "rendering_trigger";

/**
* Default event causing a rendering task.
*/
private static final String DEFAULT_RENDERING_TRIGGER = "request";

/**
* Determines the style parameter
*/
Expand Down Expand Up @@ -553,6 +563,18 @@ public String getFormat() {
public boolean isSetRawFormat() {
return query.containsKey(RAW_FORMAT);
}

public String getRenderingTrigger() {
if ( !query.containsKey(RENDERING_TRIGGER)) {
return DEFAULT_RENDERING_TRIGGER;
}
return getAsString(RENDERING_TRIGGER);
}

public boolean isSetRenderingTrigger() {
return query.containsKey(RENDERING_TRIGGER);
}

public String getRawFormat() {
if (isSetRawFormat()) {
final JsonNode value = query.getFirst(RAW_FORMAT);
Expand Down

0 comments on commit 8c4397b

Please sign in to comment.