From 8a9144347376a5c183364f55bcf32d2cf9b54f52 Mon Sep 17 00:00:00 2001 From: quasi Date: Mon, 11 May 2009 11:40:26 +0000 Subject: [PATCH] =?UTF-8?q?BaseContact:=20Eine=20erste=20Version=20von=20B?= =?UTF-8?q?aseContact,=20die=20zwar=20fehlerfrei=20kompiliert=20aber=20noc?= =?UTF-8?q?h=20v=C3=B6llig=20unvollst=C3=A4ndig=20ist.=20Definiert=20ist?= =?UTF-8?q?=20das=20PDL=20in=20einer=20hoffentlich=20vollst=C3=A4ndigen=20?= =?UTF-8?q?Version.=20Dabei=20ist=20BaseContact=20zur=20Zeit=20ein=20Kind?= =?UTF-8?q?=20von=20Person.=20Ist=20das=20eine=20gute=20Entscheidung=3F=20?= =?UTF-8?q?Oder=20sollte=20man=20die=20Person=20ebenfalls=20nur=20hinzulin?= =?UTF-8?q?ken=3F=20Die=20Java-Klassen=20sind=20noch=20nicht=20vollst?= =?UTF-8?q?=C3=A4ndig.=20Hier=20mu=C3=9F=20au=C3=9Ferdem=20ein=20AuthKit?= =?UTF-8?q?=20erstellt=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@164 8810af33-2d31-482b-a856-94f89814c4df --- .../cms/contenttypes/BaseContact.class | Bin 0 -> 1519 bytes .../contenttypes/BaseContactInitializer.class | Bin 0 -> 1085 bytes .../cms/contenttypes/BaseContactLoader.class | Bin 0 -> 819 bytes .../util/BaseContactGlobalizationUtil.class | Bin 0 -> 1040 bytes .../util/BaseContactResourceBundle.class | Bin 0 -> 827 bytes ccm-cms-types-baseContact/debian/ccm-build.sh | 11 + ccm-cms-types-baseContact/debian/ccm-clean.sh | 15 ++ .../debian/ccm-cms-types-organization.dirs | 1 + .../debian/ccm-config.sh | 13 ++ .../debian/ccm-disperse.sh | 39 ++++ .../debian/ccm-install.sh | 43 ++++ .../debian/ccm-settings-run.sh | 44 ++++ .../debian/ccm-settings.sh | 27 +++ ccm-cms-types-baseContact/debian/changelog | 63 ++++++ ccm-cms-types-baseContact/debian/compat | 1 + ccm-cms-types-baseContact/debian/config | 79 +++++++ ccm-cms-types-baseContact/debian/control | 21 ++ ccm-cms-types-baseContact/debian/copyright | 15 ++ ccm-cms-types-baseContact/debian/postinst | 112 ++++++++++ ccm-cms-types-baseContact/debian/postrm | 62 ++++++ ccm-cms-types-baseContact/debian/prerm | 60 +++++ ccm-cms-types-baseContact/debian/rules | 84 +++++++ ccm-cms-types-baseContact/debian/templates | 207 ++++++++++++++++++ .../com/arsdigita/content-types/BaseContact | 26 +++ .../sql/ccm-zes-dbde/oracle-se-create.sql | 22 ++ .../sql/ccm-zes-dbde/postgres-create.sql | 23 ++ .../src/ccm-cms-types-baseContact.config | 4 + .../src/ccm-cms-types-baseContact.load | 18 ++ .../cms/contenttypes/BaseContact.java | 117 ++++++++++ .../contenttypes/BaseContactInitializer.java | 47 ++++ .../cms/contenttypes/BaseContactLoader.java | 45 ++++ .../BaseContactResources.properties | 0 .../util/BaseContactGlobalizationUtil.java | 53 +++++ .../util/BaseContactResourceBundle.java | 39 ++++ 34 files changed, 1291 insertions(+) create mode 100644 ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContact.class create mode 100644 ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContactInitializer.class create mode 100644 ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContactLoader.class create mode 100644 ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/util/BaseContactGlobalizationUtil.class create mode 100644 ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/util/BaseContactResourceBundle.class create mode 100755 ccm-cms-types-baseContact/debian/ccm-build.sh create mode 100755 ccm-cms-types-baseContact/debian/ccm-clean.sh create mode 100755 ccm-cms-types-baseContact/debian/ccm-cms-types-organization.dirs create mode 100755 ccm-cms-types-baseContact/debian/ccm-config.sh create mode 100755 ccm-cms-types-baseContact/debian/ccm-disperse.sh create mode 100755 ccm-cms-types-baseContact/debian/ccm-install.sh create mode 100755 ccm-cms-types-baseContact/debian/ccm-settings-run.sh create mode 100755 ccm-cms-types-baseContact/debian/ccm-settings.sh create mode 100755 ccm-cms-types-baseContact/debian/changelog create mode 100755 ccm-cms-types-baseContact/debian/compat create mode 100755 ccm-cms-types-baseContact/debian/config create mode 100755 ccm-cms-types-baseContact/debian/control create mode 100755 ccm-cms-types-baseContact/debian/copyright create mode 100755 ccm-cms-types-baseContact/debian/postinst create mode 100755 ccm-cms-types-baseContact/debian/postrm create mode 100755 ccm-cms-types-baseContact/debian/prerm create mode 100755 ccm-cms-types-baseContact/debian/rules create mode 100755 ccm-cms-types-baseContact/debian/templates create mode 100644 ccm-cms-types-baseContact/pdl/com/arsdigita/content-types/BaseContact create mode 100755 ccm-cms-types-baseContact/sql/ccm-zes-dbde/oracle-se-create.sql create mode 100755 ccm-cms-types-baseContact/sql/ccm-zes-dbde/postgres-create.sql create mode 100755 ccm-cms-types-baseContact/src/ccm-cms-types-baseContact.config create mode 100755 ccm-cms-types-baseContact/src/ccm-cms-types-baseContact.load create mode 100755 ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContact.java create mode 100755 ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactInitializer.java create mode 100755 ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactLoader.java create mode 100755 ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactResources.properties create mode 100755 ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/util/BaseContactGlobalizationUtil.java create mode 100755 ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/util/BaseContactResourceBundle.java diff --git a/ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContact.class b/ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContact.class new file mode 100644 index 0000000000000000000000000000000000000000..b86f334c3752e4f62ccbf1aeb7d6f3d91df37986 GIT binary patch literal 1519 zcmaizU2hvj6o#MU&(=70Lr8$sc2aK}XbUw8@>dZkYAVHw)T?N`9^8%W-N-wx zTK*L`7=gqO;71`e8#k<-G~A4K&YXG9Iqy6B_dkF91?*A3!Mz+yl(STFB&p`evtuLC zvTMKY+gL4&lj8vov+QO0N?2(&jyfmpMz?Wt*!-!}>Yj98zUT<0gH!cdIYZ?SoFg;# z{6SqlXw=rmQRTY+zsYwE&U`Mj}_GOwJb zH)w0u8>wO4)=zkSVfE^BA=i21>NDd7ewgKJVXM4Q`Am;PFErYBwR8AmJ3?;!PmWNz z4%1df9rjMOYa&`Q=$#7N*Dzxjgq7K>aT6k)tuR8ar+*H{`bfRDo1U}Gw zS6M;%IcG6nJr;`-k1e>Y|v>Np_~Brlc294=J!0p;ph+XDBGL#>WVs04apKQHSd@{62{&KU3YA zl3AoaCe4!=HFH7Du*RpCs2j7n=cw65>QmCx-$VV3O(g1Y>nheI3HM3!{d-uSN6v`- t7iO%+%#UJq%8lx8+`LWhcRu*9!2(I3Ns2ZFIuZEXn|Fc=Uq&u&{|n4dPO|_2 literal 0 HcmV?d00001 diff --git a/ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContactInitializer.class b/ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContactInitializer.class new file mode 100644 index 0000000000000000000000000000000000000000..82506afa07cec67d4d16a72f94868881fb473f29 GIT binary patch literal 1085 zcma))T~8B16o%iSrQNRO!y+Q!$AXKrAUlWqMmSYk6_rmj&w*c-PB1) zS(ovSppg#O4{1|}p-8p~3OiCs`$)un#+p)z=e_tqBzx>25@}D(S+vg* zna2HO-gcxR*lcngQ6{%N^@X}E-AlN5CR16n7o&sJAOer`c!kGiC6lpo@LNXEZAU@; zhG3cNI5?9Y@Yn={(t{UC$do)`R%%toI2H-U|8$>Vmm15gzycgB;u?T5NLq+V zTn9ifg&TdyI`Y|@oBxXZ%Uor+_5O@f$X=EP2yUO?VERnPd{zax6DWK}@gtm62g!7t L64Hv9j5_-hb$A_v literal 0 HcmV?d00001 diff --git a/ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContactLoader.class b/ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/BaseContactLoader.class new file mode 100644 index 0000000000000000000000000000000000000000..045bdc14e5b07875374252976997b8712c81e294 GIT binary patch literal 819 zcma)&U279T6o%iEY?4h(Y)x&oRofM|&=#7B5kb=;v}p=~P=tg?@oKU=q*Hch>+WpP zf91!8Am|V9M~O_bl~MzC?&i#S&OGP+_51rz04+Eb6tP-H0c#~ZvhlctCnc;C%9kQe zWTbjNq252|mz)J$P1r!kQcd;|`cjFLG#ra~$j5;&zeOGoMm(10o)s;9CKE!d??oZwapKE~)SP)?!n{an zp|t*ZArf}T6VZv3=AQ0H+!yg4!JY^`G_Qo^t?jvP_P!Tnc9lVt#-2Eq#%1N7c?}aq z6*b(g;tr~W#hcj>y6kQDaJP4IeC4(~le@ip<3kt_nzsjL%MxDx2RRrgI_91>83{Fw z?{xn~=249gg0(4Da6NCrT!4LlcZ8gR( literal 0 HcmV?d00001 diff --git a/ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/util/BaseContactGlobalizationUtil.class b/ccm-cms-types-baseContact/build/classes/com/arsdigita/cms/contenttypes/util/BaseContactGlobalizationUtil.class new file mode 100644 index 0000000000000000000000000000000000000000..0565df6f97a7c97697616445861ddf49d1e5b438 GIT binary patch literal 1040 zcmbV~&2G~`6ot=?ow!L_T2d&K|Gux9^|70=SD?4LG>u;PM=Whs$~d9+P)MO46Rfq4Pq6#R zm=hKULh@l2k9himjUsMfNx&kXrNZ2cqOIQuMd%HJB=%UU#v&A&c|okaAd#9&tqPo!pneikJo7Ksl`i$v~g5p@amuqbjuf9?0yJ5wgd@|@uv6Zv?DE5$Yx#O}}B-5^$OId|9O?v~7-bCtK%%j7uX#N^d-vd#0s*M5Pe7k?$r%8(yx7Jf zkV}ComT(q89W5*ukMG0Ibfgc6r7iuIteZ<=BtH%g;LbyU<){g4<#mWNdm$l*Jxv}(na=e< zqe!LRxu+MU+WXzp`-6yfu!nuZewj--)ay*0@XVYpPvoG1yM)F?i(GiYAY627!ju16 zo$z3pKTFhTN=e#qolCI4A!jtafvZ25eM8sDZGBIxd6Y0H~k>0u?U?!a9JkM1Y;vXHd(ne8I|h sSf6mI<*uIJKbF)D04^*52e5Dt8#u%^?&B%|2ULi_#Wetg>m}pHFC}y7Gynhq literal 0 HcmV?d00001 diff --git a/ccm-cms-types-baseContact/debian/ccm-build.sh b/ccm-cms-types-baseContact/debian/ccm-build.sh new file mode 100755 index 000000000..6d0fad9cd --- /dev/null +++ b/ccm-cms-types-baseContact/debian/ccm-build.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: ccm-build.sh,v 1.1.1.1 2004/11/12 09:29:59 fabrice Exp $ + +. debian/ccm-settings.sh + +# for eg Oracle jar +CLASSPATH=./lib/:$CLASSPATH +$ANT build-${name} diff --git a/ccm-cms-types-baseContact/debian/ccm-clean.sh b/ccm-cms-types-baseContact/debian/ccm-clean.sh new file mode 100755 index 000000000..b603830b4 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/ccm-clean.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: ccm-clean.sh,v 1.1.1.1 2004/11/12 09:30:09 fabrice Exp $ + +. debian/ccm-settings.sh + +[ -f build.xml ] && $ANT clean-${appname} + +rm -rf build build.xml ccm.classpath + +# ccm-disperse.sh creates the .install files automatically, so let's clean them too. + +rm -f ${appname}.install ${appname}-doc.install diff --git a/ccm-cms-types-baseContact/debian/ccm-cms-types-organization.dirs b/ccm-cms-types-baseContact/debian/ccm-cms-types-organization.dirs new file mode 100755 index 000000000..f3698fd03 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/ccm-cms-types-organization.dirs @@ -0,0 +1 @@ +usr/share/java/ccm-cms-types-organization-6.3.0 diff --git a/ccm-cms-types-baseContact/debian/ccm-config.sh b/ccm-cms-types-baseContact/debian/ccm-config.sh new file mode 100755 index 000000000..90094298f --- /dev/null +++ b/ccm-cms-types-baseContact/debian/ccm-config.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: ccm-config.sh,v 1.1.1.1 2004/11/12 09:29:59 fabrice Exp $ + +. debian/ccm-settings.sh + +if [ ! -L $name ]; then + ln -s . $name +fi +ccm-create-projectxml.pl > project.xml +ccm-configure.sh diff --git a/ccm-cms-types-baseContact/debian/ccm-disperse.sh b/ccm-cms-types-baseContact/debian/ccm-disperse.sh new file mode 100755 index 000000000..c08119d5d --- /dev/null +++ b/ccm-cms-types-baseContact/debian/ccm-disperse.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: ccm-disperse.sh,v 1.1.1.1 2004/11/12 09:30:09 fabrice Exp $ + +. debian/ccm-settings.sh + +SRCDIR="$1" +[ "x$SRCDIR" != "x" ] || exit 1 + +# automatically generate the .install file lists for dh_install: + +(cd $SRCDIR && find . -type f \ + | grep -v DEBIAN \ + | grep -v var/www/html \ + | sed -e 's/^\.\/*\(.*\)/\1/' -e '/./,/^$/!d') > debian/${name}.install + +(cd $SRCDIR && find . -type f -path './var/www/html/*' \ + | sed -e 's/^\.\/*\(.*\)/\1/' -e '/./,/^$/!d') > debian/${name}-doc.install + +# for some reason, dh_install doesn't work properly; let's disperse the files ourselves: + +for pkg in ${name} ${name}-doc; do + # skip this package if mentioned in CCM_DEBIAN_NO_PACKAGES + [ `echo $CCM_DEBIAN_NO_PACKAGES | tr ' ' '\n' | grep -c "^${pkg}$"` -eq 1 ] && continue || true + + # this should exist [due to dh_installdocs, dh_installchangelog], but just in case... + mkdir -p debian/$pkg + + [ -e debian/${pkg}.install ] && \ + echo -n "Dispersing files to debian/$pkg/ ... " && \ + for file in `cat debian/${pkg}.install`; do + dir=`dirname $file` + mkdir -p debian/$pkg/$dir + cp $SRCDIR/$file debian/$pkg/$dir/ + done + echo "done." +done diff --git a/ccm-cms-types-baseContact/debian/ccm-install.sh b/ccm-cms-types-baseContact/debian/ccm-install.sh new file mode 100755 index 000000000..39f3f2839 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/ccm-install.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: ccm-install.sh,v 1.1.1.1 2004/11/12 09:29:59 fabrice Exp $ + +. debian/ccm-settings.sh + +DESTDIR="$1" +[ "xDESTDIR" != "x" ] || exit 1 + +rm -rf $DESTDIR +mkdir -p $DESTDIR +mkdir -p $DESTDIR${confdir} +mkdir -p $DESTDIR/var/www/html/${name}-${version} + +ANT_OPTS="-Dapps.${name}.version=${version}" +ANT_OPTS="$ANT_OPTS -Ddeploy.conf.dir=$DESTDIR${confdir}" +ANT_OPTS="$ANT_OPTS -Ddeploy.shared.lib.dir=$DESTDIR${sharedjardir}" +ANT_OPTS="$ANT_OPTS -Ddeploy.private.lib.dir=$DESTDIR${sharedjardir}/${name}-${version}" +ANT_OPTS="$ANT_OPTS -Ddeploy.webapp.dir=$DESTDIR${webappdir}/${name}-${version}" +ANT_OPTS="$ANT_OPTS -Ddeploy.system.jars.dir=$DESTDIR${sharedjardir}" +ANT_OPTS="$ANT_OPTS -Ddeploy.api.dir.${appname}=$DESTDIR/var/www/html/${name}-${version}/api" +ANT_OPTS="$ANT_OPTS -Ddeploy.shared.classes.dir=$DESTDIR/tmp/${name}-${version}" +export ANT_OPTS + +$ANT deploy-jar-classes-${appname} +$ANT deploy-${appname} + +rm -rf "$DESTDIR/tmp" + + +# only generate and deploy javadocs if we didn't specify otherwise in CCM_DEBIAN_NO_JAVADOC + +GENERATE_JAVADOC=true +if [ `echo $CCM_DEBIAN_NO_JAVADOC | tr ' ' '\n' | grep -c "^${name}-doc$"` -eq 1 ]; then + GENERATE_JAVADOC=false +fi + +if [ -d ${appname}/src ]; then + $ANT deploy-jar-classes-${appname} + [ "$GENERATE_JAVADOC" == "true" ] && $ANT deploy-javadoc-${appname} || true +fi diff --git a/ccm-cms-types-baseContact/debian/ccm-settings-run.sh b/ccm-cms-types-baseContact/debian/ccm-settings-run.sh new file mode 100755 index 000000000..65ee0ba2c --- /dev/null +++ b/ccm-cms-types-baseContact/debian/ccm-settings-run.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: ccm-settings.sh,v 1.1.1.1 2004/11/12 09:29:59 fabrice Exp $ + +# say which app to compile, amongst those specified in the project.xml +export CCM_APP=$name + +# do some checks + +check_JAVA_HOME + +if [ "$name" = "ccm-core" ]; then + check_ORACLE_JDBC_LIB +fi + + +# set the environment + +for file in `echo /etc/profile.d/ccm-{tools,devel,scripts}.sh`; do + . $file +done + +cd .. +. $CCM_SCRIPTS_HOME/bin/env-conf.sh ${appname} > /dev/null +cd - +export CCM_HOME=`pwd` + +if which classic-ant > /dev/null 2>&1; then + ANT=classic-ant +else + ANT=ant +fi + + +# perhaps we don't like to build some packages -- get them from DH_OPTIONS + +export CCM_DEBIAN_NO_PACKAGES=`echo $DH_OPTIONS | tr -s ' ' '\n' | grep -E '(-N|--no-package=)' | xargs | sed -re 's/(-N|--no-package)//g'` + +# for now, assume that if we don't want to build some packages then we don't +# want to generate javadocs for them either + +export CCM_DEBIAN_NO_JAVADOC="$CCM_DEBIAN_NO_JAVADOC $CCM_DEBIAN_NO_PACKAGES" diff --git a/ccm-cms-types-baseContact/debian/ccm-settings.sh b/ccm-cms-types-baseContact/debian/ccm-settings.sh new file mode 100755 index 000000000..98c80cc62 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/ccm-settings.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: ccm-settings.sh,v 1.1.1.1 2004/11/12 09:29:59 fabrice Exp $ + +# source the shell library [for the check_* functions] +# FIXME: ugly-looking hack. +orig_DEBIAN_HAS_FRONTEND=$DEBIAN_HAS_FRONTEND +DEBIAN_HAS_FRONTEND=1 +. /usr/share/ccm-tools/lib/shellmodule +DEBIAN_HAS_FRONTEND=$orig_DEBIAN_HAS_FRONTEND + + +# variables we use [especially in ccm-install.sh] + +name=ccm-cms-types-organization +version=6.3.0 +appname=ccm-cms-types-organization +appversion=6.3.0 +confdir="/etc/ccm/conf" +sharedjardir="/usr/share/java" +webappdir="/usr/share/java/webapps" +ccmclasspathfile="ccm/ccm.classpath" +ccmwebappfile="ccm/ccm.webapps" + +. debian/ccm-settings-run.sh diff --git a/ccm-cms-types-baseContact/debian/changelog b/ccm-cms-types-baseContact/debian/changelog new file mode 100755 index 000000000..898707560 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/changelog @@ -0,0 +1,63 @@ +ccm-cms-types-organization (6.3.0-1) unstable; urgency=low + + * Automatic update of version number from 6.2.0 to 6.3.0 + + -- Runtime Collective Ltd. Mon, 10 Oct 2005 13:51:58 +0000 + +ccm-cms-types-organization (6.2.0-1) unstable; urgency=low + + * Automatic update of version number from 6.1.1 to 6.2.0 + + -- Runtime Collective Ltd. Mon, 10 Oct 2005 12:30:08 +0000 + +ccm-cms-types-organization (6.1.1-1) unstable; urgency=low + + * Automatic update of version number from 6.1.0 to 6.1.1 + + -- Runtime Collective Ltd. Thu, 31 Mar 2005 11:59:53 +0000 + +ccm-cms-types-organization (6.1.0-5) unstable; urgency=low + + * Depend on j2sdk1.4 | java2-compiler + * Update to policy 3.6.1 + * Change maintainer to the mailing list and add uploaders + + -- David Pashley Mon, 14 Feb 2005 16:55:52 +0000 + +ccm-cms-types-organization (6.1.0-4) unstable; urgency=low + + * debian/postrm: disabled the purge operations [had some weird problems]. + * updated the debian control scripts to get the package name and version from their invocation. + + -- Berkan Eskikaya Mon, 10 May 2004 12:33:33 +0100 + +ccm-cms-types-organization (6.1.0-3) unstable; urgency=low + + * debian/templates: made load-at-install and setup-database-at-install the default behaviour. + * debian/postinst: ccm_hostinit will try to use web.xml-aplaws from ccm-ldn-aplaws. + * debian/ccm-settings.sh: correct checking/setting of ORACLE_JDBC_LIB [Chris]. + * debian/templates: changed the default postgresql database and user names to "ccm01.db" and "ccm". + * debian/config: added detection of the hostname of the machine and possibly the user's email. + * major restructuring of the debian scripts: moved all utility functions to ccm-tools and made postinst, postrm, prerm and ccm-settings.sh source and use that file. + + -- Berkan Eskikaya Fri, 7 May 2004 13:04:43 +0100 + +ccm-cms-types-organization (6.1.0-2) unstable; urgency=low + + * The build process now tries to automatically detect JAVA_HOME and the location of Oracle's java library. + * debian/ccm-clean.sh: only calls the ant process if build.xml exists. + * debian/{postinst,prerm,config,templates}: added debconf support + * debian/postinst: accepts 'reconfigure' and treats it as 'configure'. + * debian/postinst: added postgresql.jar to CLASSPATH; added libpgjava to the dependencies. + * debian/postinst: removed some bashisms upon recommendation from lintian. + * debian/rules: enabled dh_installdebconf. + * debian/control: made the package depend on debconf. + + -- Berkan Eskikaya Fri, 1 May 2004 15:41:43 +0100 + + +ccm-cms-types-organization (6.1.0-1) unstable; urgency=low + + * Initial release. + + -- Berkan Eskikaya Fri, 24 Apr 2004 12:27:56 +0100 diff --git a/ccm-cms-types-baseContact/debian/compat b/ccm-cms-types-baseContact/debian/compat new file mode 100755 index 000000000..b8626c4cf --- /dev/null +++ b/ccm-cms-types-baseContact/debian/compat @@ -0,0 +1 @@ +4 diff --git a/ccm-cms-types-baseContact/debian/config b/ccm-cms-types-baseContact/debian/config new file mode 100755 index 000000000..3b240fa27 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/config @@ -0,0 +1,79 @@ +#!/bin/sh +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: config,v 1.1.1.1 2004/11/12 09:30:09 fabrice Exp $ + +set -e + +. /usr/share/debconf/confmodule +db_capb backup + +HOSTNAME=`hostname -f` 2>/dev/null || true + +if [ -n "$HOSTNAME" ]; then + db_metaget ccm/shared/waf_web_server default || true + PORTNUM=`echo $RET | cut -d: -f2` + db_set ccm/shared/waf_web_server "$HOSTNAME:$PORTNUM" || true +fi + +if [ -n "$EMAIL" ]; then + db_set ccm/shared/waf_admin_email "$EMAIL" || true +fi + + +STATE=1 +LASTSTATE=5 + +while [ "$STATE" != 0 -a "$STATE" -le "$LASTSTATE" ]; do + case "$STATE" in + 1) + # Database questions + db_input high ccm/shared/dbase_type || true + db_input high ccm/shared/dbase_host || true + db_input high ccm/shared/dbase_name || true + db_input high ccm/shared/dbase_user || true + db_input high ccm/shared/dbase_password || true + + ;; + 2) + # Server address + db_input high ccm/shared/waf_web_server || true + ;; + 3) + # Admin questions + db_input high ccm/shared/waf_admin_email || true + db_input high ccm/shared/waf_admin_name_given || true + db_input high ccm/shared/waf_admin_name_family || true + db_input high ccm/shared/waf_admin_password || true + db_input high ccm/shared/waf_admin_password_question || true + db_input high ccm/shared/waf_admin_password_answer || true + ;; + 4) + # When to load the applications + db_input medium ccm/shared/ccm_load_apps_at_install_p || true + ;; + 5) + # Whether to set up the [local] database + db_get ccm/shared/dbase_host || true + if [ "$RET" = "localhost" ]; then + db_input medium ccm/shared/pg_set_up_database_p || true + fi + ;; + + # Add additional states here, making sure to + # increment LASTSTATE. + esac + + if db_go; then + STATE=$(($STATE + 1)) + else + STATE=$(($STATE - 1)) + fi +done + + +db_go || true + +db_stop + diff --git a/ccm-cms-types-baseContact/debian/control b/ccm-cms-types-baseContact/debian/control new file mode 100755 index 000000000..58eb8bddc --- /dev/null +++ b/ccm-cms-types-baseContact/debian/control @@ -0,0 +1,21 @@ +Source: ccm-cms-types-organization +Section: contrib/web +Priority: optional +Maintainer: Runtime Packaging +Uploaders: David Pashley +Build-Depends-Indep: debhelper (>= 4.0.0), j2re1.4 | java2-runtime, j2sdk1.4 | java2-compiler, ant, libservlet2.3-java, libpgjava, debconf, po-debconf, ccm-tools, ccm-devel, ccm-scripts, ccm-core, ccm-cms +Standards-Version: 3.6.1 + +Package: ccm-cms-types-organization +Architecture: all +Depends: java-virtual-machine-dummy | j2sdk1.4 | java-virtual-machine, ccm-tools, ccm-servlet-container, libservlet2.3-java, libpgjava, liblog4j1.2-java , ccm-core, ccm-cms +Description: APLAWS: Stores organization information. + This package contains the Red Hat CCM Content Types application for APLAWS. + . + FIXME: We need a longer and more meaningful description here. + +Package: ccm-cms-types-organization-doc +Architecture: all +Depends: ccm-tools +Description: Documentation for ccm-cms-types-organization + Documentation for ccm-cms-types-organization. Provides the JavaDoc API documentation. diff --git a/ccm-cms-types-baseContact/debian/copyright b/ccm-cms-types-baseContact/debian/copyright new file mode 100755 index 000000000..2f47e3b15 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/copyright @@ -0,0 +1,15 @@ +This package was debianized by Berkan Eskikaya on +Tue, 13 Apr 2004 19:03:14 +0100. + +It was downloaded from http://aplaws.sourceforge.net/ + +Upstream Authors: Redhat UK. + +Copyright: + +You are free to distribute this software under the terms of +the GNU General Public License. +On Debian systems, the complete text of the GNU General Public +License can be found in the file `/usr/share/common-licenses/GPL'. + + diff --git a/ccm-cms-types-baseContact/debian/postinst b/ccm-cms-types-baseContact/debian/postinst new file mode 100755 index 000000000..5e36682a2 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/postinst @@ -0,0 +1,112 @@ +#! /bin/sh +# postinst script for ccm-cms-types-organization +# +# see: dh_installdeb(1) +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: postinst,v 1.1.1.1 2004/11/12 09:30:09 fabrice Exp $ + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/ccm-tools/lib/shellmodule + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure|reconfigure) + # FIXME: we need to be sensitive to upgrade operations here. + # basically, if pkgversion = appversion, then the datamodel + # hasn't changed -- we just configure the package and don't + # touch the database; else, we need to also update the + # datamodel in the database. + + + ### get the settings for the operations below + + ccm_set_env + db_get_ccm_settings ;# db_stop + + get_pkgname_from_arg "$0" + ccm_package_name="$RET" + get_pkgversion_from_dpkg "$ccm_package_name" + ccm_package_version="$RET" + + + ### do the usual post-installion configuration + + if [ ! -d "/etc/ccm" ]; then + db_message "ccm/shared/error_etc_ccm_missing_dir" + mkdir -p "/etc/ccm" + fi + + ccm_update_ccm_classpath add $ccm_package_name $ccm_package_version + ccm_update_ccm_webapps add $ccm_package_name $ccm_package_version + ccm_update_file_attributes $ccm_package_name $ccm_package_version + + + ### try to set up the database if asked to do so + + if [ "$pg_set_up_database_p" = "true" ]; then + pg_set_up_database + fi + + + ### try to load the application if asked to do so + + if [ "$ccm_load_apps_at_install_p" = "true" -a -n "$JAVA_HOME" ]; then + ccm_load + fi + + + ### run the hostinit step + + if [ -n "$JAVA_HOME" ]; then + tomcat_http_port=`echo $waf_web_server | cut -d':' -f2` || true + tomcat_shutdown_port=`expr $tomcat_http_port + 1` || true + ccm_host_init tomcat $tomcat_http_port $tomcat_shutdown_port + fi + + + ### don't give others the registry details [eg the database password] on a golden plate + # FIXME: this interferes with "ccm load" updating the registry. Need to find the right ownership. + # chmod -R o-rwx /etc/ccm/conf/registry || true + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/ccm-cms-types-baseContact/debian/postrm b/ccm-cms-types-baseContact/debian/postrm new file mode 100755 index 000000000..3209381b3 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/postrm @@ -0,0 +1,62 @@ +#! /bin/sh +# postrm script for ccm-cms-types-organization +# +# see: dh_installdeb(1) +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: postrm,v 1.1.1.1 2004/11/12 09:30:09 fabrice Exp $ + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/ccm-tools/lib/shellmodule + +db_get_ccm_settings + +get_pkgname_from_arg "$0" +ccm_package_name="$RET" +get_pkgversion_from_dpkg "$ccm_package_name" +ccm_package_version="$RET" + +if [ "$ccm_package_name" != "ccm-core" ]; then + exit 0 ;# nothing to do +fi + +case "$1" in + purge-FIXME) + # FIXME: there are problems with this, so disabling for the moment. + + # maybe drop the database + if [ "$dbase_host" = "localhost" ]; then + + db_input high ccm/shared/pg_drop_database_at_purge_p || true + db_go + db_stop + + if [ "$pg_drop_database_at_purge_p" = "true" ]; then + su - postgres -c "dropdb $dbase_name" 1>&2 || true + su - postgres -c "dropuser $dbase_user" 1>&2 || true + fi + + fi + + # FIXME: should we still remove /etc/ccm/conf/registry/registry.properties, + # even if we don't or fail to drop the database. + rm -rf /etc/ccm/conf/registry/* + ;; + + *) + # Nothing to do here. + ;; + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/ccm-cms-types-baseContact/debian/prerm b/ccm-cms-types-baseContact/debian/prerm new file mode 100755 index 000000000..ebf1e1b6c --- /dev/null +++ b/ccm-cms-types-baseContact/debian/prerm @@ -0,0 +1,60 @@ +#! /bin/sh +# prerm script for ccm-cms-types-organization +# +# see: dh_installdeb(1) +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: prerm,v 1.1.1.1 2004/11/12 09:30:09 fabrice Exp $ + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/ccm-tools/lib/shellmodule + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +db_get_ccm_settings ; db_stop + +get_pkgname_from_arg "$0" +ccm_package_name="$RET" +get_pkgversion_from_dpkg "$ccm_package_name" +ccm_package_version="$RET" + +case "$1" in + remove|purge|upgrade|deconfigure) + + ccm_update_ccm_classpath remove $ccm_package_name $ccm_package_version + ccm_update_ccm_webapps remove $ccm_package_name $ccm_package_version + ;; + + failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +if [ "$1" = "remove" -a "$ccm_package_name" = "ccm-core" -a -x "/etc/init.d/ccm" ]; then + invoke-rc.d ccm stop || true +fi + + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/ccm-cms-types-baseContact/debian/rules b/ccm-cms-types-baseContact/debian/rules new file mode 100755 index 000000000..eb481fbf5 --- /dev/null +++ b/ccm-cms-types-baseContact/debian/rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f +# debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. +# +# This version is for packages that are architecture independent. +# +# Author: Berkan Eskikaya , 2004 +# +# $Id: rules,v 1.1.1.1 2004/11/12 09:30:00 fabrice Exp $ + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build.xml: + dh_testdir + # Add here commands to configure the package. + @sh debian/ccm-config.sh + +build: build-stamp +build-stamp: build.xml + dh_testdir + + # Add here commands to compile the package. + @sh debian/ccm-build.sh + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + @sh debian/ccm-clean.sh + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/. + @sh debian/ccm-install.sh $(CURDIR)/debian/tmp + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installdirs + dh_installchangelogs + dh_installdocs + dh_installexamples + @sh debian/ccm-disperse.sh debian/tmp +# dh_install --sourcedir=debian/tmp +# dh_installmenu + dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installcatalogs +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo +# dh_undocumented + dh_installman + dh_link + dh_compress + dh_fixperms +# dh_perl +# dh_python + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do by default. + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/ccm-cms-types-baseContact/debian/templates b/ccm-cms-types-baseContact/debian/templates new file mode 100755 index 000000000..b9de55f8e --- /dev/null +++ b/ccm-cms-types-baseContact/debian/templates @@ -0,0 +1,207 @@ +Template: ccm/debconf/version +Type: string +Default: $Id: templates,v 1.1.1.1 2004/11/12 09:30:09 fabrice Exp $ +Description: The version of the debconf template + Author: Berkan Eskikaya , 2004 + . + $Id: templates,v 1.1.1.1 2004/11/12 09:30:09 fabrice Exp $ + +Template: ccm/package_name +Type: string +Default: ccm-cms-types-organization +Description: The name of the package + This is syntetic sugar. + +Template: ccm/package_version +Type: string +Default: 6.3.0 +Description: The version of the package + This is synthetic sugar. + +Template: ccm/shared/dbase_type +Type: select +Choices: postgresql +Default: postgresql +Description: Database backend: + Please choose a database backend. At the moment, you could only select PostgreSQL. + +Template: ccm/shared/dbase_host +Type: string +Default: localhost +Description: Database host: + Please specify the host that the database runs on. + +Template: ccm/shared/dbase_name +Type: string +Default: ccm01.db +Description: Database name: + Please specify the name of the APLAWS database. + +Template: ccm/shared/dbase_user +Type: string +Default: ccm +Description: Database user name: + Please specify the database account for the APLAWS database. + +Template: ccm/shared/dbase_password +Type: password +Default: ccmpwd +Description: Database password: + Please choose a password for the APLAWS database account. + +Template: ccm/shared/waf_runtime_jdbc_url +Type: string +Default: jdbc:postgresql://localhost/ccm01.db?user=ccm&password=ccmpwd +Description: JDBC connection URL: + The WAF runtime uses this value to connect to a database. + . + Format: jdbc:[subprotocol]:[subname] + . + Example: jdbc:postgresql://localhost/ccm01.db?user=ccm&password=ccmpwd + +Template: ccm/shared/waf_web_server +Type: string +Default: localhost:9090 +Description: Server virtual host: + Please specify the hostname and port that users of a site will + see in URLs generated by WAF. + . + Format: [server hostname]:[port number] + . + Example: example.com:80 + +Template: ccm/shared/waf_admin_email +Type: string +Default: +Description: Administrator Email Address: + Please specify the system administrator account. + . + Format: @ + . + Example: joe@example.com + +Template: ccm/shared/waf_admin_name_given +Type: string +Default: +Description: Administrator First Name: + Please specify the name of the system administrator. + +Template: ccm/shared/waf_admin_name_family +Type: string +Default: +Description: Administrator Last Name: + Please specify the surname of the system administrator. + +Template: ccm/shared/waf_admin_password +Type: password +Default: +Description: Administrator Password + Please choose a password for the system administrator account. + +Template: ccm/shared/waf_admin_password_question +Type: string +Default: The name of your primary school +Description: Administrator Password Question: + This question will be asked when the password to the system administrator + account is lost and access must be recovered. + . + Please only use letters and numbers. + +Template: ccm/shared/waf_admin_password_answer +Type: string +Default: +Description: Administrator Password Answer: + Now specify the correct answer to the Administrator Password Question. + . + Please only use letters and numbers. + +Template: ccm/shared/ccm_load_apps_at_install_p +Type: boolean +Default: true +Description: Load CCM applications as they install? + You could choose to load CCM applications into the database + automatically after they are installed, or you could load them + manually [with 'ccm load'] yourself. + . + The former will save you some manual work, while the latter is probably + most suited if you are trying to build the applications from the + sources and prefer to load them once all are built and installed. + +Template: ccm/shared/pg_set_up_database_p +Type: boolean +Default: true +Description: Do you want me to set up the CCM database and adjust the access permissions? + You have specified a database on your localhost. I could set it up + for you and automatically adjust the access permissions. I could do + this independently of whether or not you have choosen to load the + applications at install time. + . + Say no here if you have already prepared the CCM database yourself + or if you would like to do it later. Saying yes will save you some + manual work. + +Template: ccm/shared/pg_drop_database_at_purge_p +Type: boolean +Default: true +Description: Do you want me to drop the CCM database? + + +Template: ccm/shared/error_etc_ccm_missing_dir +Type: note +Description: CCM configuration directory does not exist. + I couldn't find the CCM configuration directory: /etc/ccm. + . + This probably points at a corrupt or unusual CCM installation. The ccm-tools + package creates this directory --- please verify that it is installed and + intact. + . + I will continue with the configuration by re-creating the directory, + but we may experience problems later. + +Template: ccm/shared/ccm_aux_setupdb_failed +Type: note +Description: ccm-aux-setupdb couldn't complete. + The helper script ccm-aux-setupdb didn't succeed. + This means that the CCM database couldn't be set up. + . + If you have answered yes to the automatic loading of + applications at install time, I will still try to honour + that. + . + In case that doesn't succeed [likely now], please manually + prepare the database and load the application(s) after the + installation. + +Template: ccm/shared/ccm_aux_update_hba_conf_failed +Type: note +Description: ccm-aux-update-hba-conf couldn't complete. + The helper script ccm-aux-update-hba-conf didn't succeed. + This means that the access permissions for the ccm database + couldn't be set up. + . + If you have answered yes to the automatic loading of + applications at install time, I will still try to honour + that. + . + In case that doesn't succeed [likely now], please manually + check/edit the pg_hba.conf file of your PostgreSQL instance + and load the application(s) after the installation. + +Template: ccm/shared/error_ccm_tool_not_found +Type: note +Description: The 'ccm' tool not found. + I need the 'ccm' tool [/usr/bin/ccm] to continue but I cannot find it. + . + This probably points at a corrupt or unusual CCM installation. The ccm-tools + package contains this file --- please check your setup after the installation, + and then run "dpkg-reconfigure ccm-cms-types-organization". + +Template: ccm/shared/error_java_home_not_found +Type: note +Description: JAVA_HOME not found. + JAVA_HOME isn't set --- I have even tried to guess it but failed. + . + This will cancel any 'ccm load' and 'ccm hostinit' operations. + . + Please check your java setup after the installation, and then run + "dpkg-reconfigure ccm-cms-types-organization". diff --git a/ccm-cms-types-baseContact/pdl/com/arsdigita/content-types/BaseContact b/ccm-cms-types-baseContact/pdl/com/arsdigita/content-types/BaseContact new file mode 100644 index 000000000..6817e52ef --- /dev/null +++ b/ccm-cms-types-baseContact/pdl/com/arsdigita/content-types/BaseContact @@ -0,0 +1,26 @@ +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.contenttypes.Person; +import com.arsdigita.cms.*; + +// Contact Object +object type BaseContact extends Person { + + component BaseAddress [0..n] addresses = join ct_baseContacts.address_id + to ct_baseAddresses.address_id; + + component BaseContactEntry [0..n] contactentries = join ct_baseContacts.contact_id + to ct_baseContactEntries.contact_id; + + reference key ( ct_baseContacts.contact_id ); +} + +object type BaseContactEntry { + + String [1..1] key = ct_baseContactEntries.key VARCHAR(100); + String [1..1] description = ct_baseContactEntries.description VARCHAR(100); + String [1..1] value = ct_baseContactEntries.value VARCHAR(100); + + reference key ( ct_baseContactEntries.contactentry_id ); + +} diff --git a/ccm-cms-types-baseContact/sql/ccm-zes-dbde/oracle-se-create.sql b/ccm-cms-types-baseContact/sql/ccm-zes-dbde/oracle-se-create.sql new file mode 100755 index 000000000..733784c1c --- /dev/null +++ b/ccm-cms-types-baseContact/sql/ccm-zes-dbde/oracle-se-create.sql @@ -0,0 +1,22 @@ +-- +-- Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: oracle-se-create.sql 287 2005-02-22 00:29:02Z sskracic $ +-- $DateTime: 2004/08/17 23:15:09 $ +@ ddl/oracle-se/create.sql + +@ ddl/oracle-se/deferred.sql diff --git a/ccm-cms-types-baseContact/sql/ccm-zes-dbde/postgres-create.sql b/ccm-cms-types-baseContact/sql/ccm-zes-dbde/postgres-create.sql new file mode 100755 index 000000000..7ea108389 --- /dev/null +++ b/ccm-cms-types-baseContact/sql/ccm-zes-dbde/postgres-create.sql @@ -0,0 +1,23 @@ +-- +-- Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: postgres-create.sql 287 2005-02-22 00:29:02Z sskracic $ +-- $DateTime: 2004/08/17 23:15:09 $ +begin; +\i ddl/postgres/create.sql +\i ddl/postgres/deferred.sql +end; diff --git a/ccm-cms-types-baseContact/src/ccm-cms-types-baseContact.config b/ccm-cms-types-baseContact/src/ccm-cms-types-baseContact.config new file mode 100755 index 000000000..adfdba100 --- /dev/null +++ b/ccm-cms-types-baseContact/src/ccm-cms-types-baseContact.config @@ -0,0 +1,4 @@ + + + + diff --git a/ccm-cms-types-baseContact/src/ccm-cms-types-baseContact.load b/ccm-cms-types-baseContact/src/ccm-cms-types-baseContact.load new file mode 100755 index 000000000..e87d198ac --- /dev/null +++ b/ccm-cms-types-baseContact/src/ccm-cms-types-baseContact.load @@ -0,0 +1,18 @@ + + + +
+
+
+ + + +
+
+ + + + + + + diff --git a/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContact.java b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContact.java new file mode 100755 index 000000000..45a0277fe --- /dev/null +++ b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContact.java @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.persistence.OID; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.cms.ContentType; +import com.arsdigita.cms.ContentPage; +import com.arsdigita.cms.ImageAsset; +import com.arsdigita.util.Assert; +import java.math.BigDecimal; + + +/** + * This content type represents an BaseContact + * + */ +public class BaseContact extends ContentPage { + + /** PDL property names */ + + /** Data object type for tihs domain object */ + public static final String BASE_DATA_OBJECT_TYPE + = "com.arsdigita.cms.contenttypes.Organization"; + + public BaseContact () { + super(BASE_DATA_OBJECT_TYPE); + } + + public BaseContact ( BigDecimal id ) + throws DataObjectNotFoundException { + this(new OID(BASE_DATA_OBJECT_TYPE, id)); + } + + public BaseContact ( OID id ) + throws DataObjectNotFoundException { + super(id); + } + + public BaseContact ( DataObject obj ) { + super(obj); + } + + public BaseContact ( String type ) { + super(type); + } + + public void beforeSave() { + super.beforeSave(); + + Assert.exists(getContentType(), ContentType.class); + } + + + /////////////////////////////////////////////////////////////// + // accessors + +/* + public String getLink () { + return (String)get(LINK); + } + + public void setLink ( String link ) { + set(LINK, link); + } +*/ + + +/* + public BigDecimal getImageID() { + return (BigDecimal)get(IMAGE_ID); + } + + public ImageAsset getImage() { + DataObject obj = (DataObject)get(IMAGE); + if ( obj == null ) { + return null; + } + return new ImageAsset(obj); + } + + public void setImage(ImageAsset image) { + if (image != null) + image.setMaster(this); + setAssociation(IMAGE,image); + } + + + public void delete() { + ImageAsset image = getImage(); + if (image != null) { + setAssociation(IMAGE, null); + save(); + image.delete(); + } + + super.delete(); + } +*/ +} diff --git a/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactInitializer.java b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactInitializer.java new file mode 100755 index 000000000..cfa34fa35 --- /dev/null +++ b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactInitializer.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes; + +import org.apache.log4j.Logger; + +/** + * The CMS initializer. + * + * @author Justin Ross <jross@redhat.com> + * @version $Id: OrganizationInitializer.java 757 2005-09-02 14:12:21Z sskracic $ + */ +public class BaseContactInitializer extends ContentTypeInitializer { + public final static String versionId = + "$Id: BaseContactInitializer.java $" + + "$Author: quasi $" + + "$DateTime: 2009/03/15 $"; + private static final Logger s_log = Logger.getLogger(BaseContactInitializer.class); + + public BaseContactInitializer() { + super("ccm-cms-types-baseContact.pdl.mf", + BaseContact.BASE_DATA_OBJECT_TYPE); + } + + public String[] getStylesheets() { + return new String[] { + "/static/content-types/com/arsdigita/cms/contenttypes/BaseContact.xsl" + }; + } + +} diff --git a/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactLoader.java b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactLoader.java new file mode 100755 index 000000000..5e539efaf --- /dev/null +++ b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactLoader.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader; + + +/** + * Loader. + * + * @author Justin Ross <jross@redhat.com> + * @version $Id: OrganizationLoader.java 287 2005-02-22 00:29:02Z sskracic $ + */ +public class BaseContactLoader extends AbstractContentTypeLoader { + public final static String versionId = + "$Id: BaseContactLoader.java $" + + "$Author: quasi $" + + "$DateTime: 2009/03/15 $"; + + + private static final String[] TYPES = { + "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/BaseContact.xml" + }; + + public String[] getTypes() { + return TYPES; + } + +} diff --git a/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactResources.properties b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/BaseContactResources.properties new file mode 100755 index 000000000..e69de29bb diff --git a/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/util/BaseContactGlobalizationUtil.java b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/util/BaseContactGlobalizationUtil.java new file mode 100755 index 000000000..7efceffb3 --- /dev/null +++ b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/util/BaseContactGlobalizationUtil.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes.util; + +import com.arsdigita.globalization.GlobalizedMessage; + +/** + *

+ * . + * Contains methods to simplify globalizing keys + *

+ * + * @author randyg@arsdigita.com + * @version $Revision: #4 $ $Date: 2004/08/17 $ + */ + +public class BaseContactGlobalizationUtil { + + final public static String BUNDLE_NAME = + "com.arsdigita.cms.contenttypes.util.BaseContactResourceBundle"; + + /** + * This returns a globalized message using the type specific bundle, + * BUNDLE_NAME + */ + public static GlobalizedMessage globalize(String key) { + return new GlobalizedMessage(key, BUNDLE_NAME); + } + + /** + * This returns a globalized message using the type specific bundle, + * BUNDLE_NAME + */ + public static GlobalizedMessage globalize(String key, Object[] args) { + return new GlobalizedMessage(key, BUNDLE_NAME, args); + } +} diff --git a/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/util/BaseContactResourceBundle.java b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/util/BaseContactResourceBundle.java new file mode 100755 index 000000000..3fbd9962a --- /dev/null +++ b/ccm-cms-types-baseContact/src/com/arsdigita/cms/contenttypes/util/BaseContactResourceBundle.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes.util; + +import java.util.PropertyResourceBundle; +import com.arsdigita.globalization.ChainedResourceBundle; +import com.arsdigita.cms.CMSGlobalized; + +/** + * Form to edit the basic properties of an event. This form can be extended to + * create forms for Event subclasses. + **/ +public class BaseContactResourceBundle extends ChainedResourceBundle implements CMSGlobalized { + + public final static String BASE_CONTACT_BUNDLE_NAME = + "com.arsdigita.cms.contenttypes.BaseContactResources"; + + public BaseContactResourceBundle() { + super(); + addBundle((PropertyResourceBundle)getBundle(BASE_CONTACT_BUNDLE_NAME)); + addBundle((PropertyResourceBundle)getBundle(BUNDLE_NAME)); + } +}