SchemaBuilder (Hyperic HQ Plugin API)
Keywords: org.hyperic.util.config.SchemaBuilder class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.util.config
Class SchemaBuilder

    java.lang.Object
      org.hyperic.util.config.SchemaBuilder

    public class SchemaBuilder

extends java.lang.Object

Simple helper class to help keep plugin config schemas consistent and concise.

Constructor Summary
`SchemaBuilder()`
`SchemaBuilder(ConfigResponse config)`
`SchemaBuilder(ConfigSchema schema, ConfigResponse config)`

Method Summary
`ConfigOption` | `add(java.lang.String[] opt)`
`ConfigOption` | `add(java.lang.String prop, java.lang.String description, boolean defaultValue)`
`ConfigOption` | `add(java.lang.String prop, java.lang.String description, double defaultValue)`
`ConfigOption` | `add(java.lang.String prop, java.lang.String description, java.lang.Double defaultValue)`
`ConfigOption` | `add(java.lang.String prop, java.lang.String description, int defaultValue)`
`ConfigOption` | `add(java.lang.String prop, java.lang.String description, java.lang.Integer defaultValue)`
`ConfigOption` | `add(java.lang.String prop, java.lang.String description, java.lang.String defaultValue)`
`ConfigOption` | `add(java.lang.String prop, java.lang.String description, java.lang.String defaultValue, boolean optional)`
`ConfigOption` | `addEnum(java.lang.String prop, java.lang.String description, java.lang.String[] opts)`
`ConfigOption` | `addEnum(java.lang.String prop, java.lang.String description, java.lang.String[] opts, java.lang.String defaultValue)`
`ConfigOption` | `addPort(java.lang.String prop, java.lang.String description, int defaultValue)`
`ConfigOption` | `addPort(java.lang.String prop, java.lang.String description, java.lang.Integer defaultValue)`
`ConfigOption` | `addRegex(java.lang.String prop, java.lang.String description, java.lang.String defaultValue)`
`ConfigOption` | `addSecret(java.lang.String prop, java.lang.String description)`
`ConfigOption` | `addStringArray(java.lang.String prop, java.lang.String description, java.lang.String defaultValue)`
`ConfigSchema` | `getSchema()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SchemaBuilder

    public SchemaBuilder(ConfigSchema schema,
                         ConfigResponse config)

### SchemaBuilder

    public SchemaBuilder(ConfigResponse config)

Parameters:
  `config` - Base config used for default values.

### SchemaBuilder

    public SchemaBuilder()

Method Detail

### getSchema

    public ConfigSchema getSchema()

### add

    public ConfigOption add(java.lang.String prop,
                            java.lang.String description,
                            java.lang.String defaultValue,
                            boolean optional)

### add

    public ConfigOption add(java.lang.String prop,
                            java.lang.String description,
                            java.lang.String defaultValue)

### add

    public ConfigOption add(java.lang.String prop,
                            java.lang.String description,
                            int defaultValue)

### add

    public ConfigOption add(java.lang.String prop,
                            java.lang.String description,
                            java.lang.Integer defaultValue)

### add

    public ConfigOption add(java.lang.String prop,
                            java.lang.String description,
                            double defaultValue)

### add

    public ConfigOption add(java.lang.String prop,
                            java.lang.String description,
                            java.lang.Double defaultValue)

### add

    public ConfigOption add(java.lang.String prop,
                            java.lang.String description,
                            boolean defaultValue)

### addSecret

    public ConfigOption addSecret(java.lang.String prop,
                                  java.lang.String description)

### addPort

    public ConfigOption addPort(java.lang.String prop,
                                java.lang.String description,
                                int defaultValue)

### addPort

    public ConfigOption addPort(java.lang.String prop,
                                java.lang.String description,
                                java.lang.Integer defaultValue)

### addEnum

    public ConfigOption addEnum(java.lang.String prop,
                                java.lang.String description,
                                java.lang.String[] opts)

### addEnum

    public ConfigOption addEnum(java.lang.String prop,
                                java.lang.String description,
                                java.lang.String[] opts,
                                java.lang.String defaultValue)

### addRegex

    public ConfigOption addRegex(java.lang.String prop,
                                 java.lang.String description,
                                 java.lang.String defaultValue)

### addStringArray

    public ConfigOption addStringArray(java.lang.String prop,
                                       java.lang.String description,
                                       java.lang.String defaultValue)

### add

    public ConfigOption add(java.lang.String[] opt)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.