Thursday, November 27, 2008

Reminder. BeanShell und CoreMedia

BeanShell starten:

$COREM_HOME$ ./cm bsh



CoreMedia Connection einsourcen:


bsh % source("bin/bshrc");
*** Connecting as admin ***
*** Connected: CapConnection[http://*****:4441/coremedia/ior admin open] ***




Connection ausgeben:


bsh % connection;
CapConnection[http://****:4441/coremedia/ior admin open]




Mit Repository verbinden:


bsh % repository = connection.getContentRepository();
com.coremedia.cotopaxi.content.ContentRepositoryImpl@1347d33



Systeminfo ausgeben:


bsh % repository .getServerSystemInfo();
CapSystemInfo[client=false, component=Content Repository in /opt/coremedia/dev/cms-redaktion, release=5.2, build: #304 (02.07.2008/00:05:27), host name=********, ip address=127.0.0.1, port=4441, os=Linux 2.6.18-92.1.10.el5 (i386), processors=4, jvm=Java HotSpot(TM) Server VM 1.5.0_16 (mixed mode) in /usr/local/jdk1.5.0_16/jre, max memory=981MByte]



Content holen:


bsh % repository.getContent("1");
Content[coremedia:///cap/content/1]