Skip to content

Define a base class for Plugins #32

Description

@sebsoftware

Instead of a placeholder object inside the options a Plugins object would be better.

It can be easily integrated as

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, 
getterVisibility = JsonAutoDetect.Visibility.NONE, 
setterVisibility = JsonAutoDetect.Visibility.NONE)

public class Plugins extends HashMap<String, Object> {
	private static final long serialVersionUID = -3402095836685671301L;

}

i.E. a configuration for the color schemes plugin can be set with

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
public class ColorSchemes {

	private String scheme;

	public String getScheme() {
		return this.scheme;
	}

	public ColorSchemes setScheme(final String scheme) {
		this.scheme = scheme;
		return this;
	}

}

and can be set:

	ColorSchemes colorschemes = new ColorSchemes();
	colorschemes.setScheme("tableau.HueCircle19");
	plugins.put("colorschemes", colorschemes);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions