Builder Pattern

Extend abstract form builders to wire up create and update forms for your OsidObjects.

Overview

Each OsidObject that supports create and update operations has a corresponding abstract form builder class. You extend the builder and override getXxxMetadata() methods to declare what fields the form exposes and what constraints apply. The framework calls your builder to construct the form that callers receive from getXxxFormForCreate() and getXxxFormForUpdate().

Builders keep form construction logic separate from session logic, and the metadata declarations drive validation automatically through the Validator layer.

Javadoc Reference

net.okapia.osid.jamocha.builder.spi

Class Declaration Pattern

public abstract class AbstractOsidObjectFormBuilder
extends Object
implements OsidObjectForm

Constructor Pattern

AbstractOsidObjectFormBuilder()
ParameterTypeDescription
no parameters — subclass configures via overrides

Key Override Pattern

public Metadata getFieldMetadata()

Returns Metadata — field constraint declaration (required, read-only, valid range, etc.)