Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In particular, you'll want to implement some of addBody(), addOptions(), addPageMeta(), and/or addUserMeta(). Each is passed an object representing the appropriate segment of the DRI document so that your code can make required additions to it. For example, to augment the body you would override addBody:

Code Block

public void addBody(Body body) throws ...
{
  String foo = Bar.getFoo();

  body.addDivision("myDivision")
    .addPara("myStuff", null)
    .addContent(foo);
}

...

The class org.dspace.app.xmlui.utils.HandleUtil is quite useful for discovering what sort of request you are fulfilling and what repository object is in focus.

Code Block

DSpaceObject theObject = HandleUtil.obtainHandle(objectModel);
if (null != theObject)
{
  int objectType = theObject.getType();
  int objectId = theObject.getID();
}

...

Emetsger__ExampleAspects

Additional Documentation