Admin Session Pattern

Create, update, and delete domain objects — the write side of an OSID domain.

Overview

An admin session controls the lifecycle of domain objects. It returns form objects pre-populated for create or update, accepts the completed form, and applies the change. Override the three core methods per object type: the form getter, the create method, and the update method. Delete is a direct operation with no form.

Javadoc Reference

net.okapia.osid.jamocha.spi

Class Declaration Pattern

public abstract class AbstractAdminOsidObjectSession
extends AbstractOsidSession
implements AdminOsidObjectSession

Constructor Pattern

AbstractAdminOsidObjectSession(OsidObjectManager manager, Id catalogId)
ParameterTypeDescription
manager OsidObjectManager the manager that opened this session
catalogId Id the catalog this session is scoped to

Key Override Pattern

public OsidObjectForm getOsidObjectFormForCreate(Type[] recordTypes) throws OperationFailedException
public OsidObject createOsidObject(OsidObjectForm form) throws OperationFailedException
public void updateOsidObject(OsidObjectForm form) throws OperationFailedException
public void deleteOsidObject(Id osidObjectId) throws OperationFailedException